SlideShare a Scribd company logo
1 of 51
Download to read offline
Sorting
          and
a Tale of Two Polytopes

                Jean Cardinal
            ULB, Brussels, Belgium
    Algorithms & Permutations, Paris, 2012
Sorting by Comparisons



   Input: a set V , totally ordered by an unknown order
   Goal: Discover    by making queries “is x    y ?”, for some
   x, y ∈ V
   Objective function: #queries

       Calssical problem in algorithms
       Θ(|V | log |V |) queries necessary and sufficient (Heap Sort,
       Merge Sort)
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V ,   P)   compatible with

   Goal: Discover    by making queries “is x      y ?”, for some
   x, y ∈ V
   Objective function: #queries
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V ,   P)   compatible with

   Goal: Discover    by making queries “is x      y ?”, for some
   x, y ∈ V
   Objective function: #queries
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V ,   P)   compatible with

   Goal: Discover    by making queries “is x      y ?”, for some
   x, y ∈ V
   Objective function: #queries
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V ,   P)   compatible with

   Goal: Discover    by making queries “is x      y ?”, for some
   x, y ∈ V
   Objective function: #queries




                                  OR          ?
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V ,   P)   compatible with

   Goal: Discover    by making queries “is x      y ?”, for some
   x, y ∈ V
   Objective function: #queries




                                  OR          ?
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V , P ) compatible with
   Goal: Discover    by making queries “is x   y ?”, for some
   x, y ∈ V
   Objective function: #queries
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V ,   P)   compatible with

   Goal: Discover    by making queries “is x      y ?”, for some
   x, y ∈ V
   Objective function: #queries




                                  OR          ?
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V , P ) compatible with
   Goal: Discover    by making queries “is x   y ?”, for some
   x, y ∈ V
   Objective function: #queries




                                  OR       ?
Sorting by Comparisons under Partial Information
   Input:
       a set V , totally ordered by an unknown order
       a partial order P = (V , P ) compatible with
   Goal: Discover    by making queries “is x   y ?”, for some
   x, y ∈ V
   Objective function: #queries
Partial Orders and Linear Extensions


       Hasse diagram: maximum on top, transitive reduction
       e(P) := #linear extensions of P

                                  b      b
                                  a      a
              a           b       d      c    a
                                  c      d    c
                                  a      a    b
        P                         b      b    d
                                  d      c

             c            d
                                  c      d        e(P ) = 5
Lower Bound




  Every comparison-based sorting algorithm can be forced to do at
  least
                               lg e(P)
  comparisons.
Balanced Pairs



   Does there always exist a comparison that ”splits” the set of linear
   extensions into roughly equal part?
       1/3 − 2/3 conjecture: In any partial order P, there exists a
       pair of elements a, b such that the fraction of linear extensions
       having a < b is between 1/3 and 2/3
       Proved for smaller values
                          Brightwell, Felsner, and Trotter, 1995 – Brightwell, 1999
A Counting Issue



        Computing e(P), or computing the fraction of linear
        extensions in which a < b for some pair a, b are #P-Complete
        problems                               Brightwell and Winkler, 1991



   Goal of this talk:
        Insights into approximations of lg e(P) that will eventually
        yield efficient sorting algorithms
Plan




       The Order Polytope O(P) of P and how it relates to lg e(P)
       The Chain Polytope C(P) and how it relates to O(P)
       Approximating lg e(P) using the graph entropy and how it
       relates to the two polytopes
       A sorting algorithm
The Order Polytope




      We consider the Euclidean space RV of all functions
      f :V →R
      the Order Polytope O(P) of P is the subset of RV defined by:

                       0 ≤ f (x) ≤ 1     ∀x ∈ V
                        f (x) ≤ f (y )   if x   P   y
Interpretation

       O(P) is the intersection of the subsets depicted below, for
       each comparable pair a P b

                      f (b)

                     1
           b

           a



                     0                                   f (a)
                                               1
Example



               b          c             f (b)

                                    1

                     a
          f (a) ≤ f (b)                             f (c)
          f (a) ≤ f (c)
          0 ≤ f (a), f (b), f (c) ≤ 1           1

                                    0                       f (a)
                                                        1
Volume of the Order Polytope




                    vol(O(P)) = e(P)/|V |!
                                                         Stanley, 1986


   A short proof:
       Every linear extension of P defines a simplex of O(P)
       Every simplex has volume 1/|V |!
Volume of the Order Polytope



            b     ?c     c       f (b)

                                 1
                     a
                 a
       f (a) ≤ f (b)                         f (c)
       f (a) ≤ f (c)
       0 ≤ f (a), f (b), f (c) ≤ 1       1

                                 0                   f (a)
                                                 1
Volume of the Order Polytope


                     c

                                     f (b)
                     b
                                 1
                     a

       f (a) ≤ f (b) ≤ f (c)                     f (c)
       0 ≤ f (a), f (b), f (c) ≤ 1
                                             1

                                 0                       f (a)
                                                     1
Volume of the Order Polytope


                     b
                                     f (b)
                     c
                                 1
                     a

       f (a) ≤ f (c) ≤ f (b)                     f (c)
       0 ≤ f (a), f (b), f (c) ≤ 1
                                             1

                                 0                       f (a)
                                                     1
The Chain Polytope



      The Chain polytope C(P) of P is the subset of RV defined by

                       0 ≤ g (x)   ∀x ∈ V
                       g (x) ≤ 1   for every chain C in P
                 x∈C

      Convex hull of the characteristic vectors of subsets of
      mutually incomparable elements (antichains)
      Convex corner: contains the convex hull of the origin and the
      basis vectors
Example


             b         c             g(b)

                                 1

                  a
                                                g(c)
          g(a) + g(b) ≤ 1
          g(a) + g(c) ≤ 1
          g(a), g(b), g(c) ≥ 0              1

                                 0                     g(a)
                                                   1
Example


             b          c              g(b)

                                   1

                  a
          independent      sets:                  g(c)
          {a}, {b}, {c}, {b, c}
                                              1

                                   0                     g(a)
                                                     1
From the Order Polytope to the Chain Polytope




      Define the transfer map φ : O(P) → C(P) as follows: if
      f ∈ O(P) and x ∈ V , then

                  (φf )(x) = min{f (x) − f (y ) : y <P x}

      It can be checked that φ is a continuous, piecewise-linear
      bijection from O(P) onto C(P)
Example


      the function f is increasing along the chain
      the function g has sum at most one along the chain



                f (b)                        g(b)
  c   1   1/2
                1                           1

  b   1/2 0                 f (c)                        g(c)
                        1                            1
  a   1/2 1/2   0                   f (a)   0                   g(a)
                               1                           1
Consequence




          vol(C(P)) = vol(O(P)) = e(P)/|V |!
                                                       Stanley, 1986

      We may work with either polytope
      Considering the Chain polytope allows us to borrow ideas
      from graph theory
Approximation of (log)e(P)
   Approximating the volume of a convex corner by an enclosed box:
Maximizing the Box Volume



      For any x ∈ C(P), the box with the origin and x as opposite
      corners is fully contained in C(P)
      Let us define the following maximum included box program:

                           max            xv
                                   v ∈V
                            s.t.   x ∈ C(P)
Entropy




   Taking the log, normalizing by n := |V |, and changing sign:


                                   1
                          min −               lg xv
                                   n
                                       v ∈V
                           s.t.   x ∈ C(P), x > 0
Entropy

      Let us give it a name:
                                       1
                     H(P) = min −                 lg xv
                                       n
                                           v ∈V
                               s.t.   x ∈ C(P), x > 0

      Special case of the Graph Entropy                   K¨rner, 1973
                                                           o

      Applications to data compression, Boolean formulas,
      optimization
Entropy




      For P a total order, C(P) is the convex hull of the basis
      vectors only
          We set xv = 1/n ∀v ∈ V , and obtain H(P) = log n
      For P an empty order, C(P) is the unit cube
          We set xv = 1 ∀v ∈ V , and obtain H(P) = 0
      Intuitively, H(P) measures the quantity of information
      contained in P
Approximation


      Let x define the optimal box
      The volume of the box is bounded by that of the polytope:



                              xv   ≤ e(P)/n!
                       v ∈V

                                1
                        H(P) = − log                  xv
                                n
                                               v ∈V
              n log n − nH(P) ≤ lg e(P) + 1.443n
Approximation



      In fact, we can show that

                 lg e(P) = Θ(n log n − nH(P))
                                                   Kahn and Kim, 1992

      Furthermore, computing H(P) is a convex programming
      problem, that can be solved in polynomial time
      Hence we get a polynomial time constant-factor
      approximation algorithm for the sorting lower bound lg e(P)
A Sorting Algorithm

     1. Compute greedy chain decomposition of P
     2. Iteratively merge two smallest chains




                                       C1       C2   C3
A Sorting Algorithm

     1. Compute greedy chain decomposition of P
     2. Iteratively merge two smallest chains




                 C1    C2 C3     C4    C5   C6   C7
A Sorting Algorithm

     1. Compute greedy chain decomposition of P
     2. Iteratively merge two smallest chains
A Sorting Algorithm

     1. Compute greedy chain decomposition of P
     2. Iteratively merge two smallest chains
A Sorting Algorithm

     1. Compute greedy chain decomposition of P
     2. Iteratively merge two smallest chains
A Sorting Algorithm




                      ETC.
Analysis (Outline)


   This algorithm performs (1 + ε)lg e(P) + Oε (n) comparisons
                                       C., Fiorini, Joret, Jungers, Munro, 2010


   Proof outline:
       The tree of merges is a Huffman tree
       Hence the number of comparisons is at most g + O(n),
       where :
                                k
                                             n
                          g :=     |Ci | lg
                                            |Ci |
                                 i=1

       We could prove that g is a good approximation of
       n log n − nH(P), hence of lg e(P)
Summary



   1. Volume of the Order Polytope O(P) of P proportional to e(P)


   2. Chain Polytope C(P) = φO(P)


   3. Maximum included box in C(P) → entropy → approximates
      lg e(P)


   4. Cost of Greedy Merge Sort approximates entropy
Extending the Scope




      The graph entropy framework provides efficient algorithms for
      approximating the number of linear extensions of a partial
      order
      Can it be used for other applications?
      Can it be used to approximate other quantities?
Thank You!
Pointers: Stanley’s map




      R. P. Stanley.
      Two poset polytopes.
      Discrete Comput. Geom., 1:9–23, 1986.
Pointers: Counting Linear Extensions




      G. R. Brightwell and P. Winkler.
      Counting linear extensions.
      Order, 8(3):225–242, 1991.
Pointers: Sorting
      M. L. Fredman.
      How good is the information theory bound in sorting?
      Theor. Comput. Sci., 1(4):355–361, 1976.
      N. Linial.
      The information-theoretic bound is good for merging.
      SIAM J. Comput., 13(4):795–801, 1984.
      J. Kahn and M. E. Saks.
      Balancing poset extensions.
      Order, 1:113–126, 1984.
      J. Kahn and N. Linial.
      Balancing extensions via Brunn-Minkowski.
      Combinatorica, 11:363–368, 1991.
      G. R. Brightwell.
      Balanced pairs in partial orders.
      Discrete Mathematics, 201(1–3):25–52, 1999.
Pointers: Entropy


      J. K¨rner.
          o
      Coding of an information source having ambiguous alphabet
      and the entropy of graphs.
      In Transactions of the 6th Prague Conference on Information
      Theory, pages 411–425, 1973.
      G. Simonyi.
      Graph entropy: a survey.
      In Combinatorial optimization (New Brunswick, NJ,
      1992–1993), volume 20 of DIMACS Ser. Discrete Math.
      Theoret. Comput. Sci., pages 399–441. Amer. Math. Soc.,
      Providence, RI, 1995.
Pointers: Sorting and Entropy
      J. Kahn and J. H. Kim.
      Entropy and sorting.
      J. Comput. Syst. Sci., 51(3):390–399, 1995.
      A. C.-C. Yao.
      Graph entropy and quantum sorting problems.
      In STOC’04: 36th Annual ACM Symposium on Theory of
      Computing, pages 112–117, 2004.
      J. C., S. Fiorini, G. Joret, R. Jungers, and J. I. Munro.
      An efficient algorithm for partial order production.
      In STOC ’09: 41st ACM Symposium on Theory of Computing,
      2009.
      J. C., S. Fiorini, G. Joret, R. Jungers, and J. I. Munro.
      Sorting under Partial Information (without the Ellipsoid
      Algorithm).
      In STOC ’10: 42nd ACM Symposium on Theory of
      Computing, 2010.

More Related Content

Similar to AlgoPerm2012 - 08 Jean Cardinal

Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Mel Anthony Pepito
 
Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Matthew Leingang
 
Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015
Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015
Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015Christian Robert
 
A Multicover Nerve for Geometric Inference
A Multicover Nerve for Geometric InferenceA Multicover Nerve for Geometric Inference
A Multicover Nerve for Geometric InferenceDon Sheehy
 
Probabilistic information retrieval models & systems
Probabilistic information retrieval models & systemsProbabilistic information retrieval models & systems
Probabilistic information retrieval models & systemsSelman Bozkır
 
Class 17: Golden Sneezewort
Class 17: Golden SneezewortClass 17: Golden Sneezewort
Class 17: Golden SneezewortDavid Evans
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ssRuo Ando
 
Jam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical StatisticsJam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical Statisticsashu29
 

Similar to AlgoPerm2012 - 08 Jean Cardinal (12)

12 - Overview
12 - Overview12 - Overview
12 - Overview
 
Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)
 
Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)
 
L04 (1)
L04 (1)L04 (1)
L04 (1)
 
Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015
Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015
Tutorial on testing at O'Bayes 2015, Valencià, June 1, 2015
 
A Multicover Nerve for Geometric Inference
A Multicover Nerve for Geometric InferenceA Multicover Nerve for Geometric Inference
A Multicover Nerve for Geometric Inference
 
Probabilistic information retrieval models & systems
Probabilistic information retrieval models & systemsProbabilistic information retrieval models & systems
Probabilistic information retrieval models & systems
 
Jokyokai20111124
Jokyokai20111124Jokyokai20111124
Jokyokai20111124
 
Class 17: Golden Sneezewort
Class 17: Golden SneezewortClass 17: Golden Sneezewort
Class 17: Golden Sneezewort
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ss
 
Jam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical StatisticsJam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical Statistics
 
Probability Cheatsheet.pdf
Probability Cheatsheet.pdfProbability Cheatsheet.pdf
Probability Cheatsheet.pdf
 

More from AlgoPerm 2012

AlgoPerm2012 - 14 Jean-Luc Baril
AlgoPerm2012 - 14 Jean-Luc BarilAlgoPerm2012 - 14 Jean-Luc Baril
AlgoPerm2012 - 14 Jean-Luc BarilAlgoPerm 2012
 
AlgoPerm2012 - 13 Laurent Bulteau
AlgoPerm2012 - 13 Laurent BulteauAlgoPerm2012 - 13 Laurent Bulteau
AlgoPerm2012 - 13 Laurent BulteauAlgoPerm 2012
 
AlgoPerm2012 - 12 Anthony Labarre
AlgoPerm2012 - 12 Anthony LabarreAlgoPerm2012 - 12 Anthony Labarre
AlgoPerm2012 - 12 Anthony LabarreAlgoPerm 2012
 
AlgoPerm2012 - 11 Dominique Rossin
AlgoPerm2012 - 11 Dominique RossinAlgoPerm2012 - 11 Dominique Rossin
AlgoPerm2012 - 11 Dominique RossinAlgoPerm 2012
 
AlgoPerm2012 - 10 Xavier Goaoc
AlgoPerm2012 - 10 Xavier GoaocAlgoPerm2012 - 10 Xavier Goaoc
AlgoPerm2012 - 10 Xavier GoaocAlgoPerm 2012
 
AlgoPerm2012 - 09 Vincent Pilaud
AlgoPerm2012 - 09 Vincent PilaudAlgoPerm2012 - 09 Vincent Pilaud
AlgoPerm2012 - 09 Vincent PilaudAlgoPerm 2012
 
AlgoPerm2012 - 07 Mathilde Bouvel
AlgoPerm2012 - 07 Mathilde BouvelAlgoPerm2012 - 07 Mathilde Bouvel
AlgoPerm2012 - 07 Mathilde BouvelAlgoPerm 2012
 
AlgoPerm2012 - 06 Mireille Bousquet-Mélou
AlgoPerm2012 - 06 Mireille Bousquet-MélouAlgoPerm2012 - 06 Mireille Bousquet-Mélou
AlgoPerm2012 - 06 Mireille Bousquet-MélouAlgoPerm 2012
 
AlgoPerm2012 - 05 Ioan Todinca
AlgoPerm2012 - 05 Ioan TodincaAlgoPerm2012 - 05 Ioan Todinca
AlgoPerm2012 - 05 Ioan TodincaAlgoPerm 2012
 
AlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe PaulAlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe PaulAlgoPerm 2012
 
AlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier HudryAlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier HudryAlgoPerm 2012
 
AlgoPerm2012 - 02 Rolf Niedermeier
AlgoPerm2012 - 02 Rolf NiedermeierAlgoPerm2012 - 02 Rolf Niedermeier
AlgoPerm2012 - 02 Rolf NiedermeierAlgoPerm 2012
 
AlgoPerm2012 - 01 Rida Laraki
AlgoPerm2012 - 01 Rida LarakiAlgoPerm2012 - 01 Rida Laraki
AlgoPerm2012 - 01 Rida LarakiAlgoPerm 2012
 

More from AlgoPerm 2012 (13)

AlgoPerm2012 - 14 Jean-Luc Baril
AlgoPerm2012 - 14 Jean-Luc BarilAlgoPerm2012 - 14 Jean-Luc Baril
AlgoPerm2012 - 14 Jean-Luc Baril
 
AlgoPerm2012 - 13 Laurent Bulteau
AlgoPerm2012 - 13 Laurent BulteauAlgoPerm2012 - 13 Laurent Bulteau
AlgoPerm2012 - 13 Laurent Bulteau
 
AlgoPerm2012 - 12 Anthony Labarre
AlgoPerm2012 - 12 Anthony LabarreAlgoPerm2012 - 12 Anthony Labarre
AlgoPerm2012 - 12 Anthony Labarre
 
AlgoPerm2012 - 11 Dominique Rossin
AlgoPerm2012 - 11 Dominique RossinAlgoPerm2012 - 11 Dominique Rossin
AlgoPerm2012 - 11 Dominique Rossin
 
AlgoPerm2012 - 10 Xavier Goaoc
AlgoPerm2012 - 10 Xavier GoaocAlgoPerm2012 - 10 Xavier Goaoc
AlgoPerm2012 - 10 Xavier Goaoc
 
AlgoPerm2012 - 09 Vincent Pilaud
AlgoPerm2012 - 09 Vincent PilaudAlgoPerm2012 - 09 Vincent Pilaud
AlgoPerm2012 - 09 Vincent Pilaud
 
AlgoPerm2012 - 07 Mathilde Bouvel
AlgoPerm2012 - 07 Mathilde BouvelAlgoPerm2012 - 07 Mathilde Bouvel
AlgoPerm2012 - 07 Mathilde Bouvel
 
AlgoPerm2012 - 06 Mireille Bousquet-Mélou
AlgoPerm2012 - 06 Mireille Bousquet-MélouAlgoPerm2012 - 06 Mireille Bousquet-Mélou
AlgoPerm2012 - 06 Mireille Bousquet-Mélou
 
AlgoPerm2012 - 05 Ioan Todinca
AlgoPerm2012 - 05 Ioan TodincaAlgoPerm2012 - 05 Ioan Todinca
AlgoPerm2012 - 05 Ioan Todinca
 
AlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe PaulAlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe Paul
 
AlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier HudryAlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier Hudry
 
AlgoPerm2012 - 02 Rolf Niedermeier
AlgoPerm2012 - 02 Rolf NiedermeierAlgoPerm2012 - 02 Rolf Niedermeier
AlgoPerm2012 - 02 Rolf Niedermeier
 
AlgoPerm2012 - 01 Rida Laraki
AlgoPerm2012 - 01 Rida LarakiAlgoPerm2012 - 01 Rida Laraki
AlgoPerm2012 - 01 Rida Laraki
 

Recently uploaded

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

AlgoPerm2012 - 08 Jean Cardinal

  • 1. Sorting and a Tale of Two Polytopes Jean Cardinal ULB, Brussels, Belgium Algorithms & Permutations, Paris, 2012
  • 2. Sorting by Comparisons Input: a set V , totally ordered by an unknown order Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries Calssical problem in algorithms Θ(|V | log |V |) queries necessary and sufficient (Heap Sort, Merge Sort)
  • 3. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries
  • 4. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries
  • 5. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries
  • 6. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries OR ?
  • 7. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries OR ?
  • 8. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P ) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries
  • 9. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries OR ?
  • 10. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P ) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries OR ?
  • 11. Sorting by Comparisons under Partial Information Input: a set V , totally ordered by an unknown order a partial order P = (V , P ) compatible with Goal: Discover by making queries “is x y ?”, for some x, y ∈ V Objective function: #queries
  • 12. Partial Orders and Linear Extensions Hasse diagram: maximum on top, transitive reduction e(P) := #linear extensions of P b b a a a b d c a c d c a a b P b b d d c c d c d e(P ) = 5
  • 13. Lower Bound Every comparison-based sorting algorithm can be forced to do at least lg e(P) comparisons.
  • 14. Balanced Pairs Does there always exist a comparison that ”splits” the set of linear extensions into roughly equal part? 1/3 − 2/3 conjecture: In any partial order P, there exists a pair of elements a, b such that the fraction of linear extensions having a < b is between 1/3 and 2/3 Proved for smaller values Brightwell, Felsner, and Trotter, 1995 – Brightwell, 1999
  • 15. A Counting Issue Computing e(P), or computing the fraction of linear extensions in which a < b for some pair a, b are #P-Complete problems Brightwell and Winkler, 1991 Goal of this talk: Insights into approximations of lg e(P) that will eventually yield efficient sorting algorithms
  • 16. Plan The Order Polytope O(P) of P and how it relates to lg e(P) The Chain Polytope C(P) and how it relates to O(P) Approximating lg e(P) using the graph entropy and how it relates to the two polytopes A sorting algorithm
  • 17. The Order Polytope We consider the Euclidean space RV of all functions f :V →R the Order Polytope O(P) of P is the subset of RV defined by: 0 ≤ f (x) ≤ 1 ∀x ∈ V f (x) ≤ f (y ) if x P y
  • 18. Interpretation O(P) is the intersection of the subsets depicted below, for each comparable pair a P b f (b) 1 b a 0 f (a) 1
  • 19. Example b c f (b) 1 a f (a) ≤ f (b) f (c) f (a) ≤ f (c) 0 ≤ f (a), f (b), f (c) ≤ 1 1 0 f (a) 1
  • 20. Volume of the Order Polytope vol(O(P)) = e(P)/|V |! Stanley, 1986 A short proof: Every linear extension of P defines a simplex of O(P) Every simplex has volume 1/|V |!
  • 21. Volume of the Order Polytope b ?c c f (b) 1 a a f (a) ≤ f (b) f (c) f (a) ≤ f (c) 0 ≤ f (a), f (b), f (c) ≤ 1 1 0 f (a) 1
  • 22. Volume of the Order Polytope c f (b) b 1 a f (a) ≤ f (b) ≤ f (c) f (c) 0 ≤ f (a), f (b), f (c) ≤ 1 1 0 f (a) 1
  • 23. Volume of the Order Polytope b f (b) c 1 a f (a) ≤ f (c) ≤ f (b) f (c) 0 ≤ f (a), f (b), f (c) ≤ 1 1 0 f (a) 1
  • 24. The Chain Polytope The Chain polytope C(P) of P is the subset of RV defined by 0 ≤ g (x) ∀x ∈ V g (x) ≤ 1 for every chain C in P x∈C Convex hull of the characteristic vectors of subsets of mutually incomparable elements (antichains) Convex corner: contains the convex hull of the origin and the basis vectors
  • 25. Example b c g(b) 1 a g(c) g(a) + g(b) ≤ 1 g(a) + g(c) ≤ 1 g(a), g(b), g(c) ≥ 0 1 0 g(a) 1
  • 26. Example b c g(b) 1 a independent sets: g(c) {a}, {b}, {c}, {b, c} 1 0 g(a) 1
  • 27. From the Order Polytope to the Chain Polytope Define the transfer map φ : O(P) → C(P) as follows: if f ∈ O(P) and x ∈ V , then (φf )(x) = min{f (x) − f (y ) : y <P x} It can be checked that φ is a continuous, piecewise-linear bijection from O(P) onto C(P)
  • 28. Example the function f is increasing along the chain the function g has sum at most one along the chain f (b) g(b) c 1 1/2 1 1 b 1/2 0 f (c) g(c) 1 1 a 1/2 1/2 0 f (a) 0 g(a) 1 1
  • 29. Consequence vol(C(P)) = vol(O(P)) = e(P)/|V |! Stanley, 1986 We may work with either polytope Considering the Chain polytope allows us to borrow ideas from graph theory
  • 30. Approximation of (log)e(P) Approximating the volume of a convex corner by an enclosed box:
  • 31. Maximizing the Box Volume For any x ∈ C(P), the box with the origin and x as opposite corners is fully contained in C(P) Let us define the following maximum included box program: max xv v ∈V s.t. x ∈ C(P)
  • 32. Entropy Taking the log, normalizing by n := |V |, and changing sign: 1 min − lg xv n v ∈V s.t. x ∈ C(P), x > 0
  • 33. Entropy Let us give it a name: 1 H(P) = min − lg xv n v ∈V s.t. x ∈ C(P), x > 0 Special case of the Graph Entropy K¨rner, 1973 o Applications to data compression, Boolean formulas, optimization
  • 34. Entropy For P a total order, C(P) is the convex hull of the basis vectors only We set xv = 1/n ∀v ∈ V , and obtain H(P) = log n For P an empty order, C(P) is the unit cube We set xv = 1 ∀v ∈ V , and obtain H(P) = 0 Intuitively, H(P) measures the quantity of information contained in P
  • 35. Approximation Let x define the optimal box The volume of the box is bounded by that of the polytope: xv ≤ e(P)/n! v ∈V 1 H(P) = − log xv n v ∈V n log n − nH(P) ≤ lg e(P) + 1.443n
  • 36. Approximation In fact, we can show that lg e(P) = Θ(n log n − nH(P)) Kahn and Kim, 1992 Furthermore, computing H(P) is a convex programming problem, that can be solved in polynomial time Hence we get a polynomial time constant-factor approximation algorithm for the sorting lower bound lg e(P)
  • 37. A Sorting Algorithm 1. Compute greedy chain decomposition of P 2. Iteratively merge two smallest chains C1 C2 C3
  • 38. A Sorting Algorithm 1. Compute greedy chain decomposition of P 2. Iteratively merge two smallest chains C1 C2 C3 C4 C5 C6 C7
  • 39. A Sorting Algorithm 1. Compute greedy chain decomposition of P 2. Iteratively merge two smallest chains
  • 40. A Sorting Algorithm 1. Compute greedy chain decomposition of P 2. Iteratively merge two smallest chains
  • 41. A Sorting Algorithm 1. Compute greedy chain decomposition of P 2. Iteratively merge two smallest chains
  • 43. Analysis (Outline) This algorithm performs (1 + ε)lg e(P) + Oε (n) comparisons C., Fiorini, Joret, Jungers, Munro, 2010 Proof outline: The tree of merges is a Huffman tree Hence the number of comparisons is at most g + O(n), where : k n g := |Ci | lg |Ci | i=1 We could prove that g is a good approximation of n log n − nH(P), hence of lg e(P)
  • 44. Summary 1. Volume of the Order Polytope O(P) of P proportional to e(P) 2. Chain Polytope C(P) = φO(P) 3. Maximum included box in C(P) → entropy → approximates lg e(P) 4. Cost of Greedy Merge Sort approximates entropy
  • 45. Extending the Scope The graph entropy framework provides efficient algorithms for approximating the number of linear extensions of a partial order Can it be used for other applications? Can it be used to approximate other quantities?
  • 47. Pointers: Stanley’s map R. P. Stanley. Two poset polytopes. Discrete Comput. Geom., 1:9–23, 1986.
  • 48. Pointers: Counting Linear Extensions G. R. Brightwell and P. Winkler. Counting linear extensions. Order, 8(3):225–242, 1991.
  • 49. Pointers: Sorting M. L. Fredman. How good is the information theory bound in sorting? Theor. Comput. Sci., 1(4):355–361, 1976. N. Linial. The information-theoretic bound is good for merging. SIAM J. Comput., 13(4):795–801, 1984. J. Kahn and M. E. Saks. Balancing poset extensions. Order, 1:113–126, 1984. J. Kahn and N. Linial. Balancing extensions via Brunn-Minkowski. Combinatorica, 11:363–368, 1991. G. R. Brightwell. Balanced pairs in partial orders. Discrete Mathematics, 201(1–3):25–52, 1999.
  • 50. Pointers: Entropy J. K¨rner. o Coding of an information source having ambiguous alphabet and the entropy of graphs. In Transactions of the 6th Prague Conference on Information Theory, pages 411–425, 1973. G. Simonyi. Graph entropy: a survey. In Combinatorial optimization (New Brunswick, NJ, 1992–1993), volume 20 of DIMACS Ser. Discrete Math. Theoret. Comput. Sci., pages 399–441. Amer. Math. Soc., Providence, RI, 1995.
  • 51. Pointers: Sorting and Entropy J. Kahn and J. H. Kim. Entropy and sorting. J. Comput. Syst. Sci., 51(3):390–399, 1995. A. C.-C. Yao. Graph entropy and quantum sorting problems. In STOC’04: 36th Annual ACM Symposium on Theory of Computing, pages 112–117, 2004. J. C., S. Fiorini, G. Joret, R. Jungers, and J. I. Munro. An efficient algorithm for partial order production. In STOC ’09: 41st ACM Symposium on Theory of Computing, 2009. J. C., S. Fiorini, G. Joret, R. Jungers, and J. I. Munro. Sorting under Partial Information (without the Ellipsoid Algorithm). In STOC ’10: 42nd ACM Symposium on Theory of Computing, 2010.