counting linear extensions of sparse posets
play

Counting Linear Extensions of Sparse Posets Kustaa Kangas , Teemu - PowerPoint PPT Presentation

HELSINGIN YLIOPISTO HELSINGFORS UNIVERSITET UNIVERSITY OF HELSINKI Counting Linear Extensions of Sparse Posets Kustaa Kangas , Teemu Hankala, Teppo Niinimki, Mikko Koivisto July 13, 2016 University of Helsinki Department of Computer


  1. HELSINGIN YLIOPISTO HELSINGFORS UNIVERSITET UNIVERSITY OF HELSINKI Counting Linear Extensions of Sparse Posets Kustaa Kangas , Teemu Hankala, Teppo Niinimäki, Mikko Koivisto July 13, 2016 University of Helsinki Department of Computer Science

  2. Partially ordered set (poset) A set P with an antisymmetric, transitive relation

  3. Partially ordered set (poset) Cover graph

  4. Linear extensions A linear extension = order preserving permutation

  5. Counting linear extensions #P-complete (Brightwell & Winkler, ’91) Applications: sequence analysis, preference reasoning, sorting, learning probabilistic models, ...

  6. Counting linear extensions Currently we can do O ( 2 n n ) time for n elements. We give two algorithms, based on 1. recursion (exploiting low connectivity) 2. variable elimination (exploiting low treewidth)

  7. Counting linear extensions Currently we can do O ( 2 n n ) time for n elements. We give two algorithms, based on 1. recursion (exploiting low connectivity) 2. variable elimination (exploiting low treewidth)

  8. Recursive counting ℓ ( P ) = the number of linear extensions of poset P � Rule 1 ℓ ( P ) = ℓ ( P \ x ) x ∈ min ( P ) � Rule 2 ℓ ( P ) = ℓ ( D ) · ℓ ( U ) ( D , U ) k � Rule 3 ℓ ( P ) = ℓ ( S i ) i = 1 � | P | � ℓ ( P ) = ℓ ( A ) · ℓ ( B ) · Rule 4 | A |

  9. Recursive counting P \ a P \ b P

  10. Recursive counting P \ a P \ b P

  11. Recursive counting A B P

  12. Recursive counting Experiments on sparse posets for n = 30 , . . . , 100 10 3 10 2 Time (s) 10 1 R14-a R134 10 0 R1 R24 10 − 1 0 20 40 60 80 100 Percentage of posets solved

  13. Counting linear extensions Currently we can do O ( 2 n n ) time for n elements. We give two algorithms, based on 1. recursion (exploiting low connectivity) 2. variable elimination (exploiting low treewidth)

  14. Variable elimination � φ 1 ( a , b , d ) φ 2 ( a , c ) φ 3 ( b , c , e ) φ 4 ( d , f ) a , b , c , d , e , f

  15. Variable elimination � φ 1 ( a , b , d ) φ 2 ( a , c ) φ 3 ( b , c , e ) φ 4 ( d , f ) a , b , c , d , e , f

  16. Variable elimination � φ 1 ( a , b , d ) φ 2 ( a , c ) φ 3 ( b , c , e ) φ 4 ( d , f ) a , b , c , d , e , f

  17. Variable elimination � φ 1 ( a , b , d ) φ 2 ( a , c ) φ 3 ( b , c , e ) φ 4 ( d , f ) a , b , c , d , e , f Polynomial time for bounded treewidth

  18. Variable elimination For every permutation σ : P → [ n ] define � Φ( σ ) = [ σ x < σ y ] x ≺ y

  19. Variable elimination For every permutation σ : P → [ n ] define � Φ( σ ) = [ σ x < σ y ] x ≺ y Φ( σ ) = [ σ a < σ c ] [ σ a < σ d ] [ σ b < σ d ] [ σ c < σ e ] [ σ d < σ e ]

  20. Variable elimination For every permutation σ : P → [ n ] define � Φ( σ ) = [ σ x < σ y ] x ≺ y Then, � 1, if σ is a linear extension, Φ( σ ) = 0, otherwise.

  21. Variable elimination For every permutation σ : P → [ n ] define � Φ( σ ) = [ σ x < σ y ] x ≺ y Then, � 1, if σ is a linear extension, Φ( σ ) = 0, otherwise. As a consequence � ℓ ( P ) = Φ( σ ) σ : P → [ n ] bijection

  22. Variable elimination � ℓ ( P ) = Φ( σ ) σ : P → [ n ] bijection

  23. Variable elimination � ℓ ( P ) = Φ( σ ) σ : P → [ n ] bijection Can’t apply variable elimination because of the bijectivity constraint.

  24. Variable elimination � ℓ ( P ) = Φ( σ ) σ : P → [ n ] bijection � � ( − 1 ) n −| X | = Φ( σ ) X ⊆ [ n ] σ : P → X n � n � � � ( − 1 ) n − k = Φ( σ ) k k = 0 σ : P → [ k ] Inclusion–exclusion principle

  25. Variable elimination � ℓ ( P ) = Φ( σ ) σ : P → [ n ] bijection � � ( − 1 ) n −| X | = Φ( σ ) X ⊆ [ n ] σ : P → X n � n � � � ( − 1 ) n − k = Φ( σ ) k k = 0 σ : P → [ k ] O ( n t + 4 ) time for treewidth t

  26. Variable elimination VEIE: Variable elimination via inclusion–exclusion 10 3 t = 2 10 2 Time (s) 10 1 VEIE 10 0 R1 R14-a 10 − 1 30 40 50 60 70 80 90 100 Poset size ( n )

  27. Summary Recursion: often fast in practice Variable elimination: polynomial time for bounded treewidth Thank you!

Recommend


More recommend