Reconfiguration of Satisfying Assignments and Subset Sums: Easy to Find, Hard to Connect x in x in x in x y z y in z in z in F F t F F t F F t 0 y out y out z out T T T Jean Cardinal, Erik Demaine, David Eppstein, Robert Hearn, Andrew Winslow
Reconfiguration: a SAT Example
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ F) (¬F ∨ ¬F ∨ ¬F) x 2 = F x 3 = F
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ F) (¬F ∨ ¬F ∨ ¬F) x 2 = F x 3 = F ⇒ flip x 3 x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ T) (¬F ∨ ¬F ∨ ¬T) x 2 = F x 3 = T
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ F) (¬F ∨ ¬F ∨ ¬F) x 2 = F x 3 = F ⇒ flip x 3 x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ T) (¬F ∨ ¬F ∨ ¬T) x 2 = F x 3 = T ⇒ flip x 1 x 1 = T (T ∨ ¬F) ∧ ∧ (¬T ∨ F ∨ T) (¬T ∨ ¬F ∨ ¬T) x 2 = F x 3 = T
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ F) (¬F ∨ ¬F ∨ ¬F) x 2 = F x 3 = F ⇒ flip x 3 x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ T) (¬F ∨ ¬F ∨ ¬T) x 2 = F Keeping formula satisfied x 3 = T ⇒ flip x 1 x 1 = T (T ∨ ¬F) ∧ ∧ (¬T ∨ F ∨ T) (¬T ∨ ¬F ∨ ¬T) x 2 = F x 3 = T
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ F) (¬F ∨ ¬F ∨ ¬F) x 2 = F x 3 = F ⇒ ⇒ x 1 = T (T ∨ ¬T) ∧ ∧ (¬T ∨ T ∨ F) (¬T ∨ ¬F ∨ ¬F) x 2 = T x 3 = F
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) x 1 = F (F ∨ ¬F) ∧ ∧ (¬F ∨ F ∨ F) (¬F ∨ ¬F ∨ ¬F) x 2 = F x 3 = F ⇒ Impossible ⇒ x 1 = T (T ∨ ¬T) ∧ ∧ (¬T ∨ T ∨ F) (¬T ∨ ¬F ∨ ¬F) x 2 = T x 3 = F
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) FTT TTT FFT TFT FTF TTF FFF TFF
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) FTT TTT FFT TFT FTF TTF FFF TFF
Formula: (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) FFT TFT TTF FFF
Reconfiguration: a Subset Sum Example
Subset: {2, 3, 4, 5, 6, 7, 8} Target sum: 12 S = {2, 3, 7} 2 + 3 + 7 = 12
Subset: {2, 3, 4, 5, 6, 7, 8} Target sum: 12 S = {2, 3, 7} 2 + 3 + 7 = 12 ⇒ swap 2, 3 with 5 S = {5, 7} 5 + 7 = 12
Subset: {2, 3, 4, 5, 6, 7, 8} Target sum: 12 S = {2, 3, 7} 2 + 3 + 7 = 12 ⇒ swap 2, 3 with 5 S = {5, 7} 5 + 7 = 12 ⇒ swap 7 with 3, 4 5 + 3 + 4 = 12 S = {5, 3, 4}
Subset: {2, 3, 4, 5, 6, 7, 8} Target sum: 12 S = {2, 3, 7} 2 + 3 + 7 = 12 ⇒ swap 2, 3 with 5 Keeping sum S = {5, 7} 5 + 7 = 12 equal to target sum ⇒ swap 7 with 3, 4 5 + 3 + 4 = 12 S = {5, 3, 4}
Subset: {2, 3, 4, 5, 6, 7, 8} Target sum: 12 S = {2, 3, 7} 2 + 3 + 7 = 12 ⇒ swap 2, 3 with 5 Keeping sum S = {5, 7} 5 + 7 = 12 equal to target sum ⇒ swap 7 with 3, 4 5 + 3 + 4 = 12 S = {5, 3, 4} S = {2, 3, 7} 2 + 3 + 7 = 12 ⇒ ⇒ 5 + 3 + 4 = 12 S = {2, 4, 6}
Subset: {2, 3, 4, 5, 6, 7, 8} Target sum: 12 S = {2, 3, 7} 2 + 3 + 7 = 12 ⇒ swap 2, 3 with 5 Keeping sum S = {5, 7} 5 + 7 = 12 equal to target sum ⇒ swap 7 with 3, 4 5 + 3 + 4 = 12 S = {5, 3, 4} S = {2, 3, 7} 2 + 3 + 7 = 12 ⇒ Impossible ⇒ 5 + 3 + 4 = 12 S = {2, 4, 6}
3SAT Reconfiguration Problem
3SAT Reconfiguration Problem Input: • An instance of 3SAT Φ . • A satisfying assignment A of Φ . • A satisfying assignment B of Φ . Output: Whether A can be reconfigured into B.
SAT Reconfiguration Problem Input: • 3SAT formula (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) • x 1 = F, x 2 = F, x 3 = F. • x 1 = T, x 2 = F, x 3 = T. Output: Yes (can be reconfigured). Input: • 3SAT formula (x 1 ∨ ¬x 2 ) ∧ (¬x 1 ∨ x 2 ∨ x 3 ) ∧ (¬x 1 ∨ ¬x 2 ∨ ¬x 3 ) • x 1 = F, x 2 = F, x 3 = F. • x 1 = T, x 2 = T, x 3 = F. Output: No (cannot be reconfigured).
SAT Reconfiguration Problem Theorem: the 3SAT reconfiguration problem is PSPACE-complete. problems solvable in n O(1) space P NP PSPACE Corollary: some reconfigurations require exponentially many variable flips.
SAT Variants
1-in-3SAT One-in-three (1-in-3): satisfying assignment if 1 (but not 2 or 3) true literals per clause. (x 1 ∨ x 3 ∨ x 4 ) ∧ (x 2 ∨ x 2 ∨ x 4 ) ∧ (x 1 ∨ x 2 ∨ x 4 ) x 1 = F x 2 = F ∧ ∧ (F ∨ F ∨ T) (F ∨ F ∨ T) (F ∨ F ∨ T) x 3 = F satisfied satisfied satisfied x 4 = T x 1 = T x 2 = F ∧ ∧ (T ∨ F ∨ T) (F ∨ F ∨ T) (T ∨ F ∨ T) x 3 = F not satisfied satisfied not satisfied x 4 = T
SAT Reconfiguration Problems Theorem: the 2SAT reconfiguration problem is in P. [Gopalan et al. 2009] Theorem: the 1-in-3SAT reconfiguration problem is in P (always “No”). Theorem: the 3SAT reconfiguration problem is PSPACE-complete.
SAT Reconfiguration Problems Theorem: the 2SAT reconfiguration problem is in P. [Gopalan et al. 2009] Theorem: the 1-in-3SAT reconfiguration problem is in P (always “No”). Theorem: the 3SAT reconfiguration problem is PSPACE-complete. Is there a SAT variant whose: • Solving problem (“Does a satisfying assignment exist?”) is in P. • Reconfiguration problem is PSPACE-complete.
SAT Reconfiguration Problems Theorem: the 2SAT reconfiguration problem is in P. [Gopalan et al. 2009] Theorem: the 1-in-3SAT reconfiguration problem is in P (always “No”). Theorem: the 3SAT reconfiguration problem is PSPACE-complete. Is there a SAT variant whose: • Solving problem (“Does a satisfying assignment exist?”) is in P. • Reconfiguration problem is PSPACE-complete. Yes, monotone planar NAE 3SAT.
Monotone Planar NAE 3SAT Monotone: no negated variables. Planar: graph of variables and clauses is planar. Not-All-Equal (NAE): satisfying assignment if 1 or 2 (but not 3) true literals per clause.
Monotone Planar NAE 3SAT (x 1 ∨ x 2 ∨ x 4 ) ∧ (x 2 ∨ x 2 ∨ x 4 ) ∧ (x 1 ∨ x 2 ∨ x 3 )
Monotone Planar NAE 3SAT (x 1 ∨ x 2 ∨ x 4 ) ∧ (x 2 ∨ x 2 ∨ x 4 ) ∧ (x 1 ∨ x 2 ∨ x 3 ) c 1 c 2 c 3 x 1 c 1 x 2 c 2 x 3 c 3 x 4
Monotone Planar NAE 3SAT (x 1 ∨ x 2 ∨ x 4 ) ∧ (x 2 ∨ x 2 ∨ x 4 ) ∧ (x 1 ∨ x 2 ∨ x 3 ) x 1 = T x 2 = F ∧ ∧ (T ∨ F ∨ T) (F ∨ F ∨ T) (T ∨ F ∨ T) x 3 = T satisfied satisfied satisfied x 4 = T x 1 = T x 2 = T ∧ ∧ (T ∨ T ∨ F) (T ∨ T ∨ F) (T ∨ T ∨ T) x 3 = T satisfied satisfied not satisfied x 4 = F
Monotone Planar NAE 3SAT Monotone planar NAE 3SAT solving is in P [Moret 1988] Theorem: monotone planar NAE 3SAT reconfiguration is PSPACE-complete. Reduction is from non-deterministic constraint logic (NCL)
⇒ ⇒ Non-Deterministic Constraint Logic (NCL) weight 1 Each node needs incoming weight ≥ 2 weight 2
⇒ ⇒ Non-Deterministic Constraint Logic (NCL) weight 1 Each node needs incoming weight ≥ 2 weight 2
⇒ ⇒ ⇒ Non-Deterministic Constraint Logic (NCL) weight 1 Each node needs incoming weight ≥ 2 weight 2
⇒ ⇒ ⇒ Non-Deterministic Constraint Logic (NCL) weight 1 Each node needs incoming weight ≥ 2 weight 2 NCL reconfiguration is PSPACE-complete, even for: • Planar, degree-3 graphs. • Only two types of nodes: ∧ ∨ • Proved by [DH 2005]
3SAT Reconfiguration is PSPACE-hard Create a variable for orientation of each edge. Create a clause set for each node. x x ≅ ≅ (x ∨ y ∨ z) (x ∨ y) ∧ (x ∨ z) ∨ ∧ y z y z (¬x 1 ∨ ¬x 2 ∨ ¬x 5 ) x 4 x 2 ∧ (x 1 ∨ x 2 ) ∧ (x 1 ∨ x 4 ) x 6 ≅ x 1 ∧ (x 3 ∨ ¬x 2 ) ∧ (x 3 ∨ x 6 ) x 3 ∧ (x 5 ∨ ¬x 4 ) ∧ (x 5 ∨ ¬x 6 ) x 5
Theorem: monotone planar NAE 3SAT reconfiguration is PSPACE-complete. Reduction is from non-deterministic constraint logic (NCL). x z ≅ ∨ (x ∨ F ∨ c) ∧ (a ∨ b ∨ c) ∧ (a ∨ y ∨ F) ∧ (b ∨ z ∨ F) y x z ≅ ∨ (x ∨ y ∨ F) ∧ (x ∨ z ∨ F) y
Other easy-to-solve, hard-to-connect problems
⇒ ⇒ ⇒ ⇒ ⇒ Easy-to-Solve Hard-to-Connect Problems Reconfiguring planar graph 4-colorings. [Bonsma, Cerceda 2009] Reconfiguring shortest paths. [Bonsma 2013] s t s t s t
Subset Sum Unary Input Two options for subset sum reconfiguration: 1. Swap x, y and x+y, keep target sum. 2. Add/remove x, keep sum in target range. Option 2 Option 1 S = {2, 3, 7} S = {2, 3, 7} ⇒ ⇒ remove 2 swap 2, 3 with 5 S = {3, 7} S = {5, 7} ⇒ ⇒ add 4 swap 7 with 3, 4 S = {3, 4, 7} S = {5, 3, 4}
Subset Sum Unary Input Two options for subset sum reconfiguration: 1. Swap x, y and x+y, keep target sum. 2. Add/remove x, keep sum in target range. Option 2 Option 1 S = {2, 3, 7} S = {2, 3, 7} ⇒ ⇒ NP-hard remove 2 swap 2, 3 with 5 [Ito, Demaine 2014] S = {3, 7} S = {5, 7} ⇒ ⇒ add 4 swap 7 with 3, 4 S = {3, 4, 7} S = {5, 3, 4}
Recommend
More recommend