Compilation of CNF-formulas: upper and lower bounds Florent Capelli - - PowerPoint PPT Presentation

compilation of cnf formulas upper and lower bounds
SMART_READER_LITE
LIVE PREVIEW

Compilation of CNF-formulas: upper and lower bounds Florent Capelli - - PowerPoint PPT Presentation

Compilation of CNF-formulas: upper and lower bounds Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky Birkbeck College, University of London Dagstuhl Seminar: SAT and Interaction September 22, 2016. Florent


slide-1
SLIDE 1

Compilation of CNF-formulas: upper and lower bounds

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky

Birkbeck College, University of London

Dagstuhl Seminar: “SAT and Interaction” September 22, 2016.

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 1 / 23

slide-2
SLIDE 2

Outline of this talk

Focus on compilation of CNF-formulas into DNNF Lower bounds: does not work in general:

Theorem

If all CNF-formulas can be compiled into polynomial size DNNF then PH collapses.

Conditional result: no information on which CNF are hard In this talk: unconditional exponential lower bounds Connection with communication complexity

Upper bounds:

Algorithms based on structural restrictions of the input Generalize and unify several approaches used for #SAT

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 2 / 23

slide-3
SLIDE 3

Previously in Stefan’s talk...

DNNF are a restricted form of boolean circuits: input are literals ∨ and ∧ gates (no internal negation!) ∧-gate are decomposable: input subcircuits have disjoint variables

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 3 / 23

slide-4
SLIDE 4

Previously in Stefan’s talk...

DNNF are a restricted form of boolean circuits: input are literals ∨ and ∧ gates (no internal negation!) ∧-gate are decomposable: input subcircuits have disjoint variables More restrictive conditions: deterministic DNNF: ∨-gates verify α ∨ β such that α ∧ β ≡ ⊥ decision DNNF: ∨-gates are of the form (x ∧ α) ∨ (¬x ∧ β) structured DNNF: analog of OBDD for DNNF. The “order” is now a tree.

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 3 / 23

slide-5
SLIDE 5

Previously in Stefan’s talk...

DNNF are a restricted form of boolean circuits: input are literals ∨ and ∧ gates (no internal negation!) ∧-gate are decomposable: input subcircuits have disjoint variables More restrictive conditions: deterministic DNNF: ∨-gates verify α ∨ β such that α ∧ β ≡ ⊥ decision DNNF: ∨-gates are of the form (x ∧ α) ∨ (¬x ∧ β) structured DNNF: analog of OBDD for DNNF. The “order” is now a tree. What can we do in PTIME? Satisfiability, “smallest” solution, enumeration (polynomial delay), existential projection... Determinism: (weighted) model counting

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 3 / 23

slide-6
SLIDE 6

Connection with communication complexity

Strategy of the proof:

DNNF: “small” communication complexity + CNF with high communication complexity = lower bound!

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 4 / 23

slide-7
SLIDE 7

Connection with communication complexity

Strategy of the proof:

DNNF: “small” communication complexity + CNF with high communication complexity = lower bound!

Rectangle: notion from communication complexity

X = X1 ⊎ X2 r boolean function is a (X1, X2)-rectangle if r ≡ r1 ∧ r2 with r1 boolean function over X1, r2 boolean function over X2

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 4 / 23

slide-8
SLIDE 8

Connection with communication complexity

Strategy of the proof:

DNNF: “small” communication complexity + CNF with high communication complexity = lower bound!

Rectangle: notion from communication complexity

X = X1 ⊎ X2 r boolean function is a (X1, X2)-rectangle if r ≡ r1 ∧ r2 with r1 boolean function over X1, r2 boolean function over X2

Rectangle cover R of f boolean function over X is a set of rectangles over X s.t.: sat(f ) =

  • r∈R

sat(r) Not necessarily the same underlying partition

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 4 / 23

slide-9
SLIDE 9

Balanced rectangle

Size of a rectangle cover is not a relevant complexity measure

Any f over X has a rectangle cover of size 2: f ≡ (f [x → 0] ∧ ¬x) ∨ (f [x → 1] ∧ x) disjunction of two (X \ {x}, {x})-rectangles

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 5 / 23

slide-10
SLIDE 10

Balanced rectangle

Size of a rectangle cover is not a relevant complexity measure

Any f over X has a rectangle cover of size 2: f ≡ (f [x → 0] ∧ ¬x) ∨ (f [x → 1] ∧ x) disjunction of two (X \ {x}, {x})-rectangles

(X1, X2) balanced partition if |X|/3 ≤ |X1| ≤ 2|X|/3 What is the size of the best balanced rectangle cover of f ?

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 5 / 23

slide-11
SLIDE 11

DNNF have small complexity

DNNF have small balanced rectangle cover:

Theorem (Bova, C., Mengel, Slivovsky)

For any DNNF D, there exists a balanced rectangle cover of D of size at most |D|. Intuition (proof is more technical):

Find a ∧-gate v in D such that |X|/3 ≤ |var(Dv)| ≤ 2|X|/3 Dv is a rectangle because of decomposability and it is balanced Factorize D ≡ Dv ∨ D′ and apply induction on D′

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 6 / 23

slide-12
SLIDE 12

Proving lower bounds

[Jukna, Schnigter]: infinite family of 3-CNF having no balanced rectangle cover smaller than 2Ω(m+n) (m clauses, n variables) Thus no DNNF of size smaller than 2Ω(m+n)

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 7 / 23

slide-13
SLIDE 13

Proving lower bounds

[Jukna, Schnigter]: infinite family of 3-CNF having no balanced rectangle cover smaller than 2Ω(m+n) (m clauses, n variables) Thus no DNNF of size smaller than 2Ω(m+n) Improvement:

Theorem (Bova, C., Mengel, Slivovsky)

There exists a family of (expander) graph Gn = (Vn, En) such that: Fn =

(i,j)∈En(xi ∨ xj) has no balanced rectangle cover smaller than

2Ω(|En|+|Vn|).

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 7 / 23

slide-14
SLIDE 14

Generalizing the approach and applications

Approach can be generalized to other target language: deterministic DNNF: D covered by |D| balanced rectangles having disjoint models.

Application: bound [Sauerhoff] separates deterministic DNNF from DNNF.

structured DNNF: D covered by |D| rectangles having the same underlying partition.

Application: separate FBDD from structured DNNF.

Lower bounds on possible transformations too: Negation, conjunction of DNNF can lead to an exponential blow-up

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 8 / 23

slide-15
SLIDE 15

Tractable classes

Goal: find large classes of family of CNF that can be efficiently compiled. Target language here: deterministic DNNF as it still supports model counting in PTIME. A class of CNF C is tractable if there exists a polynomial p such that every F ∈ C can be compiled into a d-DNNF of size p(size(F)). Natural idea: use tractable classes for #SAT Structure based algorithms: algorithms using the structure of the input formula. How to model this structure?

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 9 / 23

slide-16
SLIDE 16

Incidence graph

By associating a graph to a formula:

x1 x2 x3 x4 x5 x6 x7 C1 C2 C3 C4

Figure: (x1 ∨ x2 ∨ x3) ∧ (x3 ∨ x4 ∨ ¬x5) ∧ (x1 ∨ x5 ∨ x6) ∧ (x1 ∨ ¬x3 ∨ x5 ∨ ¬x7)

slide-17
SLIDE 17

Incidence graph

By associating a graph to a formula:

x1 x2 x3 x4 x5 x6 x7 C1 C2 C3 C4

Figure: (x1 ∨ x2 ∨ x3) ∧ (x3 ∨ x4 ∨ ¬x5) ∧ (x1 ∨ x5 ∨ x6) ∧ (x1 ∨ ¬x3 ∨ x5 ∨ ¬x7)

slide-18
SLIDE 18

Hypergraph

Or a hypergraph x1 x2 x3 x4 x5 x6 x7

Figure: (x1 ∨ x2 ∨ x3) ∧ (x3 ∨ x4 ∨ ¬x5) ∧ (x1 ∨ x5 ∨ x6) ∧ (x1 ∨ ¬x3 ∨ x5 ∨ ¬x7)

slide-19
SLIDE 19

Hypergraph

Or a hypergraph x1 x2 x3 x4 x5 x6 x7 x1 x2 x3 x4 x5 x6 x7

Figure: (x1 ∨ x2 ∨ x3) ∧ (x3 ∨ x4 ∨ ¬x5) ∧ (x1 ∨ x5 ∨ x6) ∧ (x1 ∨ ¬x3 ∨ x5 ∨ ¬x7)

slide-20
SLIDE 20

Structural tractability of #SAT

γ-acyclicity disjoint branches β-acyclicity α-acyclicity PS-width Incidence MIM-width Incidence clique-width Modular inci- dent treewidth Neighborhood diversity Signed incidence clique-width Incidence treewidth Primal treewidth β-hypertreewidth Hypertreewidth PTIME or FPT (i.e. f(k) · poly(n)) XP and W[1]-hard (i.e. O(nf(k))) Intractable W[1]-hard

slide-21
SLIDE 21

Dynamic programming

All of these algorithms are very similar: Order the clauses and the variables in a tree C1 x1 C2 x2 x3 C1|{x2,x3} ∧ C2|{x1} Subformulas induced by subtrees have a “good” property Perform dynamic programming by solving #SAT on these subformulas

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 13 / 23

slide-22
SLIDE 22

Dynamic programming

All of these algorithms are very similar: Order the clauses and the variables in a tree C1 x1 C2 x2 x3 C1|{x2,x3} ∧ C2|{x1} Subformulas induced by subtrees have a “good” property Perform dynamic programming by solving #SAT on these subformulas “Good” generally means: Subformulas G ≡ G1 ∧ G2 with var(G1) ∩ var(G2) = ∅ thus #G = #G1 · #G2 Subformulas G ≡ G1 ∨ G2 with sat(G1) ∩ sat(G2) = ∅ thus #G = #G1 + #G2

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 13 / 23

slide-23
SLIDE 23

Projection Satisfiable width (PS-width)

This method is summarized by one parameter: PS-width Parameter introduced by Sæther, Telle and Vatshelle based on branch decompositions

Theorem

Given a formula F and a decomposition of F of PS-width k, one can solve #SAT in time O(k3n(n + m)) where n is the number of variables and m the number of clauses.

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 14 / 23

slide-24
SLIDE 24

Projection Satisfiable width (PS-width)

This method is summarized by one parameter: PS-width Parameter introduced by Sæther, Telle and Vatshelle based on branch decompositions

Theorem

Given a formula F and a decomposition of F of PS-width k, one can solve #SAT in time O(k3n(n + m)) where n is the number of variables and m the number of clauses. Most tractability results boil down to: C class of graph such that G ∈ C can be done in PTIME Computing small PS-width decomposition for C is in PTIME Corollary: #SAT is tractable for C. Example: given a tree decomposition of width k, we can find a decomposition of PS-width 2k.

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 14 / 23

slide-25
SLIDE 25

Projection Satisfiable width (PS-width)

Trace of STV-algorithm is a deterministic DNNF:

Theorem (Bova, C., Mengel, Slivovsky)

Given a formula F and a decomposition of F of PS-width k, one can construct a structured deterministic DNNF for F of size O(k3(n + m)). Observation: structuredness is an artefact of branch decompositions

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 15 / 23

slide-26
SLIDE 26

Compilability vs #SAT

γ-acyclicity disjoint branches β-acyclicity α-acyclicity PS-width COMPILABLE Incidence MIM-width Incidence clique-width Modular inci- dent treewidth Neighborhood diversity Signed incidence clique-width Incidence treewidth Primal treewidth β-hypertreewidth Hypertreewidth PTIME or FPT (i.e. f(k) · poly(n)) XP and W[1]-hard (i.e. O(nf(k))) Intractable W[1]-hard Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 16 / 23

slide-27
SLIDE 27

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. x

Figure: x is a β-leaf

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-28
SLIDE 28

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. 4 1 2 3

Figure: A β-acyclic hypergraph

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-29
SLIDE 29

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. 4 1 2 3

Figure: A β-acyclic hypergraph

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-30
SLIDE 30

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. 4 2 3

Figure: A β-acyclic hypergraph

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-31
SLIDE 31

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. 4 2 3

Figure: A β-acyclic hypergraph

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-32
SLIDE 32

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. 4 3

Figure: A β-acyclic hypergraph

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-33
SLIDE 33

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. 4

Figure: A β-acyclic hypergraph

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-34
SLIDE 34

β-acyclicity

Only structural result is not explained by this framework.

Definition

H is β-acyclic if one can get the empty hypergraph by iteratively removing “β-leaves”. ∅

Figure: A β-acyclic hypergraph

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 17 / 23

slide-35
SLIDE 35

SAT and β-acyclicity

SAT is easy on β-acyclic formulas: Davis-Putnam resolution in PTIME [Ordyniak, Paulusma, Szeider] Idea: follow an elimination order Indeed let x be a β-leaf let C = (x, C ′) and D = (¬x, D′) then var(C ′) ⊆ var(D′) and:

either C ′ ∨ D′ = ⊤

  • r C ′ ∨ D′ = D′

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 18 / 23

slide-36
SLIDE 36

Model counting?

And #SAT? Dynamic programming approach fails PS-width may be exponential in var(F)

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 19 / 23

slide-37
SLIDE 37

Model counting?

And #SAT? Dynamic programming approach fails PS-width may be exponential in var(F) Still, doable in PTIME! [Brault-Baron, C., Mengel]:

give weights to clauses induces a weight on F = number of models at first eliminate variable and update weights update procedure does not change the weight of F

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 19 / 23

slide-38
SLIDE 38

Model counting?

And #SAT? Dynamic programming approach fails PS-width may be exponential in var(F) Still, doable in PTIME! [Brault-Baron, C., Mengel]:

give weights to clauses induces a weight on F = number of models at first eliminate variable and update weights update procedure does not change the weight of F

Easy to prove: correction and poly number of arithmetic operations Hard to prove: binary size of the weights remains bounded

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 19 / 23

slide-39
SLIDE 39

Model counting?

And #SAT? Dynamic programming approach fails PS-width may be exponential in var(F) Still, doable in PTIME! [Brault-Baron, C., Mengel]:

give weights to clauses induces a weight on F = number of models at first eliminate variable and update weights update procedure does not change the weight of F

Easy to prove: correction and poly number of arithmetic operations Hard to prove: binary size of the weights remains bounded Trace is not a DNNF (uses division on weights)

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 19 / 23

slide-40
SLIDE 40

Compilability!

Proof of bounded size of the weights: Several multiplications of fractions actually simplifies Need to understand the structure of the hypergraph Sufficiently to actually get:

Theorem (C.)

Given a β-acyclic formula F, one can construct a decision DNNF for F of size O(nm).

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 20 / 23

slide-41
SLIDE 41

Deviation from standard technique

Construction by dynamic programming but not along a branch decomposition Can we find such an algorithm unifying β-acyclicity and bounded PS-width? Probably not: an artefact of dynamic programing on branch decomposition is structuredness:

Theorem

There exists an infinite family of β-acyclic formulas that cannot be compiled into structured DNNF of size 2Ω(n).

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 21 / 23

slide-42
SLIDE 42

Every tractable case explained by KC

γ-acyclicity disjoint branches β-acyclicity α-acyclicity PS-width Incidence MIM-width Incidence clique-width Modular inci- dent treewidth Neighborhood diversity Signed incidence clique-width Incidence treewidth Primal treewidth β-hypertreewidth Hypertreewidth PTIME or FPT (i.e. f(k) · poly(n)) XP and W[1]-hard (i.e. O(nf(k))) Intractable W[1]-hard Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 22 / 23

slide-43
SLIDE 43

Conclusion

Knowledge compilation unifies results on tractable problems for CNF-formulas (counting, enumeration, max SAT ...) But can also be used as a tool for studying algorithms and their limits

Lower bounds are hard instances for current best #SAT algorithms Methods based on branch decompositions (structured DNNF) are different from methods for β-acyclic case (unstructured decision DNNF).

Florent Capelli joint work with Simone Bova, Stefan Mengel, Friedrich Slivovsky (Birkbeck College, University of London) Compilation of CNF-formulas: upper and lower bounds 23 / 23