an exact algorithm for the boolean connectivity problem for k -cnf
DESCRIPTION
An Exact Algorithm for the Boolean Connectivity Problem for k -CNF. Kazuhisa Makino (U. of Tokyo) Suguru Tamaki (Kyoto U.) Masaki Yamamoto (Tokai U.). (One of) Our Motivation. Question: Can we solve generalized k -SAT in moderately exponential time?. (One of) Our Motivation. - PowerPoint PPT PresentationTRANSCRIPT
An Exact Algorithm for the Boolean Connectivity Problem for k-CNF
Kazuhisa Makino (U. of Tokyo) Suguru Tamaki (Kyoto U.)
Masaki Yamamoto (Tokai U.)
(One of) Our Motivation
• Question: Can we solve generalized k-SAT in moderately exponential time?
(One of) Our Motivation
• Question: Can we solve generalized k-SAT in moderately exponential time?
• Generalized: Max-SAT, #SAT, QBF-SAT, Stochastic SAT, periodic SAT, …
(One of) Our Motivation
• Question: Can we solve generalized k-SAT in moderately exponential time?
• Moderately exponential: (2-ck)n for some ck>0, ck depends only on k– n: number of variables– (2-c)n for some c>0, c independent of k, seems
impossible even for standard k-SAT (SETH)
Example: Max-k-SAT
• Task: find an assignment that maximize the number (total weight) of satisfied clauses
• Complexity: NP-hard for k≥2
• Non-trivial exact algorithm:– k=2: 1.732n [Williams, ICALP 04]– k≥3: Open– PSAPCE algorithm for k=2 is also open
Example: #k-SAT
• Task: count the number of satisfying assignments
• Complexity: #P-complete for k ≥ 2
• Non-trivial exact algorithm:– (2-ck)n for some ck>0, ck depends only on k (DPLL-
type algorithm)– PSPACE algorithm
Example: k-QBF
• Task: decide a quantified formula is true/false• Complexity: P (k=2), PSPACE-complete (k≥3)
(in PH if #alternation is bounded)
• Non-trivial exact algorithm (special case):– Σ2-k-SAT: (2-ck)n for some ck>0, ck depends only on k (by
easy reduction to standard k-SAT)– Π2-3-SAT cannot be solved in (2-c)n for any c>0, unless SAT
can be solved in (2-c’)n for some c’>0 [Calabro, Impagliazzo, Paturi]
(One of) Our Motivation
• Question: Can we solve generalized k-SAT in moderately exponential time?– (2-ck)n for some ck>0, ck depends only on k
• Yes only for #SAT and some special cases of QBF (afawk)
• Other examples?– Should be natural extension of SAT
Our Target Problem: Conn-k-SAT(The Boolean Connectivity Problem)
• Input: k-CNF formula φ– H φ : the subgraph of n-dimensional hypercube
induced by satisfying assignments of φ
• Task: decide H φ is connected or not– Empty graph (unsat case) is connected
• Complexity: P (k=2), PSPACE-complete (k ≥ 3) [Gopalan et al., ICALP 06]
Example 1
))()()(( zyxzyxzyxzyx
(0,0,0)
(1,1,0)
(0,0,1) (1,0,1)
(0,1,0)
(1,0,0)
(1,1,1)(0,1,1)
Example 1
))()()(( zyxzyxzyxzyx
(0,0,0)
(1,1,0)
(0,0,1) (1,0,1)
(0,1,0)
(1,0,0)
(1,1,1)(0,1,1)SATUNSAT
Example 1
))()()(( zyxzyxzyxzyx
(0,0,0)
(1,1,0)
(0,0,1) (1,0,1)
(0,1,0)
(1,0,0)
(1,1,1)(0,1,1)SATUNSATInduced edge
Yes, connected
Example 2
(0,0,0)
(1,1,0)
(0,0,1) (1,0,1)
(0,1,0)
(1,0,0)
(1,1,1)(0,1,1)
))()()()(( zyxzyxzyxzyxzyx
Example 2
(0,0,0)
(1,1,0)
(0,0,1) (1,0,1)
(0,1,0)
(1,0,0)
(1,1,1)(0,1,1)
))()()()(( zyxzyxzyxzyxzyx
SATUNSAT
Example 2
(0,0,0)
(1,1,0)
(0,0,1) (1,0,1)
(0,1,0)
(1,0,0)
(1,1,1)(0,1,1)
))()()()(( zyxzyxzyxzyxzyx
SATUNSATInduced edge
No, two connectedcomponents
Our Results
• Theorem: Conn-k-SAT can be solved in time (2-ck)n for some ck>0, ck depends only on k– E.g., (2-c3)=1.914
Some Remarks
• (First) non-trivial algorithm for PSPACE-complete version of k-SAT– Contrast to the hardness of Π2-3-SAT (2n-time)– (of course, hardness class and running time of
exact algorithms do not coincide)
• Exponential space algorithm– Lack of small-size (length dn for d<1) witness
Complexity of Boolean Connectivityin Schaefer’s framework
• Classification w.r.t. formula type[Gopalan et al., ICALP 06], [MTY, SAT 07]:– P: affine(linear), bijunctive(2CNF) , IHSB+, IHSB-• IHSB-/IHSB+: special case of Horn/dual-Horn
– coNP-complete: Horn/dual-Horn– coNP-complete: Non-Schaefer, tight• Schaefer={affine,bijunctive,Horn, dual-Horn}
– PSPACE-complete: Non-tight• Open: coNP-complete for Horn but not IHSB-?
Motivation for Boolean Connectivity
• Understanding the solution space of k-CNF– Solution space geometry of random k-SAT
[Achlioptas, Ricci-Tersenghi, STOC 06]– Possible solution space of k-CNF
→ Circuit lower bound, better SAT algorithm [Hastad, STOC 86], [Paturi, Pudlak, Saks, Zane, JACM 05],…
Motivation for Boolean Connectivity
• Combinatorial interests [Ekin, Hammer, Kogan, DAM 99]
• Also in graph coloring problem [Bonsma, Cereceda MFCS 07] [Cereceda, van den Heuvel, Johnson, DM 08]
Technical Details
• Our Task: Given k-CNF φ, deciede Gφ=(V,E) is connected or not– V :=SAT(φ)={x {0,1}∈ n | φ(x)=1}– E :={e=(y,z), y,z ∈ V | d(y,z)=1}• d(y,z): Hamming distance between y,z
• If Gφ given, O(|V|+|E|)-time
Naïve algorithm
• Assume V=SAT(φ) is given• Construct E by: – for each y∈V, for each z s.t. d(y,z)=1,
if φ(z)=1 then add (y,z) to E– Takes n|V|-steps
• Check G(V,E) is connected• Running time: n|V|poly(| φ |) steps• |V| can be Ω(2n) !
Main idea
• Reducing the size of V• Fact: Efficient k-SAT algorithm can enumerate
all satisfying assignments in (2-c)n time– Output may be partial assignments
(1,*,0,1,*,*,…,0) *: don’t care• Change the notion of adjacent
Simple Backtracking Algorithm )( zyx
x
z
y?
??
1x
1,0 yx
1,0,0 zyx
?)?(?
)( wvu
?)?(?
)()2()1()( knTnTnTnT
1u 1,0 vu1,0,0 wvu
Some Properties
• Recursive call stops when φ becomes SAT/UNSAT under current partial assignment
→ each leaf may be a partial assignment• Enumeration: – For any y SAT(∈ φ), there exists a leaf (partial
assignment) consistent to y– For any two leaves y,z, d(y,z)≥1
(enumerated once)
Some Properties
• Running time: (2-ck)n for some ck>0, ck depends only on k
• #(leaves of depth t) ≤ (2-ck)t
Connectivity in Reduced Graph
• V’ :={satisfying partial assignments of φ}• E’ :={e=(y,z), y,z ∈ V | d’(y,z)=1}• d’(y,z):= #{i | yi ≠ zi , yi ≠*, zi ≠*}
• Fact: G=(V,E) is connected iff so is G’=(V’,E’)
Main idea
• Construct V’ by efficient k-SAT algorithm– |V’|≤(2-ck)n for some ck
– y∈V’ may be partial assignment• How to construct E’?– Checking all neighbors?
→ y∈V’ has exponentially large #neighbors– Checking all pairs?
→ |V’|2 exceeds 2n
Main idea
• Decompose V’=U∪W– U :={y∈V’ | #* of y > t } shallow leaves– W :={y∈V’ | #* of y ≤ t } deep leaves
• • Intuition– |U| is small
→ checking all pairs: |U|2 << 2n
– y∈W has small #neighbors → checking all neighbors: |W|2t << 2n
W
WWWUUUE ofneghibor
)(
Our Algorithm (Over Simplified)
• Construct V’ by efficient k-SAT algorithm• Decompose V’:=U∪W– U:={y in V | #*(y) > t } shallow leaves– W:={y in V | #*(y) ≤ t } deep leaves
• Construct E’ by:– Checking all pairs of U– Checking all neighbors of W
• Check G’=(V’,E’) is connected
Upper bounds
• Construct V’ by (2-ck)n-time k-SAT algorithm• Construct E’ by:– Checking all pairs of U– Checking all neighbors of W
• |U| ≤(2-ck)n-t → |U|2 ≤(2-ck)2(n-t) ---(a)
• #{neighbors of W} ≤ ∑t’>t (2-ck)n-t’2t’ ---(b)
• Choosing t appropriately, (a),(b) ≤ (2-ck’)n
Conclusion
• Theorem: Conn-k-SAT can be solved in time (2-ck)n for some ck>0, ck depends only on k– c3=1.914, c4=…,
• (First) non-trivial algorithm for PSPACE-complete version of k-SAT (w.r.t n)
Future Works
• Better upper bounds for CONN-k-SAT? – (Maybe, but not the scope of our paper)
• PSPACE algorithm? (possible for Horn-formula)• Variation: ST-CONN is faster? (PSPACE-
completeness known)
Thank You !