counting linear extensions of sparse posets
play

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

Counting Linear Extensions of Sparse Posets Kustaa Kangas October 20, 2016 Papers Kustaa Kangas, Teemu Hankala, Teppo Niinimki, and Mikko Koivisto. Counting linear extensions of sparse posets, IJCAI16 Eduard Eiben, Robert Ganian,


  1. Counting Linear Extensions of Sparse Posets Kustaa Kangas October 20, 2016

  2. Papers ◮ Kustaa Kangas, Teemu Hankala, Teppo Niinimäki, and Mikko Koivisto. Counting linear extensions of sparse posets, IJCAI’16 ◮ Eduard Eiben, Robert Ganian, Kustaa Kangas, and Sebastian Ordyniak. Counting linear extensions: Parameterizations by treewidth, ESA’16

  3. Partially ordered set (poset) A finite set + a reflexive, antisymmetric, transitive relation

  4. Partially ordered set (poset) Cover relation / cover graph (transitive reduction)

  5. Linear extensions Linear order: all pairs are comparable

  6. Linear extensions A linear extension = order preserving permutation

  7. Counting linear extensions Determining the number of linear extensions of a given poset is #P-complete (Brightwell & Winkler, ’91) (by reduction from #3SAT)

  8. Motivation Classic application: sorting Other uses: preference reasoning, planning, convex rank tests, sequence analysis, ...

  9. Motivation Sampling Bayesian networks from a posterior distribution

  10. Motivation Markov Chain Monte Carlo ◮ States are DAGs ◮ Stationary distribution is the posterior Order MCMC: ◮ States are linear orders ◮ Sample first an order, then a compatible DAG ◮ Faster mixing but requires bias correction via counting linear extensions of sampled DAGs

  11. Known algorithms Trivial solution: enumerate all orders (factorial time) The best we can do is O ( 2 n n ) time for n elements Polynomial time for special cases: ◮ Polytrees ◮ Series-parallel ◮ Bounded width ◮ Bounded decomposition diameter ◮ N-free orders of bounded activity A fpras also exists

  12. First paper We give two algorithms, exploiting sparsity of the poset 1. recursion (exploiting low connectivity) 2. variable elimination (exploiting low treewidth)

  13. First paper We give two algorithms, exploiting sparsity of the poset 1. recursion (exploiting low connectivity) 2. variable elimination (exploiting low treewidth)

  14. Recursive counting ℓ ( P ) = the number of linear extensions of poset P A simple observation: � ℓ ( P ) = ℓ ( P \ x ) x ∈ min ( P )

  15. Recursive counting P \ a P \ b P

  16. Recursive counting If A and B partition P and are mutually disconnected, then � | P | � ℓ ( P ) = ℓ ( A ) · ℓ ( B ) · | A |

  17. Recursive counting A B P

  18. Recursive counting Deciding whether to transpose is not trivial. We consider two heuristics 1. Only count minimal and maximal elements 2. Estimate the size of subproblem space recursively In practice both heuristics almost always make the better choice.

  19. 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 |

  20. 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

  21. Recursive counting Experiments on sparse posets for n = 30 , . . . , 100 10 3 Running time of R14-best (s) 10 2 10 1 10 0 10 − 1 10 − 1 10 0 10 1 10 2 10 3 Running time of R14-worst (s)

  22. First paper We give two algorithms, exploiting sparsity of the poset 1. recursion (exploiting low connectivity) 2. variable elimination (exploiting low treewidth)

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

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

  25. Variable elimination � φ 1 ( a , b , d ) φ 2 ( a , c ) φ 3 ( b , c , e ) λ 1 ( d ) a , b , c , d , e

  26. Variable elimination � � φ 2 ( a , c ) φ 3 ( b , c , e ) φ 1 ( a , b , d ) λ 1 ( d ) a , b , c , e d

  27. Variable elimination � φ 2 ( a , c ) φ 3 ( b , c , e ) λ 2 ( a , b ) a , b , c , e

  28. Variable elimination �� ��� �� �� �� �� ���� � φ 3 ( b , c , e ) φ 2 ( a , c ) φ 1 ( a , b , d ) φ 4 ( d , f ) a e c b d f Elimination order matters!

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

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

  31. 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

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

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

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

  35. 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

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

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

  38. 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

  39. 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

  40. 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 )

  41. Parameterized complexity Let n be input size and k an additional numerical parameter of the input. ◮ XP : problems solvable in time n f ( k ) ◮ FPT : problems solvable in time f ( k ) · n O ( 1 ) . Problems in FPT are called fixed-parameter tractable .

  42. Parameterized complexity Results: Counting linear extensions is... ◮ W [1]-hard when parameterized by the treewidth of the cover graph ◮ in FPT when parameterized by the treewidth of the incomparability graph A W [1]-hard problem is not in FPT unless FPT = W [ 1 ] .

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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend