Tree Decompositions Tree Decompositions Tree Decomposition T of G b , c G : x T : b , c b , c c a y b , x , c b , c , y b b , x , a � �� � width Definition A tree decomposition is a tree obtained from an arbitrary graph s.t. 1. Each vertex must occur in some bag 2. For each edge, there is a bag containing both endpoints 3. Connected : If vertex v appears in bags of nodes t 0 and t 1 , then v is also in the bag of each node on the path between t 0 and t 1 5 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x c y a b 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x c y a b 1. Decompose graph b , c b , c b , c b , x , c b , c , y b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x c y a b 1. Decompose graph 2. Solve problems via A b , c b , c b , c b , x , c b , c , y b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · · · · · · · · · · · · · b x c b c y b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , c , y · · · · · · · · · · · · · · · · · · b , x , a b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · · · · · · · · · · · · · b x c b c y b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , x , c b , c , y · · · · · · · · · · · · · · · · · · b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · · · · · · · · · · · · · b x c b c y b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , c , y · · · · · · · · · · · · · · · · · · b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · · · · · · · · · · · · · b x c b c y b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , c , y b , c , y · · · · · · · · · · · · · · · · · · b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · · · · · · · · · · · · · b x c b c y b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , c , y · · · · · · · · · · · · · · · · · · b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · · · · · · · · · · · · · b x c b c y b , c b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , c , y · · · · · · · · · · · · · · · · · · b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · · · · · · · · · · · · · b x c b c y b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , c , y · · · · · · · · · · · · · · · · · · b , x , a 6 / 22
Tree Decompositions Exploiting Tree Decompositions (TDs) Dynamic Programming DP A via local algorithm A x b c · · · · · · c y a · · · · · · · · · · · · · · · · · · b b c b c 1. Decompose graph · · · · · · · · · · · · · · · · · · · · · · · · 2. Solve problems via A · · · · · · · · · · · · 3. Combine solutions · · · · · · · · · · · · b x c b c y b , c · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · b , c b , c · · · · · · · · · · · · · · · · · · b x a b , x , c b , c , y · · · · · · · · · · · · · · · · · · b , x , a 6 / 22
PMC and Tree Decompositions? Outline Introduction Tree Decompositions PMC and Tree Decompositions? Towards Solving in Practice Summary & Future Work 7 / 22
PMC and Tree Decompositions? How would we solve PMC by means of Tree Decompositions? 7 / 22
PMC and Tree Decompositions? How would we solve PMC by means of Tree Decompositions? Relax! Let us go one step back to SAT! 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) Mod ( ϕ ) = { { b } , { a , b } , { b , c } , { a , b , c } , { b , c , x } , { a , b , c , x } , { b , y } , { a , b , y }} 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x c y a b 1. Decompose graph b , c b , c b , c b , x , c b , c , y b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 1 0 1 0 0 0 1 1 1 0 0 1 b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c 1 0 1 1 1 0 b , x , c b , c , y 1 1 1 0 1 1 b , x , a b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 1 0 1 0 0 0 1 1 1 0 0 1 b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c 1 0 1 1 1 0 b , x , c b , x , c b , c , y 1 1 1 0 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 1 0 1 0 0 0 1 1 1 0 0 1 b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c b , c 1 0 1 1 1 0 b , x , c b , c , y 1 1 1 0 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 1 0 1 0 0 0 1 1 1 0 0 1 b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c 1 0 1 1 1 0 b , x , c b , c , y b , c , y 1 1 1 0 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 1 0 1 0 0 0 1 1 1 0 0 1 b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c b , c b , c 1 0 1 1 1 0 b , x , c b , c , y 1 1 1 0 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 1 0 1 0 0 0 1 1 1 0 0 1 b , c b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c 1 0 1 1 1 0 b , x , c b , c , y 1 1 1 0 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 1 0 1 0 0 0 1 1 1 0 0 1 b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c 1 0 1 1 1 0 b , x , c b , c , y 1 1 1 0 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S for SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y 1 0 a 1 1 b c b c b 1 0 0 0 1. Decompose graph 1 1 1 0 1 1 b x c 2. Solve problems via S 1 0 0 b c y 3. Combine solutions 1 0 1 0 0 0 1 1 1 0 0 1 b , c 1 0 0 b x a 1 0 1 1 0 0 1 1 0 b , c b , c 1 0 1 1 1 0 b , x , c b , c , y 1 1 1 0 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S # for #SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c # c y 1 0 4 a 1 1 4 b c # b c # b 1 0 0 0 2 2 1. Decompose graph 1 1 4 1 0 2 1 1 1 b x c # 2. Solve problems via S 1 0 0 b c y # 2 3. Combine solutions 1 0 1 2 0 0 0 1 1 1 1 0 0 1 2 1 b , c 1 0 0 1 b x a # 1 0 1 1 1 0 0 1 1 1 0 1 b , c b , c 1 0 1 1 1 1 0 1 b , x , c b , c , y 1 1 1 1 0 1 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Local algorithm S # for #SAT [SamerS10] ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x # b c c 1 0 y 4 a 1 1 4 b c # b c # b 1 0 2 0 0 2 1. Decompose graph 1 1 4 1 0 2 1 1 1 b x c # 2. Solve problems via S 1 0 0 2 b c y # 3. Combine solutions 1 0 1 0 0 0 2 1 1 1 1 2 0 0 1 1 1 0 0 b , c 1 b x a # 1 0 1 1 1 0 0 1 1 1 0 1 b , c b , c 1 0 1 1 1 1 0 1 b , x , c b , c , y Runtime: 2 O ( tw ) · poly ( | ϕ | ) 1 1 1 1 0 1 1 1 b , x , a 7 / 22
PMC and Tree Decompositions? Solving PMC using S ? As already shown, algorithm S can be extended to solve #SAT! 8 / 22
PMC and Tree Decompositions? Solving PMC using S ? As already shown, algorithm S can be extended to solve #SAT! Can we trivially extend S to solve PMC? 8 / 22
PMC and Tree Decompositions? Solving PMC using S ? As already shown, algorithm S can be extended to solve #SAT! Can we trivially extend S to solve PMC? Short answer: NO! Theorem Unless ETH fails, there is no algorithm for PMC running in time 2 2 o ( tw ) · poly ( | ϕ | ) . 8 / 22
PMC and Tree Decompositions? Solving PMC using S ? As already shown, algorithm S can be extended to solve #SAT! Can we trivially extend S to solve PMC? Short answer: NO! Theorem Unless ETH fails, there is no algorithm for PMC running in time 2 2 o ( tw ) · poly ( | ϕ | ) . Proof. ◮ Solve closed QBF ∀ X . ∃ Y .ϕ by checking whether 2 | X | solves PMC of ( ϕ, P = X ) 8 / 22
PMC and Tree Decompositions? Solving PMC using S ? As already shown, algorithm S can be extended to solve #SAT! Can we trivially extend S to solve PMC? Short answer: NO! Theorem Unless ETH fails, there is no algorithm for PMC running in time 2 2 o ( tw ) · poly ( | ϕ | ) . Proof. ◮ Solve closed QBF ∀ X . ∃ Y .ϕ by checking whether 2 | X | solves PMC of ( ϕ, P = X ) ◮ Unless ETH fails, 2-QSAT can not be solved [LampisM17] in time 2 2 o ( tw ) · 2 o ( | ϕ | ) 8 / 22
PMC and Tree Decompositions? Side Question: Does it get simpler eventually? 9 / 22
PMC and Tree Decompositions? Side Question: Does it get simpler eventually? #Σ ℓ : “PMC” for QBFs ◮ Given: QBF ψ = ∃ X 1 . ∀ X 2 . . . . QX ℓ .ϕ , where set P is the set of free variables of ψ ◮ Task: Compute PMCQ P ( ψ ) := |{ I | I ⊆ P , ψ [ I ] valid }| 9 / 22
PMC and Tree Decompositions? Side Question: Does it get simpler eventually? #Σ ℓ : “PMC” for QBFs ◮ Given: QBF ψ = ∃ X 1 . ∀ X 2 . . . . QX ℓ .ϕ , where set P is the set of free variables of ψ ◮ Task: Compute PMCQ P ( ψ ) := |{ I | I ⊆ P , ψ [ I ] valid }| Theorem ([FHP19]) o ( tw ) 2 2 ... 2 · 2 o ( | ϕ | ) . Unless ETH fails, there is no algorithm for #Σ ℓ running in time ���� height ℓ + 1 9 / 22
PMC and Tree Decompositions? Side Question: Does it get simpler eventually? #Σ ℓ : “PMC” for QBFs ◮ Given: QBF ψ = ∃ X 1 . ∀ X 2 . . . . QX ℓ .ϕ , where set P is the set of free variables of ψ ◮ Task: Compute PMCQ P ( ψ ) := |{ I | I ⊆ P , ψ [ I ] valid }| Theorem ([FHP19]) o ( tw ) 2 2 ... 2 · 2 o ( | ϕ | ) . Unless ETH fails, there is no algorithm for #Σ ℓ running in time ���� height ℓ + 1 Proof. ◮ Argument similar to before, boils down to: 9 / 22
PMC and Tree Decompositions? Side Question: Does it get simpler eventually? #Σ ℓ : “PMC” for QBFs ◮ Given: QBF ψ = ∃ X 1 . ∀ X 2 . . . . QX ℓ .ϕ , where set P is the set of free variables of ψ ◮ Task: Compute PMCQ P ( ψ ) := |{ I | I ⊆ P , ψ [ I ] valid }| Theorem ([FHP19]) o ( tw ) 2 2 ... 2 · 2 o ( | ϕ | ) . Unless ETH fails, there is no algorithm for #Σ ℓ running in time ���� height ℓ + 1 Proof. ◮ Argument similar to before, boils down to: o ( tw ) 2 2 ... 2 · 2 o ( | ϕ | ) ◮ Unless ETH fails, ( ℓ + 1 ) -QSAT can not be solved [FHP19] in time ���� height ℓ + 1 9 / 22
PMC and Tree Decompositions? Solving PMC using S ? Wanted ◮ PMC P ( ϕ ) := |{ I ∩ P | I ⊆ var ( ϕ ) , I | = ϕ }| 10 / 22
PMC and Tree Decompositions? Solving PMC using S ? Wanted ◮ PMC P ( ϕ ) := |{ I ∩ P | I ⊆ var ( ϕ ) , I | = ϕ }| � “Directly” computing PMC P : too expensive 10 / 22
PMC and Tree Decompositions? Solving PMC using S ? Wanted ◮ PMC P ( ϕ ) := |{ I ∩ P | I ⊆ var ( ϕ ) , I | = ϕ }| � “Directly” computing PMC P : too expensive Approach: Compute numbers “locally” � We will still be using S 10 / 22
PMC and Tree Decompositions? Solving PMC using S ? Wanted ◮ PMC P ( ϕ ) := |{ I ∩ P | I ⊆ var ( ϕ ) , I | = ϕ }| � “Directly” computing PMC P : too expensive Approach: Compute numbers “locally” � We will still be using S PMC in three steps 1. Run algorithm DP S 10 / 22
PMC and Tree Decompositions? Solving PMC using S ? Wanted ◮ PMC P ( ϕ ) := |{ I ∩ P | I ⊆ var ( ϕ ) , I | = ϕ }| � “Directly” computing PMC P : too expensive Approach: Compute numbers “locally” � We will still be using S PMC in three steps 1. Run algorithm DP S 2. Purge non-solutions 10 / 22
PMC and Tree Decompositions? Solving PMC using S ? Wanted ◮ PMC P ( ϕ ) := |{ I ∩ P | I ⊆ var ( ϕ ) , I | = ϕ }| � “Directly” computing PMC P : too expensive Approach: Compute numbers “locally” � We will still be using S PMC in three steps 1. Run algorithm DP S 2. Purge non-solutions 3. Projected counting via DP P Step 3 requires the following: � Assign counter to a set of rows 10 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion Example: Computing pmc t given P = { x , y , z } . . . x . . . . . . 0 . . . . . . t : 0 . . . . . . 1 . . . . . . x counter . . . . . . . . . 0 1 . . . . . . . . . 1 0 3 1 . . . . . . . . . 2 0 2 . . . . . . . . . 1 3 . . . . . . . . . . . . 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion Example: Computing pmc t given P = { x , y , z } . . . x . . . . . . 0 . . . . . . t : 0 . . . . . . 1 . . . . . . x counter . . . . . . . . . 0 1 . . . . . . . . . 1 0 3 1 . . . . . . . . . 2 0 2 . . . . . . . . . 1 3 . . . . . . . . . . . . 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion Example: Computing pmc t given P = { x , y , z } . . . x . . . . . . 0 . . . . . . t : 0 . . . . . . 1 . . . . . . x counter . . . . . . . . . 0 1 . . . . . . . . . 1 0 3 1 . . . . . . . . . 2 0 2 . . . . . . . . . 1 3 . . . . . . . . . . . . 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion Example: Computing pmc t given P = { x , y , z } . . . x . . . . . . 0 . . . . . . t : 0 . . . . . . 1 . . . . . . x counter . . . . . . . . . 0 1 . . . . . . . . . 1 0 3 1 . . . . . . . . . 2 0 2 . . . . . . . . . 1 3 . . . . . . . . . . . . 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion Example: Computing pmc t given P = { x , y , z } . . . x . . . . . . 0 . . . . . . pmc t = 6 t : 0 . . . . . . 1 . . . . . . x counter . . . . . . . . . 0 1 . . . . . . . . . 1 0 3 1 . . . . . . . . . 2 0 2 . . . . . . . . . 1 3 . . . . . . . . . . . . 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion Example: Computing pmc t given P = { x , y , z } . . . x . . . . . . 0 . . . . . . pmc t = 6 − 4 ∗ t : 0 . . . . . . 1 . . . . . . x counter . . . . . . . . . 0 1 . . . . . . . . . 1 *: Counter for 1 st and 3 rd row: 1 0 3 1 . . . . . . . . . 2 0 2 . . . . . . . . . 1 3 . . . . . . . . . . . . 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Ingredients for given PMC instance ( ϕ, P ) ◮ Equivalence classes (partitioning) of table rows For rows u , v of a table: u ≡ P v ⇐ ⇒ I ( u ) ∩ P = I ( v ) ∩ P ◮ Map subsets of resulting “row classes” to a counter ◮ Maintain counters using the principle of inclusion and exclusion Example: Computing pmc t given P = { x , y , z } . . . x . . . . . . 0 . . . . . . pmc t = 6 − 4 ∗ + 1 = 3 t : 0 . . . . . . 1 . . . . . . x counter . . . . . . . . . 0 1 . . . . . . . . . 1 *: Counter for 1 st and 3 rd row: 1 0 3 1 . . . . . . . . . 2 0 2 . . . . . . . . . 1 3 . . . . . . . . . . . . 11 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Principle of Inclusion-Exclusion (PIE) for family X of finite sets X i � = | X 1 | + | X 2 | + . . . − | X 1 ∩ X 2 | + . . . + ( − 1 ) |X|− 1 · | | � X i | X i | X i ∈X X i ∈X 12 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Principle of Inclusion-Exclusion (PIE) for family X of finite sets X i � = | X 1 | + | X 2 | + . . . − | X 1 ∩ X 2 | + . . . + ( − 1 ) |X|− 1 · | | � X i | X i | X i ∈X X i ∈X � � = Σ I � { 1 ,..., |X|} ( − 1 ) | I |− 1 · | + ( − 1 ) |X|− 1 · | X i | X i | i ∈ I X i ∈X 12 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Principle of Inclusion-Exclusion (PIE) for family X of finite sets X i � � = | X 1 | + | X 2 | + . . . − | X 1 ∩ X 2 | + . . . + ( − 1 ) |X|− 1 · | | X i | X i | X i ∈X X i ∈X � �� � pmc t � � = Σ I � { 1 ,..., |X|} ( − 1 ) | I |− 1 · | + ( − 1 ) |X|− 1 · | X i | X i | i ∈ I X i ∈X 12 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Principle of Inclusion-Exclusion (PIE) for family X of finite sets X i � � = | X 1 | + | X 2 | + . . . − | X 1 ∩ X 2 | + . . . + ( − 1 ) |X|− 1 · | | X i | X i | X i ∈X X i ∈X � �� � pmc t � � = Σ I � { 1 ,..., |X|} ( − 1 ) | I |− 1 · | + ( − 1 ) |X|− 1 · | X i | X i | i ∈ I X i ∈X � �� � ipmc t 12 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Principle of Inclusion-Exclusion (PIE) for family X of finite sets X i � � = | X 1 | + | X 2 | + . . . − | X 1 ∩ X 2 | + . . . + ( − 1 ) |X|− 1 · | | X i | X i | X i ∈X X i ∈X � �� � pmc t � � = Σ I � { 1 ,..., |X|} ( − 1 ) | I |− 1 · | + ( − 1 ) |X|− 1 · | X i | X i | i ∈ I X i ∈X � �� � ipmc t 12 / 22
PMC and Tree Decompositions? Towards projection via local algorithm P Principle of Inclusion-Exclusion (PIE) for family X of finite sets X i � � = | X 1 | + | X 2 | + . . . − | X 1 ∩ X 2 | + . . . + ( − 1 ) |X|− 1 · | | X i | X i | X i ∈X X i ∈X � �� � pmc t � � = Σ I � { 1 ,..., |X|} ( − 1 ) | I |− 1 · | + ( − 1 ) |X|− 1 · | X i | X i | i ∈ I X i ∈X � �� � ipmc t Local algorithm P in more details: ◮ Only store (“counter”) ipmc t -values ◮ pmc t -values are used intermediately ◮ Generalization of PIE that – instead of cardinalities – relies on stored ipmc t -values 12 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) Mod ( ϕ ) = { { b } , { a , b } , { b , c } , { a , b , c } , { b , c , x } , { a , b , c , x } , { b , y } , { a , b , y }} PMC P ( ϕ ) = |{∅ , { x } , { y }}| = 3 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c 1 0 y a 1 1 b c b c b 1 0 0 0 1 1 1. Local algorithm S 1 0 1 1 b x c 1 0 0 b c y 1 0 1 0 0 0 1 1 1 1 0 0 b , c 1 1 0 b x a 0 0 1 1 0 0 b , c b , c 1 0 1 1 0 1 1 1 0 b , x , c b , c , y 0 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) x b c c y a 1 0 1 1 b c b c b 1 0 1 0 1. Local algorithm S 1 1 1 1 2. Purge non-solutions b x c b c y 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 b , c b x a b , c b , c 1 0 0 1 0 1 b , x , c b , c , y 1 1 0 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b x a ipmc b , c b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
PMC and Tree Decompositions? Dynamic Programming via local algorithm P for PMC P = { x , y } , ϕ =( ¬ a ∨ b ∨ x ) ∧ ( a ∨ b ) ∧ ( c ∨ ¬ x ) ∧ ( b ∨ ¬ c ) ∧ ( ¬ b ∨ ¬ c ∨ ¬ y ) b c ipmc 1 0 2 1 1 1 2 b c ipmc b c ipmc 1 0 1 0 1 2 1. Local algorithm S 1 1 1 1 2 1 1 1 2. Purge non-solutions b x c ipmc b c y ipmc 1 0 0 1 1 0 0 1 3. Solve PMC via P 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 b , c b , c b x a ipmc b , c b , c 1 0 0 1 1 1 0 1 1 b , x , c b , c , y 1 1 0 1 1 1 1 1 1 b , x , a 13 / 22
Recommend
More recommend