an exact algorithm for the boolean connectivity problem for k -cnf

33
An Exact Algorithm for the Boolean Connectivity Problem for k-CNF Kazuhisa Makino (U. of Tokyo) Suguru Tamaki (Kyoto U.) Masaki Yamamoto (Tokai U.)

Upload: olympe

Post on 22-Feb-2016

23 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

An Exact Algorithm for the Boolean Connectivity Problem for k-CNF

Kazuhisa Makino (U. of Tokyo) Suguru Tamaki (Kyoto U.)

Masaki Yamamoto (Tokai U.)

Page 2: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

(One of) Our Motivation

• Question: Can we solve generalized k-SAT in moderately exponential time?

Page 3: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

(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, …

Page 4: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

(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)

Page 5: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 6: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 7: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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]

Page 8: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

(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

Page 9: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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]

Page 10: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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)

Page 11: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 12: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 13: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 14: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 15: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 16: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 17: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 18: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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-?

Page 19: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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],…

Page 20: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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]

Page 21: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 22: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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) !

Page 23: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 24: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 25: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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)

Page 26: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

Some Properties

• Running time: (2-ck)n for some ck>0, ck depends only on k

• #(leaves of depth t) ≤ (2-ck)t

Page 27: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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’)

Page 28: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 29: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

)(

Page 30: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 31: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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

Page 32: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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)

Page 33: An Exact Algorithm  for the Boolean Connectivity Problem for  k -CNF

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 !