logic is everywhere Truth Tables la l ogica est a por todas - - PowerPoint PPT Presentation

logic is everywhere
SMART_READER_LITE
LIVE PREVIEW

logic is everywhere Truth Tables la l ogica est a por todas - - PowerPoint PPT Presentation

Hikmat har Jaga Hai Systematic Search logika je svuda Steffen H olldobler Mantk her yerde International Center for Computational Logic logika je v sude Technische


slide-1
SLIDE 1

logika je vˇ sude

logic is everywhere

logika je svuda Logika ada di mana-mana

Hikmat har Jaga Hai a l´

  • gica est´

a em toda parte

Logik ist ¨ uberall

la logique est partout

Mantık her yerde la logica ` e dappertutto

la l´

  • gica est´

a por todas partes

Logica este peste tot

  • Systematic Search

Steffen H¨

  • lldobler

International Center for Computational Logic Technische Universit¨ at Dresden Germany

◮ Truth Tables ◮ Semantic Trees ◮ DPLL ◮ DPLL-NB ◮ DPLL-CDBL ◮ Generic DPLL

Steffen H¨

  • lldobler

Systematic Search 1

slide-2
SLIDE 2

Truth Tables

◮ How can we compute the value of a formula F under all possible interpretations? ◮ Computing a truth table 1 Let m = |S(F )| be the number of subformulae of F . 2 Let RF = {A | A ∈ R and A ∈ S(F )} and n = |RF | be the number of propositional variables occurring in F . 3 Form a table TT(F ) with 2n rows and m columns, where the first n columns are marked by the elements of RF , the last column is marked by F , and the remaining columns are marked by the other subformulas of F . 4 Fill in the first n columns with ⊤ and ⊥ as follows: In the first column fill in alternating downwards ⊤⊥⊤⊥ . . ., in the second column ⊤⊤⊥⊥ . . ., in the third column ⊤⊤⊤⊤⊥⊥⊥⊥ . . . , etc. 5 Calculate the values in the remaining columns using the known functions on the set of truth values.

Steffen H¨

  • lldobler

Systematic Search 2

slide-3
SLIDE 3

Some Details

◮ For a row ζ in TT(F ) we denote by ζ(G) the truth value in the column marked by the formula G ∈ S(F ). ◮ With this, step 5 can be reformulated as follows: 5 For each row ζ in TT(F ) and for all F ◦ G, ¬F ∈ S(F )\RF calculate: ζ(F ◦ G) = ζ(F ) ◦∗ ζ(G) and ζ(¬F ) = ¬∗ζ(F ).

Steffen H¨

  • lldobler

Systematic Search 3

slide-4
SLIDE 4

Some Observations

◮ Let I be an interpretation, F a formula, RF the set of variables occurring in F and n = |RF |. ◮ If we fix AI for all A ∈ RF , then F I is uniquely determined. ◮ There are exactly 2n different possibilities of assigning truth values to RF . ◮ Each row in TT(F ) corresponds precisely to one of these possibilities. ◮ For each interpretation I of the language L(R) exists exactly one row ζI in TT(F ) with GI = ζI(G) for all G ∈ S(F ). ◮ For every row ζ in TT(F ) exists an interpretation I of the language L(R) with GI = ζ(G) for all G ∈ S(F ). ⊲ I is not uniquely determined.

Steffen H¨

  • lldobler

Systematic Search 4

slide-5
SLIDE 5

Determining Satisfiability using Truth Tables

◮ F is satisfiable iff TT(F ) contains a row ζ with ζ(F ) = ⊤. ◮ F is unsatisfiable iff for all rows ζ in TT(F ) we find ζ(F ) = ⊥. ◮ F is valid iff for all rows ζ in TT(F ) we find ζ(F ) = ⊤. ◮ F is falsifiable iff TT(F ) contains a row ζ with ζ(F ) = ⊥.

Steffen H¨

  • lldobler

Systematic Search 5

slide-6
SLIDE 6

Semantic Trees – Main Characteristics

◮ Optimization of the truth table method. ◮ Stepwise partitioning of interpretations (through branching). ◮ Usually conceived for formulas in clausal form. ◮ Notatation In the sequel nodes are (labeled by) expressions of the form F ::J, where ⊲ F is a formula and ⊲ J is either a partial interpretation for F , SAT or CONFLICT with the following informal meaning: ⊲ If J is a partial interpretation, then F |J is the “remaining” SAT-problem. ⊲ If J is SAT or CONFLICT, then F |J is undefined. ⊲ F ::J has successor F ::SAT iff J | = F (iff F |J = ). ⊲ F ::J has successor F ::CONFLICT iff J | = F (iff [ ] ∈ F |J).

Steffen H¨

  • lldobler

Systematic Search 6

slide-7
SLIDE 7

Semantic Trees

◮ A semantic tree for a CNF-formula F is a binary tree satisfying the following conditions: ⊲ The root node is F ::( ). ⊲ If F ::J is a node and F |J = then it has a successor node F ::SAT. ⊲ If F ::J is a node and [ ] ∈ F |J then it has a successor node F ::CONFLICT. ⊲ If F ::J is a node, [ ] ∈ F |J and A ∈ atom(F |J) then F ::J has two successor nodes F :: ˙ A, J and F :: ˙ ¬A, J. ◮ Note The conditions in the three if-statements are mutually exclusive; the corresponding rules (see next slide) do not overlap.

Steffen H¨

  • lldobler

Systematic Search 7

slide-8
SLIDE 8

The ST Calculus

◮ Given a CNF-formula F . ◮ Computations are initialized by F ::( ). ◮ The rules of the calculus are F ::J ❀SAT F ::SAT iff F |J = . F ::J ❀CONF F ::CONFLICT iff [ ] ∈ F |J. F ::J ❀SPLIT F :: ˙ A, J | F :: ˙ ¬A, J iff A ∈ atom(F |J) and [ ] ∈ F |J. ◮ SPLIT leads to branching. ◮ Computation terminates if ⊲ a node F ::SAT is reached in which case F is satisfiable or ⊲ all leaf nodes are of the form F ::CONFLICT in which case F is unsatisfiable. ◮ F ::J ❀ F ′ ::J′ iff F ::J ❀SAT F ′ ::J′ or F ::J ❀CONF F ′ ::J′ or F ::J ❀SPLIT F ′ ::J′. ◮

❀ is the reflexive and transitive closure of ❀.

Steffen H¨

  • lldobler

Systematic Search 8

slide-9
SLIDE 9

Example

◮ Let F = [2, −3], [2, 3], [−1, −2], [1, −3], [1, −2, 3] in

F ::( )

✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✮ PPPPPPPP P q

F ::(˙ 1)

❅ ❅ ❅ ❘

F ::( ˙ −1)

❅ ❅ ❅ ❘

F ::( ˙ −2, ˙ 1)

❅ ❅ ❅ ❘

F ::(˙ 2, ˙ 1)

❇ ❇ ❇ ❇ ❇ ❇ ❇ ◆

F ::CONFLICT F ::(˙ 3, ˙ −1)

✂ ✂ ✂ ✂ ✂ ✂ ✂ ✌

F ::( ˙ −3, ˙ −1)

❅ ❅ ❅ ❘

F ::(˙ 2, ˙ −3, ˙ −1)

✟ ✟ ✟ ✟ ✙

F ::( ˙ −2, ˙ −3, ˙ −1)

✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✾

F ::(˙ 3, ˙ −2, ˙ 1)

❳❳❳❳❳❳❳❳❳❳❳ ❳ ③

F ::( ˙ −3, ˙ −2, ˙ 1)

❍❍❍ ❍ ❥

◮ F is unsatisfiable.

Steffen H¨

  • lldobler

Systematic Search 9

slide-10
SLIDE 10

Another Example

◮ Let F = [2, 3], [−1, −2], [1, −3], [1, −2, 3] in

F ::( )

✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✮ PPPPPPPP P q

F ::(˙ 1)

❅ ❅ ❅ ❘

F ::( ˙ −1)

❅ ❅ ❅ ❘

F ::( ˙ −2, ˙ 1)

❅ ❅ ❅ ❘

F ::(˙ 2, ˙ 1)

❇ ❇ ❇ ❇ ❇ ❇ ❇ ◆

F ::CONFLICT F ::(˙ 3, ˙ −1)

✂ ✂ ✂ ✂ ✂ ✂ ✂ ✌

F ::( ˙ −3, ˙ −1)

❅ ❅ ❅ ❘

F ::(˙ 2, ˙ −3, ˙ −1)

✟ ✟ ✟ ✟ ✙

F ::( ˙ −2, ˙ −3, ˙ −1)

✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✾

F ::(˙ 3, ˙ −2, ˙ 1)

F ::SAT F ::( ˙ −3, ˙ −2, ˙ 1)

❍❍❍ ❍ ❥

◮ (3, −2, 1) | = F .

Steffen H¨

  • lldobler

Systematic Search 10

slide-11
SLIDE 11

Abstract Reduction Systems

◮ The ST calculus is an abstract reduction system (see e.g. Baader, Nipkow: Term Rewriting and All That. Cambridge University Press: 1998). ◮ An abstract reduction system (R, →) is said to be ⊲ terminating iff there is no infinite descending chain t0 → t1 → . . ., ⊲ confluent iff t1 ←∗ t →∗ t2 implies (∃t′) t1 →∗ t′ ←∗ t2, ⊲ locally confluent iff t1 ← t → t2 implies (∃t′) t1 →∗ t′ ←∗ t2, ⊲ convergent (or canonical) iff is is terminating and confluent. ◮ Newman’s Lemma A terminating relation is confluent if it is locally confluent. (Newman: On theories with a combinatorial definition of ’equivalence’. Annals of Mathematics 43(2), 223-243: 1942)

Steffen H¨

  • lldobler

Systematic Search 11

slide-12
SLIDE 12

ST Termination

◮ Theorem ST is terminating. ◮ Proof (sketch) ⊲ SAT, CONF and SPLIT do not overlap, i.e., at most one of these rules is applicable to a node F ::J. ⊲ If SAT or CONFLICT are applied then their only successor nodes F ::SAT and F ::CONFLICT are irreducible. ⊲ We turn to SPLIT: ◮ ◮ atom(F ) is finite. ◮ ◮ SPLIT is applied to F ::J yielding two successor nodes F :: ˙ A, J and F :: ˙ ¬A, J if A ∈ atom(F |J). ◮ ◮ A ∈ atom(F |( ˙

A,J)) and A ∈ atom(F |( ˙ ¬A,J)).

◮ ◮ There are no infinite sequences of SPLIT. qed

Steffen H¨

  • lldobler

Systematic Search 12

slide-13
SLIDE 13

ST Confluency

◮ Proposition ST is confluent. ◮ Proof Because ST is terminating and, thus, Newman’s Lemma is applicable, it suffices to show that ST is locally confluent. ⊲ Because ❀SAT, ❀CONF and ❀SPLIT do not overlap, the only possible overlap is between two different instance of ❀SPLIT applicable to some node F ::J. ⊲ Let F ::A, J | F ::¬A, J and F ::B, J | F ::¬B, J, A = B, be the respective extensions of F ::J. ⊲ Because B ∈ atom(F|A,J) ∩ atom(F|¬A,J) ❀SPLIT “on B” can be applied to F ::A, J and F ::¬A, J yielding F ::B, A, J | F ::¬B, A, J | F ::B, ¬A, J | F ::¬B, ¬A, J. ⊲ Because A ∈ atom(F|B,J) ∩ atom(F|¬B,J) ❀SPLIT “on A” can be applied to F ::B, J and F ::¬B, J yielding F ::A, B, J | F ::¬A, B, J | F ::A, ¬B, J | F ::¬A, ¬B, J. ⊲ The result follows from the fact that in partial interpretations literals can be swapped. qed

Steffen H¨

  • lldobler

Systematic Search 13

slide-14
SLIDE 14

A Comment

◮ [ ] ∈ F |J may be omitted ⊲ in the last condition of the definition of a semantic tree and, consequently, ⊲ in the definition of SPLIT. ◮ Hence, ⊲ CONF and SPLIT overlap. ⊲ However, ST is still confluent. Exercise ⊲ One can show that CONF is a simplification rule. ⊲ Thus, CONF should always be applied first and no alternatives need to be considered.

Steffen H¨

  • lldobler

Systematic Search 14

slide-15
SLIDE 15

ST Soundness

◮ Lemma F |J is satisfiable and F ::J ❀SPLIT F :: ˙ A, J | F :: ˙ ¬A, J iff either F |( ˙

A,J) or F |( ˙ ¬A,J) is satisfiable.

◮ Proof Exercise ◮ Theorem ST is sound. ◮ Proof (sketch) ⊲ To show: if F ::( )

❀ F ::SAT then the CNF-formula F is satisfiable. ⊲ Suppose F ::( )

❀ F ::SAT. ⊲ F ::SAT is generated iff its parent node is F ::J and F |J = . ⊲ is satisfiable. ⊲ By induction on the length of the given derivation and using the above mentioned lemma we can show that F is satisfiable. qed ◮ Exercise Complete the proof of the Theorem.

Steffen H¨

  • lldobler

Systematic Search 15

slide-16
SLIDE 16

ST Completeness

◮ Theorem ST is complete. ◮ Proof (sketch) ⊲ To show: if a CNF-formula F is satisfiable, then F ::( )

❀ F ::SAT. ⊲ Suppose F ::( )

❀ F ::SAT. ⊲ Because ST is terminating, all leaf nodes are of the form F ::CONFLICT. ⊲ For all leaf nodes we find J such that F ::J ❀CONF F ::CONFLICT and [ ] ∈ F |J. ⊲ From the lemma on the previous slide we learn: if F |( ˙

L,J) and F |( ˙ L,J) are unsatisfiable then F |J is unsatisfiable.

⊲ Hence, by induction we learn that F = F |( ) is unsatisfiable. qed

Steffen H¨

  • lldobler

Systematic Search 16

slide-17
SLIDE 17

Relationship to the Truth Table Method

◮ Each branch of a semantic tree corresponds to rows in the truth table. ◮ Different branches correspond to different rows in the truth table. ◮ Advantage over the truth table method: leaf nodes F ::CONFLICT and F ::SAT may be reached even if not all members of atom(F ) have been assigned to truth values.

Steffen H¨

  • lldobler

Systematic Search 17

slide-18
SLIDE 18

Controlling the Generation of Semantic Trees

◮ Which leaf node F ::J shall be selected? ◮ Which atom A shall be selected in an application of SPLIT? ◮ Which branch shall be investigated first in an application of SPLIT? ◮ What about redundancies?

Steffen H¨

  • lldobler

Systematic Search 18

slide-19
SLIDE 19

DPLL

◮ This section is based on ⊲ (Davis, Putnam: A Computing Procedure for Quantification Theorem. Journal of the ACM 7, 201-215: 1960), ⊲ (Davis, Logemann, Loveland: A Machine Program for Theorem Proving. Communications of the ACM 5, 394-397: 1962). ◮ DPLL is an acronym for the authors. ◮ The DPLL method was originally specified to show unsatisfiability. ◮ Here, we present a version for showing satisfiability leading to an improved algorithm for the generation of semantic trees. ◮ We consider clauses as sets. ⊲ There are no multiple occurrences of literals in a clause. ⊲ An implementation has to guarantee this!

Steffen H¨

  • lldobler

Systematic Search 19

slide-20
SLIDE 20

Simplification Rules

◮ Consider a CNF-formula F . ◮ Consider rules which yield F ′ such that F ′ ≡ F and F ′ is “simpler” than F . ◮ Such rules can be applied at any time. ◮ They are often called simplification rules. ◮ Here TAUT and SUBS.

Steffen H¨

  • lldobler

Systematic Search 20

slide-21
SLIDE 21

TAUT: Tautological Clauses

◮ Definition A clause is a tautology iff it contains a complementary pair of literals. ◮ Proposition Tautologies can be deleted while preserving semantic equivalence, i.e., F, C ≡ F if C is a tautology. [1, −2, 2, 3, 4, −7], [5, −6] ≡ [5, −6] ◮ F, C ::J ❀TAUT F ::J iff C is a tautology. ◮ Applicable ⊲ in the initialization phase, ⊲ whenever a new clause is generated, e.g., by resolution.

Steffen H¨

  • lldobler

Systematic Search 21

slide-22
SLIDE 22

SUBS: Subsumption

◮ Definition C1 subsumes C2 iff C1 ⊆ C2. ◮ Proposition Subsumed clauses can be deleted while preserving semantic equivalence, i.e., F, C ≡ F if there exists C′ ∈ F with C′ ⊆ C. [2, −3], [−2], [1, 2, −3, −4] ≡ [2, −3], [−2] ◮ F, C ::J ❀SUBS F ::J iff there exists C′ ∈ F such that C′ ⊆ C. ◮ Applicable ⊲ in the initialization phase, ⊲ whenever a new clause is generated, e.g., by resolution, ◮ Some Questions ⊲ How complex is the removal of subsumed clauses? ⊲ Are there forms of subsumption which are less costly?

Steffen H¨

  • lldobler

Systematic Search 22

slide-23
SLIDE 23

Remaining Rules

◮ SAT, SPLIT and CONFLICT as in the ST calculus. ◮ UNIT as a special variant of SPLIT. ◮ PURE

Steffen H¨

  • lldobler

Systematic Search 23

slide-24
SLIDE 24

UNIT

◮ Let F ::J be a node in the computation of a semantic tree for F . ◮ Suppose SPLIT was applied yielding the new nodes F :: ˙ L, J and F :: ˙ L, J. ⊲ If [L] ∈ F |J then [ ] ∈ F |( ˙

L,J) and, thus, F :: ˙

L, J ❀CONF F ::CONFLICT. ⊲ If [L] ∈ F |J then [ ] ∈ F |( ˙

L,J) and, thus, F :: ˙

L, J ❀CONF F ::CONFLICT. ◮ Hence, unit clauses should eagerly trigger SPLITs. ◮ F ::J ❀UNIT F ::L, J if [L] ∈ F |J. ◮ L is a propagation variable. ◮ Applicable ⊲ in the initialization phase, ⊲ whenever a new clause is generated, e.g., by resolution, ⊲ whenever literals are deleted from a clause, e.g., by UNIT, ◮ Remark How complex is the application of UNIT?

Steffen H¨

  • lldobler

Systematic Search 24

slide-25
SLIDE 25

PURE

◮ Definition A literal L ∈ lit(F ) is pure iff L ∈ lit(F ). ◮ Clauses containing a pure L are satisfied by any interpretation containing L. ◮ Interpretations containing L need not be considered. ◮ F ::J ❀PURE F ::L, J iff there exists L ∈ lit(F |J) which is pure in F |J. ◮ L is a propagation variable. ◮ Applicable ⊲ in the initialization phase, ⊲ whenever clauses have been deleted, e.g., by SUBS.

Steffen H¨

  • lldobler

Systematic Search 25

slide-26
SLIDE 26

An Example

[1, 2], [2, −3], [1, 2, −3], [1, 4, −4], [−2, −3, 4], [−1, 3], [−4]::( )

SUBS [1, 2], [2, −3], [1, 4, −4], [−2, −3, 4], [−1, 3], [−4]::( )

TAUT F ::( ) where F = [1, 2], [2, −3], [−2, −3, 4], [−1, 3], [−4] F ::(−4) F ::(1, −4) F ::(3, 1, −4) F ::(2, 3, 1, −4) F ::CONFLICT F ::(−1, −4) F ::(2, −1, −4) F ::(−3, 2, −1, −4) F ::SAT

UNIT

UNIT

UNIT

UNIT

UNIT

✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✾ ❳❳❳❳❳❳❳❳❳❳❳ ❳ ③

SPLIT

CONF

SAT Steffen H¨

  • lldobler

Systematic Search 26

slide-27
SLIDE 27

The DPLL Calculus

◮ Given a CNF-formula F . ◮ The computation is initialized by F ::( ). ◮ The rules of the calculus are SAT, CONFLICT, SPLIT, TAUT, SUBS, UNIT and PURE. ◮ Computation terminates if ⊲ a node F ′ ::SAT is reached in which case F is satisfiable or ⊲ all leaf nodes are of the form F ′ ::CONFLICT in which case F is unsatisfiable. ◮ Note ⊲ TAUT and SUBS may still be applicable to F ′ ::SAT and F ′ ::CONFLICT. ⊲ However, TAUT and SUBS can only be applied finitely many times because in each application a clause from F ′ is removed and F ′ is finite.

Steffen H¨

  • lldobler

Systematic Search 27

slide-28
SLIDE 28

Simplification Rules Revisited

◮ Proposition UNIT and PURE are simplification rules. ◮ Proof (sketch) ⊲ Suppose F ::J ❀UNIT F ::L, J. Then, F |J is satisfiable iff F |L,J is satisfiable. ⊲ Suppose F ::J ❀PURE F ::L, J. Then, F |J is satisfiable iff F |L,J is satisfiable. qed ◮ Exercise Proof both claims. ◮ Note Whenever UNIT or PURE is applied to F ::J yielding F ::L, J then ⊲ L ∈ lit(F |L,J) and ⊲ lit(F |L,J) ∪ {L} ⊆ lit(F |J).

Steffen H¨

  • lldobler

Systematic Search 28

slide-29
SLIDE 29

DPLL Termination

◮ Theorem DPLL is terminating. ◮ Proof (sketch) The theorem follows from the following observations: ⊲ SAT: the node cannot be further extended. ⊲ CONFLICT: the node cannot be further extended. ⊲ TAUT: the number of clauses occurring in F decreases. ⊲ SUBS: the number of clauses occurring in F decreases. ⊲ UNIT: the number of literals occurring in F |J decreases. ⊲ PURE: the number of literals occurring in F |J decreases. ⊲ SPLIT: the number of atoms occurring in F |J decreases. qed ◮ Exercise Complete the proof.

Steffen H¨

  • lldobler

Systematic Search 29

slide-30
SLIDE 30

DPLL Confluency

◮ Theorem DPLL is confluent. ◮ Proof Follows from the corresponding result of the GENERIC-DPLL calculus. ◮ Some Consequences ⊲ The inference rules can be applied in any order. ⊲ Starting with F ::() we can first apply TAUT and SUBS as often as possible. ⊲ Thereafter, TAUT and SUBS will not be applicable anymore. ⊲ We delay applications of SPLIT as long as possible, i.e., if TAUT and SUBS are no longer applicable, we apply PURE and UNIT eagerly.

Steffen H¨

  • lldobler

Systematic Search 30

slide-31
SLIDE 31

DPLL Soundness

◮ Theorem DPLL is sound. ◮ Proof Follows from the corresponding result of the GENERIC-DPLL calculus.

Steffen H¨

  • lldobler

Systematic Search 31

slide-32
SLIDE 32

DPLL Completeness

◮ Theorem DPLL is complete. ◮ Proof (sketch) The proof is in analogy to the proof of the completeness of the ST calculus. ⊲ Recall that TAUT, SUBS, PURE, and UNIT are simplification rules. ⊲ Hence, if F ::J ❀ F ′ ::J′, where ❀ ∈ {❀TAUT, ❀UNIT, ❀SUBS, ❀PURE}, then the following holds: If F ′|J′ is unsatisfiable, so is F |J. ⊲ The remaining steps are similar to those in the proof of the completeness of the ST calculus except that between two SPLITS simplification rules are applied qed ◮ Exercise Complete the proof.

Steffen H¨

  • lldobler

Systematic Search 32

slide-33
SLIDE 33

Naive Backtracking

◮ Both, the ST and the DPLL calculus are branching due to SPLIT. ◮ We would like to linearize DPLL and, thereby, ST. ◮ TAUT and SUBS simplify the formula, SAT is a termination rule. ◮ UNIT and PURE are simplification rules adding propagation literals. ◮ SPLIT is replaced by ⊲ F ::J ❀DECIDE F :: ˙ L, J iff [ ] ∈ F |J and L ∈ atom(F |J) ∪ atom(F |J). ◮ If [ ] ∈ F |J then J may or may not contain decision literals. ⊲ F ::J ❀UNSAT F ::UNSAT iff [ ] ∈ F |J and J does not contain a decision literal. ⊲ F ::P, ˙ L, J ❀NB F ::L, J iff [ ] ∈ F |P,L,J, ◮ ◮ Remember P is a sequence of propagation literals. ⊲ ⊲ ˙ L is the decision literal with the highest level in P, ˙ L, J. ◮ ◮ Note L is a propagation literal! ◮ NB is called naive backtracking.

Steffen H¨

  • lldobler

Systematic Search 33

slide-34
SLIDE 34

A Note on PURE

◮ Each application of PURE can be replaced by DECIDE, in which case the pure literal L used by PURE becomes a decision literal. ◮ In most of the literature and almost all systems PURE is not considered. ◮ I would like to keep it in the moment as I do not fully understand why an implementation of PURE is so costly

  • r why a particular result is affected by PURE.

◮ If, however, one of the methods and techniques presented in the sequel causes a problem due to the fact that PURE adds L as a propagation literal to the current partial interpretation then PURE shall be replaced by DECIDE.

Steffen H¨

  • lldobler

Systematic Search 34

slide-35
SLIDE 35

The Previous Example Revisited

[1, 2], [2, −3], [1, 2, −3], [1, 4, −4], [−2, −3, 4], [−1, 3], [−4]::( ) ❀SUBS [1, 2], [2, −3][1, 4, −4], [−2, −3, 4], [−1, 3], [−4]::( ) ❀TAUT F ::( ) where F = [1, 2], [2, −3], [−2, −3, 4], [−1, 3], [−4] ❀UNIT F ::(−4) (F |(−4) = [1, 2], [2, −3], [−2, −3], [−1, 3]) ❀DECIDE F ::(˙ 1, −4) (F |(1,−4) = [2, −3], [−2, −3], [3]) ❀UNIT F ::(3, ˙ 1, −4) (F |(3,1,−4) = [2], [−2]) ❀UNIT F ::(2, 3, ˙ 1, −4) (F |(2,3,1,−4) = [ ]) ❀NB F ::(−1, −4) (F |(−1,−4) = [2], [2, −3], [−2, −3]) ❀UNIT F ::(2, −1, −4) (F |(2,−1,−4) = [−3]) ❀UNIT F ::(−3, 2, −1, −4) (F |(−3,2,−1,−4) = ) ❀SAT F ::SAT

Steffen H¨

  • lldobler

Systematic Search 35

slide-36
SLIDE 36

Another Example Revisited

F ::( ) where F = [2, −3], [2, 3], [−1, −2], [1, −3], [1, −2, 3] ❀DECIDE F ::(˙ 1) (F |(1) = [2, −3], [2, 3], [−2]) ❀UNIT F ::(−2, ˙ 1) F |(−2,1) = [−3], [3]) ❀UNIT F ::(−3, −2, ˙ 1) (F |(−3,−2,1) = [ ]) ❀NB F ::(−1) (F |(−1) = [2, −3], [2, 3], [−3], [−2, 3]) ❀UNIT F ::(−3, −1) (F |(−3,−1) = [2], [−2]) ❀UNIT F ::(2, −3, −1) (F |(2,−3,−1) = [ ]) ❀UNSAT F ::UNSAT

Steffen H¨

  • lldobler

Systematic Search 36

slide-37
SLIDE 37

The DPLL-NB Calculus

◮ Given a CNF-formula F . ◮ The computation is initialized by F ::( ). ◮ The rules of the calculus are SAT, UNSAT, DECIDE, NB, TAUT, SUBS, UNIT and PURE. ◮ Computation terminates if ⊲ a node F ′ ::SAT is reached in which case F is satisfiable or ⊲ a node F ′ ::UNSAT is reached in which case F is unsatisfiable. ◮ Note In DPLL-NB and, in particular in F ::J, J may be a partial interpretation, SAT or UNSAT.

Steffen H¨

  • lldobler

Systematic Search 37

slide-38
SLIDE 38

Results

◮ Theorem DPLL-NB is terminating, confluent, sound and complete. ◮ Proof (sketch) ⊲ Termination, confluency and soundness follow from corresponding results for the GENERIC-DPLL calculus, which will be presented later in the lecture. ⊲ Completeness ◮ ◮ DPLL is complete; ◮ ◮ The search space is finite; ◮ ◮ NB specifies just a specific order of traversing this space. qed

Steffen H¨

  • lldobler

Systematic Search 38

slide-39
SLIDE 39

Backtracking and Redundancies (1)

F ::( ) where F = [−1, −2, −3], [−2, 4], [2, 4], [−5, 6], [−1, −5, −6], [5, 7], [−1, 5, −7], [1, 3] ❀DECIDE F ::(˙ 1) (F |(1) = [−2, −3], [−2, 4], [2, 4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀DECIDE F ::(˙ 2, ˙ 1) (F |(2,1) = [−3], [4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀UNIT F ::(−3, ˙ 2, ˙ 1) (F |(−3,2,1) = [4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀UNIT F ::(4, −3, ˙ 2, ˙ 1) (F |(4,−3,2,1) = [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀DECIDE F ::(˙ 5, 4, −3, ˙ 2, ˙ 1) (F |(5,4,−3,2,1) = [6], [−6]) ❀UNIT F ::(6, ˙ 5, 4, −3, ˙ 2, ˙ 1) (F |(6,5,4,−3,2,1) = [ ]) ❀NB F ::(−5, 4, −3, ˙ 2, ˙ 1) (F |(−5,4,−3,2,1) = [7], [−7]) ❀UNIT F ::(7, −5, 4, −3, ˙ 2, ˙ 1) (F |(7,−5,4,−3,2,1) = [ ]) ❀NB F ::(−2, ˙ 1) (F |(−2,1) = [4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀UNIT F ::(4, −2, ˙ 1) (F |(4,−2,1) = [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀DECIDE F ::(˙ 5, 4, −2, ˙ 1) (F |(5,4,−2,1) = [6], [−6]) ❀UNIT F ::(6, ˙ 5, 4, −2, ˙ 1) (F |(6,5,4,−2,1) = [ ]) ❀NB F ::(−5, 4, −2, ˙ 1) (F |(−5,4,−2,1) = [7], [−7]) ❀UNIT F ::(7, −5, 4, −2, ˙ 1) (F |(7,−5,4,−2,1) = [ ]) ❀NB F ::(−1) (F |(−1) = [−2, 4], [2, 4], [−5, 6], [5, 7], [3]) ❀UNIT F ::(3, −1) (F |(3,−1) = [−2, 4], [2, 4], [−5, 6], [5, 7]) ❀PURE F ::(7, 3, −1) (F |(7,3,−1) = [−2, 4], [2, 4], [−5, 6]) ❀PURE F ::(−5, 7, 3, −1) (F |(−5,7,3,−1) = [−2, 4], [2, 4]) ❀PURE F ::(4, −5, 7, 3, −1) (F |(4,−5,7,3,−1) = ) ❀SAT F ::SAT

Steffen H¨

  • lldobler

Systematic Search 39

slide-40
SLIDE 40

Conflict Analysis

◮ In the previous example the red steps are unnecessary! ◮ The following clauses are relevant in F ::(6, ˙ 5, 4, −3, ˙ 2, ˙ 1): C1 = [−1, −2, −3] (C1|(2,1) = [−3]) C2 = [−2, 4] (C2|(2,1) = [4]) C3 = [−5, 6] (C3|(5,4,−3,2,1)) = [6]) Subsequently, NB was initiated by C = [−1, −5, −6] (called conflict clause). ◮ We can find the following linear resolution derivation from C wrt {C1, C2, C2}: C4 = [−1, −5] (res(C, C3)) ◮ Note ⊲ 2 is not involved in the conflict at all! ⊲ Resolvents can be added while preserving semantic equivalence! ⊲ [−1, −5]|(1) = [−5].

Steffen H¨

  • lldobler

Systematic Search 40

slide-41
SLIDE 41

Backtracking and Redundancies (2)

F ::( ) where F = [−1, −2, −3], [−2, 4], [2, 4], [−5, 6], [−1, −5, −6], [5, 7], [−1, 5, −7], [1, 3] ❀DECIDE F ::(˙ 1) (F |(1) = [−2, −3], [−2, 4], [2, 4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀DECIDE F ::(˙ 2, ˙ 1) (F |(2,1) = [−3], [4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀UNIT F ::(−3, ˙ 2, ˙ 1) (F |(−3,2,1) = [4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀UNIT F ::(4, −3, ˙ 2, ˙ 1) (F |(4,−3,2,1) = [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀DECIDE F ::(˙ 5, 4, −3, ˙ 2, ˙ 1) (F |(5,4,−3,2,1) = [6], [−6]) ❀UNIT F ::(6, ˙ 5, 4, −3, ˙ 2, ˙ 1) (F |(6,5,4,−3,2,1) = [ ]) ❀CDBL F, [−1, −5]::(−5, ˙ 1) F, [−1, −5]|(−5,1) = [−2, −3], [−2, 4], [2, 4], [7], [−7] ❀UNIT F, [−1, −5]::(7, −5, ˙ 1) F, [−1, −5]|(7,−5,1) = [−2, −3], [−2, 4], [2, 4], [ ]

Steffen H¨

  • lldobler

Systematic Search 41

slide-42
SLIDE 42

Conflict Analysis (2)

◮ The following clauses are relevant in F1 ::(7, −5, ˙ 1): C1 = [5, 7] (C1|(−5,1) = [7]) C2 = [−1, −5] (C2|(1) = [−5]) ◮ The confluct clause is C = [−1, 5, −7]. ◮ We can find the following linear resolution derivation from C wrt {C1, C3}: C3 = [−1, 5] (res(C, C1)) C4 = [−1] (res(C3, C2)) ◮ Note ⊲ A unit clause can be added! ⊲ This clause should be considered at the start! ⊲ [−1] subsumes [−1, −5].

Steffen H¨

  • lldobler

Systematic Search 42

slide-43
SLIDE 43

Backtracking and Redundancies (3)

F ::( ) where F = [−1, −2, −3], [−2, 4], [2, 4], [−5, 6], [−1, −5, −6], [5, 7], [−1, 5, −7], [1, 3] ❀DECIDE F ::(˙ 1) (F |(1) = [−2, −3], [−2, 4], [2, 4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀DECIDE F ::(˙ 2, ˙ 1) (F |(2,1) = [−3], [4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀UNIT F ::(−3, ˙ 2, ˙ 1) (F |(−3,2,1) = [4], [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀UNIT F ::(4, −3, ˙ 2, ˙ 1) (F |(4,−3,2,1) = [−5, 6], [−5, −6], [5, 7], [5, −7]) ❀DECIDE F ::(˙ 5, 4, −3, ˙ 2, ˙ 1) (F |(5,4,−3,2,1) = [6], [−6]) ❀UNIT F ::(6, ˙ 5, 4, −3, ˙ 2, ˙ 1) (F |(6,5,4,−3,2,1) = [ ]) ❀CDBL F1 ::(−5, ˙ 1) F1|(−5,1) = [−2, −3], [−2, 4], [2, 4], [7], [−7] ❀UNIT F1 ::(7, −5, ˙ 1) F1|(7,−5,1) = [−2, −3], [−2, 4], [2, 4], [ ] ❀CDBL F2 ::(−1) F2|(−1) = [−2, 4], [2, 4], [−5, 6], [5, 7], [3]) ❀SUBS F3 ::(−1) F3|(−1) = [−2, 4], [2, 4], [−5, 6], [5, 7], [3]) ❀UNIT F3 ::(3, −1) (F3|(3,−1) = [−2, 4], [2, 4], [−5, 6], [5, 7]) ❀PURE F3 ::(7, 3, −1) (F3|(7,3,−1) = [−2, 4], [2, 4], [−5, 6]) ❀PURE F3 ::(−5, 7, 3, −1) (F3|(−5,7,3,−1) = [−2, 4], [2, 4]) ❀PURE F3 ::(4, −5, 7, 3, −1) (F3|(4,−5,7,3,−1) = ) ❀SAT F3 ::SAT where F1 = F, [−1, −5], F2 = [−1, −5], [−1], and F3 = F, [−1].

Steffen H¨

  • lldobler

Systematic Search 43

slide-44
SLIDE 44

Relevant Clauses

◮ Definition A clause C is relevant in F ::J iff C ∈ F and there exist I′, L, I such that I′, L, I = J and C|I = [L]. ◮ relevant(F ::J) = {C ∈ F | C is relevant in F ::J}.

Steffen H¨

  • lldobler

Systematic Search 44

slide-45
SLIDE 45

Conflict-Directed Backtracking and Learning

◮ Replace NB by conflict-directed backtracking and learning. ◮ F ::J, ˙ L, J′ ❀CDBL F, D ::L′, J′ iff ⊲ there exists C ∈ F such that C|J, ˙

L,J′ = [ ],

⊲ there is a linear resolution derivation from C to D with respect to relevant(F ::J, ˙ L, J′), ⊲ D|J′ = [L′].

Steffen H¨

  • lldobler

Systematic Search 45

slide-46
SLIDE 46

The DPLL-CDBL Calculus

◮ Given a CNF-formula F . ◮ The computation is initialized by F ::( ). ◮ The rules of the calculus are SAT, UNSAT, DECIDE, CDBL, TAUT, SUBS, UNIT and PURE. ◮ Computation terminates if ⊲ a node F ′ ::SAT is reached in which case F is satisfiable or ⊲ a node F ′ ::UNSAT is reached in which case F is unsatisfiable.

Steffen H¨

  • lldobler

Systematic Search 46

slide-47
SLIDE 47

Another Example

F ::( ) where F = [−1, 2], [−2, 3], [−4, 5], [−5, 6], [−7, 8], [−8, 9], [−3, −8, −9] ❀DECIDE F ::(˙ 1) (F |(1) = [2], [−2, 3], [−4, 5], [−5, 6], [−7, 8], [−8, 9], [−3, −8, −9]) ❀UNIT F ::(2, ˙ 1) (F |(2,1) = [3], [−4, 5], [−5, 6], [−7, 8], [−8, 9], [−3, −8, −9]) ❀UNIT F ::(3, 2, ˙ 1) (F |(3,2,1) = [−4, 5], [−5, 6], [−7, 8], [−8, 9], [−8, −9]) ❀DECIDE F ::(˙ 4, 3, 2, ˙ 1) (F |(4,3,2,1) = [5], [−5, 6], [−7, 8], [−8, 9], [−8, −9]) ❀UNIT F ::(5, ˙ 4, 3, 2, ˙ 1) (F |(5,4,3,2,1) = [6], [−7, 8], [−8, 9], [−8, −9]) ❀UNIT F ::(6, 5, ˙ 4, 3, 2, ˙ 1) (F |(6,5,4,3,2,1) = [−7, 8], [−8, 9], [−8, −9]) ❀DECIDE F ::(˙ 7, 6, 5, ˙ 4, 3, 2, ˙ 1) (F |(7,6,5,4,3,2,1) = [8], [−8, 9], [−8, −9]) ❀UNIT F ::(8, ˙ 7, 6, 5, ˙ 4, 3, 2, ˙ 1) (F |(8,7,6,5,4,3,2,1) = [9], [−9]) ❀UNIT F ::(9, 8, ˙ 7, 6, 5, ˙ 4, 3, 2, ˙ 1) (F |(9,8,7,6,5,4,3,2,1) = [ ]) ❀CDBL F1 ::(−8, 3, 2, ˙ 1) (F1|(−8,3,2,1) = [−4, 5], [−5, 6], [−7]) ❀UNIT F1 ::(−7, −8, 3, 2, ˙ 1) (F1|(−7,−8,3,2,1) = [−4, 5], [−5, 6]) ❀PURE F1 ::(−4, −7, −8, 3, 2, ˙ 1) (F1|(−4,−7,−8,3,2,1) = [−5, 6]) ❀PURE F1 ::(−5, −4, −7, −8, 3, 2, ˙ 1) (F1|(−5,−4,−7,−8,3,2,1) = ) where F1 = F, [−3, −8].

Steffen H¨

  • lldobler

Systematic Search 47

slide-48
SLIDE 48

Another Example – Conflict Analysis

◮ relevant(F ::(9, 8, ˙ 7, 6, 5, ˙ 4, 3, 2, ˙ 1)) contains of the following clauses: C1 = [−1, 2] ([−1, 2]|(1) = [2]) C2 = [−2, 3] ([−2, 3]|(2,1) = [3]) C3 = [−4, 5] ([−4, 5]|(4,3,2,1) = [5]) C4 = [−5, 6] ([−5, 6]|(5,4,3,2,1) = [6]) C5 = [−7, 8] ([−7, 8]|(7,6,5,4,3,2,1) = [8]) C6 = [−8, 9] ([−8, 9]|(8,7,6,5,4,3,2,1) = [9]) ◮ The conflict clause is C = [−3, −8, −9]. ◮ We obtain the following derivation from C wrt {Ci | 1 ≤ i ≤ 6}: C7 = [−8, −3] (res(C, C6)) C8 = [−7, −3] (res(C7, C5)) C9 = [−7, −2] (res(C9, C2)) C10 = [−7, −1] (res(C10, C1)) ◮ All derived clauses could have been added!

Steffen H¨

  • lldobler

Systematic Search 48

slide-49
SLIDE 49

Results

◮ Theorem DPLL-CDBL is terminating, confluent, sound and complete. ◮ Proof ⊲ Termination, confluency and soundness follow from corresponding results for the GENERIC-DPLL calculus, which will be presented later in the lecture. ⊲ Completeness: to do.

Steffen H¨

  • lldobler

Systematic Search 49

slide-50
SLIDE 50

GENERIC-DPLL

◮ This section is inspired by: ⊲ (Arnold: A Linearized DPLL Calculus with Clause Learning. Preprint, Universit¨ at Potsdam, Institut f¨ ur Informatik: 2009).

Steffen H¨

  • lldobler

Systematic Search 50

slide-51
SLIDE 51

The Rules of the GENERIC-DPLL Calculus

F ::J ❀SAT SAT iff F |J = . F ::J ❀UNSAT UNSAT iff [ ] ∈ F |J and J does not contain a decision variable. F ::J ❀UNIT F ::L, J iff [L] ∈ F |J. F ::J ❀DECIDE F :: ˙ L, J iff L ∈ atom(F |J) ∪ atom(F |J). F ::J ❀LEARN F, C ::J iff there exists C such that F | = C and C ⊆ lit(F ). F, C ::J ❀DELETE F ::J iff F | = C. F ::J′, ˙ L, J ❀BACK F ::L′, J iff there exists C ∈ F and L′ ∈ C such that C|J = [L′ ]. F ::J ❀RESTART F ::( )

Steffen H¨

  • lldobler

Systematic Search 51

slide-52
SLIDE 52

Some Remarks

◮ Please observe the (minor) change of the SAT and UNSAT rules. ◮ PURE is not among the rules of GENERIC-DPLL. ◮ No rules are applicable to SAT or UNSAT. ◮ DELETE subsumes TAUT as well as SUBS. ◮ DECIDE differs from the DECIDE defined by Arnold. ⊲ Here we assume that L ∈ atom(F |J) ∪ atom(F |J), whereas Arnold requires that L ∈ lit(F |J). ⊲ Some systems are instances of our GENERIC-DPLL but not of Arnold’s. ⊲ We have added RESTART to the GENERIC-DPLL. ◮ Let ❀G denote an inference rule of GENERIC-DPLL.

Steffen H¨

  • lldobler

Systematic Search 52

slide-53
SLIDE 53

Semantic Equivalences

◮ Proposition 1 If F ::J ❀G F ′ ::J′ then F ≡ F ′. ◮ Proof ⊲ G ∈ {UNIT, DECIDE, BACK, RESTART} F = F ′; hence, F ≡ F ′ . ⊲ G = LEARN F ′ = F, C and F | = C; hence, F ≡ F ′. ⊲ G = DELETE F = F ′, C and F ′ | = C; hence, F ≡ F ′. qed ◮ Proposition 2 If F ::J

n

❀G F ′ ::J′ then F ≡ F ′. ◮ Proof By induction on n Exercise ◮ Remark Both propositions hold also if we include ❀PURE.

Steffen H¨

  • lldobler

Systematic Search 53

slide-54
SLIDE 54

Propagated Literals are Logical Consequences (1)

◮ Lemma 3 If F ::()

n

❀G F ′ ::J, where J = Pk, ˙ Lk, . . . , P1, ˙ L1, P0, then F ′, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k

i=0 Pi.

◮ Proof By induction on n. ⊲ IB (n = 0) Obvious, because F ′ = F and J = (). ⊲ IH We assume that the result holds for all derivations of length less than n. ⊲ IS Suppose F ::()

n

❀G Fn ::Jn ❀G Fn+1 ::Jn+1. Let Jn = Pk, ˙ Lk, . . . , P1, ˙ L1, P0 and consider the last step: ◮ ◮ Note G = SAT and G = UNSAT. ◮ ◮ G = UNIT In this case, Fn = Fn+1, [Ln] ∈ Fn|Jn, and Jn+1 = Ln, Jn. ⊲ ⊲ From IH we learn Fn, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k

i=0 Pi.

⊲ ⊲ Any model I of Fn with I ⊇ Jn must contain Ln. ⊲ ⊲ Hence, Fn, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k+1

i=0 Pi, where Pk+1 = Ln.

⊲ ⊲ Because Fn = Fn+1 we conclude Fn+1, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k+1

i=0 Pi, where Pk+1 = Ln. Steffen H¨

  • lldobler

Systematic Search 54

slide-55
SLIDE 55

Propagated Literals are Logical Consequences (2)

◮ Lemma 3 If F ::()

n

❀G F ′ ::J, where J = Pk, ˙ Lk, . . . , P1, ˙ L1, P0, then F ′, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k

i=0 Pi.

◮ Proof By induction on n. ⊲ IB (n = 0) Obvious, because F ′ = F and J = (). ⊲ IH We assume that the result holds for all derivations of length less than n. ⊲ IS Suppose F ::()

n

❀G Fn ::Jn ❀G Fn+1 ::Jn+1. Let Jn = Pk, ˙ Lk, . . . , P1, ˙ L1, P0 and consider the last step: ◮ ◮ G = DECIDE In this case, Fn = Fn+1, Jn+1 = ˙ Lk+1, Jn, and Lk+1 ∈ atom(Fn|Jn) ∪ atom(Fn|Jn). ⊲ ⊲ From IH we learn Fn, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k

i=0 Pi.

⊲ ⊲ Neither Lk+1 nor Lk+1 occurs in Jn. ⊲ ⊲ Hence, Fn, ˙ Lk+1, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k+1

i=0 Pi,

where Pk+1 is empty. ⊲ ⊲ Because Fn = Fn+1 we conclude Fn+1, ˙ Lk+1, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k+1

i=0 Pi. Steffen H¨

  • lldobler

Systematic Search 55

slide-56
SLIDE 56

Propagated Literals are Logical Consequences (3)

◮ Lemma 3 If F ::()

n

❀G F ′ ::J, where J = Pk, ˙ Lk, . . . , P1, ˙ L1, P0, then F ′, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k

i=0 Pi.

◮ Proof By induction on n. ⊲ IB (n = 0) Obvious, because F ′ = F and J = (). ⊲ IH We assume that the result holds for all derivations of length less than n. ⊲ IS Suppose F ::()

n

❀G Fn ::Jn ❀G Fn+1 ::Jn+1. Let Jn = Pk, ˙ Lk, . . . , P1, ˙ L1, P0 and consider the last step: ◮ ◮ G = LEARN In this case, Fn | = C, Fn+1 = Fn, C, and Jn+1 = Jn. ⊲ ⊲ Because Fn+1 ≡ Fn the result follows from IH. ◮ ◮ G = DELETE In this case, Fn+1 | = C, Fn = Fn+1, C, and Jn+1 = Jn. ⊲ ⊲ Because Fn+1 ≡ Fn the result follows from IH. ◮ ◮ G = RESTART In this case, Fn+1 = Fn and Jn+1 = (). ⊲ ⊲ Because Jn+1 = () the result holds immediately.

Steffen H¨

  • lldobler

Systematic Search 56

slide-57
SLIDE 57

Propagated Literals are Logical Consequences (4)

◮ Lemma 3 If F ::()

n

❀G F ′ ::J, where J = Pk, ˙ Lk, . . . , P1, ˙ L1, P0, then F ′, ˙ Lk, . . . , ˙ L1 | = L for all L ∈ k

i=0 Pi.

◮ Proof By induction on n. ⊲ IB (n = 0) Obvious, because F ′ = F and J = (). ⊲ IH We assume that the result holds for all derivations of length less than n. ⊲ IS Suppose F ::()

n

❀G Fn ::Jn ❀G Fn+1 ::Jn+1. Let Jn = Pk, ˙ Lk, . . . , P1, ˙ L1, P0 and consider the last step: ◮ ◮ G = BACK Let C ∈ Fn, L′ ∈ C, and j ≤ k s.t. C|Pj, ˙

Lj...,P1, ˙ L1,P0 = [L′].

⊲ ⊲ Hence, Jn+1 = L′, Pj, ˙ Lj . . . , P1, ˙ L1, P0 and Fn+1 = Fn. ⊲ ⊲ We find m ≤ n such that F ::()

m

❀G Fm ::Pj, ˙ Lj . . . , P1, ˙ L1, P0. ⊲ ⊲ From IH we learn Fm, ˙ Lj, . . . , ˙ L1 | = L for all L ∈ j

i=0 Pi.

⊲ ⊲ As in the case G = UNIT we conclude Fm, ˙ Lj, . . . , ˙ L1 | = L for all L ∈ {L′} ∪ j

i=0 Pi.

⊲ ⊲ From Proposition 2 we learn Fn+1 ≡ F ≡ Fm. ⊲ ⊲ Hence, Fn+1, ˙ Lj, . . . , ˙ L1 | = L for all L ∈ {L′} ∪ j

i=0 Pi.

qed

Steffen H¨

  • lldobler

Systematic Search 57

slide-58
SLIDE 58

A Remark on Lemma 3

◮ Lemma 3 does not hold for PURE. ⊲ Consider F = [1, 2]. ⊲ Then, F ::() ❀PURE ::1. ⊲ However, F | = 1. ◮ ◮ Consider I = {2}. ◮ ◮ Then, I | = F . ◮ ◮ But, I | = 1.

Steffen H¨

  • lldobler

Systematic Search 58

slide-59
SLIDE 59

Soundness wrt SAT

◮ Theorem 4 If F ::()

n

❀G SAT then F is satisfiable. ◮ Proof ⊲ SAT can only be derived from some F ′ ::J′ if F ′|J′ = . ⊲ Hence, we find a partial interpretation J′ such that J′ | = F ′. ⊲ Hence, for any interpretation I ⊇ J′ we find I | = F ′. ⊲ From Proposition 2 we learn that F ≡ F ′. ⊲ Hence, for any interpretation I ⊇ J′ we find I | = F . qed

Steffen H¨

  • lldobler

Systematic Search 59

slide-60
SLIDE 60

Soundness wrt UNSAT

◮ Theorem 5 If F ::()

n

❀G UNSAT then F is unsatisfiable. ◮ Proof ⊲ UNSAT can only be derived from some F ′ ::J′ if [ ] ∈ F ′|J′ and J′ does not contain a decision variable. ⊲ Hence, we find a partial interpretation J′ such that J′ | = F ′. ⊲ Hence, for all interpretations I ⊇ J′ we find I | = F ′. ⊲ From Lemma 3 we learn that F ′ | = L for each L ∈ J′. ⊲ Hence, F ′ is unsatisfiable. ⊲ From Proposition 2 we learn that F ≡ F ′. ⊲ Hence, F is unsatisfiable as well. qed

Steffen H¨

  • lldobler

Systematic Search 60

slide-61
SLIDE 61

Termination Analysis

◮ GENERIC-DPLL does not terminate due to ⊲ possibly infinite sequences of LEARN and DELETE, ⊲ possibly infinite sequences of RESTART, ◮ Fairness Criteria ⊲ Each clause C ⊆ lit(F ) is learned at most finitely many times. ◮ ◮ Eventually, LEARN is no longer applicable. ⊲ The number of RESTART steps is bounded. ◮ ◮ Eventually, RESTART is no longer applicable. ◮ Alternative fairness criteria are possible.

Steffen H¨

  • lldobler

Systematic Search 61

slide-62
SLIDE 62

GENERIC-DPLL-LR and Termination

◮ Let GENERIC-DPLL-LR be the calculus obtained from GENERIC-DPLL by eliminating the LEARN and the RESTART rule. ◮ Theorem 6 GENERIC-DPLL-LR is terminating. ◮ Proof (sketch) ⊲ Suppose F ::J ❀G F ′ ::J′ and let d be the highest decision level in J. ◮ ◮ G = UNIT J′ contains one more literal than J. ◮ ◮ G = DECIDE J′ contains one more literal than J. ◮ ◮ G = DELETE F ′ contains one clause less than F . ◮ ◮ G = BACK for some decision level less than d, J′ contains one literal more than J. ⊲ The initial formula F contains only finitely many clauses. ⊲ The number of literals occurring in a partial interpretation in a derivation from F ::() is bounded by |atom(F ) ∪ atom(F )|. ⊲ Hence, the length of derivations from F ::() in GENERIC-DPLL-LR is bounded. qed

Steffen H¨

  • lldobler

Systematic Search 62

slide-63
SLIDE 63

GENERIC-DPLL and Termination

◮ Exercise Complete the proof of Theorem 6. ◮ From Theorem 6 and the definition of the fairness criteria we obtain: ◮ Corollary 7 GENERIC-DPLL is terminating if the fairness criteria are observed. ◮ Exercise Suppose F ::()

❀G F ′ ::J. Show that the derivation can be extended. ◮ The only normal forms of F ::() are SAT and UNSAT.

Steffen H¨

  • lldobler

Systematic Search 63

slide-64
SLIDE 64

GENERIC-DPLL-LR and Confluency

◮ Theorem 8 GENERIC-DPLL-LR is confluent. ◮ Proof Because GENERIC-DPLL-LR is terminating and Newman’s Lemma, GENERIC-DPLL-LR is confluent if it is locally confluent. ⊲ Suppose GENERIC-DPLL-LR is not locally confluent. ⊲ Then, we find F, J, E1, E2 such that F ::J ❀ E1, F ::J ❀ E2, and there does not exist E′ such that E1

❀ E′ and E2

❀ E′. ⊲ Because GENERIC-DPLL-LR is terminating we find N1 and N2 such that N1 = N2, N1 is the normal form of E1, and N2 is the normal form of E2. ⊲ Hence, F ::J has two different normal forms N1 and N2. ⊲ Because the only possible normal forms are SAT and UNSAT and Theorems 4 and 5, F is satisfiable and unsatisfiable, which is impossible. qed

Steffen H¨

  • lldobler

Systematic Search 64

slide-65
SLIDE 65

GENERIC-DPLL and Confluency

◮ Theorem 9 GENERIC-DPLL is confluent if the fairness criteria are observed. ◮ Proof In analogy of the proof of Theorem 7.

Steffen H¨

  • lldobler

Systematic Search 65

slide-66
SLIDE 66

GENERIC-DPLL-LC and Completeness

◮ In the following we assume GENERIC-DPLL -LC. ◮ Corollary 10 If F is satisfiable, then F ::()

❀ SAT. ◮ Proof Suppose F is satisfiable, but F ::()

❀ SAT. ⊲ Because GENERIC-DPLL-LR is terminating, any derivation from F ::() must terminate. ⊲ As the only normal forms are SAT and UNSAT, it must terminate with UNSAT. ⊲ As GENERIC-DPLL-LR is sound wrt UNSAT we conclude that F is unsatisfiable. ⊲ However, this contradicts our assumption. qed ◮ Corollary 11 If F is unsatisfiable, then F ::()

❀ UNSAT. ◮ Proof In analogy to the proof of Corollary 10. ◮ Exercise Complete the proof.

Steffen H¨

  • lldobler

Systematic Search 66

slide-67
SLIDE 67

GENERIC-DPLL and Completeness

◮ In the following we assume GENERIC-DPLL together with the fairness criteria. ◮ Corollary 12 If F is satisfiable, then F ::()

❀ SAT. ◮ Corollary 13 If F is unsatisfiable, then F ::()

❀ UNSAT. ◮ Both corollaries can be proven in analogy to the proof of Corollary 10. ◮ Exercise Complete the proofs.

Steffen H¨

  • lldobler

Systematic Search 67

slide-68
SLIDE 68

Discussion

◮ Lemma 3 does not hold for PURE. ⊲ All results based on Lemma 3 do not hold if we add PURE to GENERIC-DPLL. ◮ CDBL can be simulated by LEARN and BACK.

Steffen H¨

  • lldobler

Systematic Search 68

slide-69
SLIDE 69

Conflict-Driven Backtracking and Learning Revisited

◮ Let F be a formula in CNF, L a literal, and J a partial interpretation. ◮ C ∈ F is called conflict clause under J iff C|J = [ ]. ◮ A clause C is relevant in F ::J iff C ∈ F and there exist I′, L, I such that I′, L, I = J and C|I = [L]. ◮ In the literature relevant clauses are also often called reason clauses. ◮ relevant(F ::J) = {C ∈ F | C is relevant in F ::J}. ◮ A clause C is relevant wrt L in F ::J iff C ∈ F and there exist I′, I such that I′, L, I = J and C|I = [L]. ◮ relevantL(L, F ::J) = {C ∈ F | C is relevant wrt L in F ::J}.

Steffen H¨

  • lldobler

Systematic Search 69

slide-70
SLIDE 70

An Old Example Revisited

◮ Let F = [1, 2], [2, −3], [−2, −3, 4], [−1, 3], [−4] ◮ We may obtain F ::() ❀UNIT F ::(−4) (F |(−4) = [1, 2], [2, −3], [−2, −3], [−1, 3]) ❀DECIDE F ::(˙ 1, −4) (F |(1,−4) = [2, −3], [−2, −3], [3]) ❀UNIT F ::(3, ˙ 1, −4) (F |(3,1,−4) = [2], [−2]) ❀UNIT F ::(2, 3, ˙ 1, −4) (F |(2,3,1,−4) = [ ]) ◮ We find relevant(F ::(2, 3, ˙ 1, −4)) = {[−4], [−1, 3], [2, −3], [−2, −3, 4]} relevantL(−4, F ::(2, 3, ˙ 1, −4)) = {[−4]} relevantL(3, F ::(2, 3, ˙ 1, −4)) = {[−1, 3]} relevantL(2, F ::(2, 3, ˙ 1, −4)) = {[2, −3]} relevantL(−2, F ::(2, 3, ˙ 1, −4)) = {[−2, −3, 4]} relevantL(1, F ::(2, 3, ˙ 1, −4)) = ∅

Steffen H¨

  • lldobler

Systematic Search 70

slide-71
SLIDE 71

Another Example

◮ Consider F = [−1, −3, 4], [−2, −3, 4]. ◮ We may obtain F ::() ❀DECIDE F ::(˙ 1) (F(1) = [−3, 4], [−2, −3, 4]) ❀DECIDE F ::(˙ 2, ˙ 1) (F(2,1) = [−3, 4], [−3, 4]) ❀DECIDE F ::(˙ 3, ˙ 2, ˙ 1) (F(3,2,1) = [4], [4]) ❀UNIT F ::(4, ˙ 3, ˙ 2, ˙ 1) (F(4,3,2,1) = ) ❀SAT SAT ◮ We find relevant(F ::(˙ 2, ˙ 1)) = ∅ relevant(F ::(˙ 3, ˙ 2, ˙ 1)) = {[−1, −3, 4], [−2, −3, 4]} relevantL(4, F ::(˙ 3, ˙ 2, ˙ 1)) = {[−1, −3, 4], [−2, −3, 4]}

Steffen H¨

  • lldobler

Systematic Search 71

slide-72
SLIDE 72

Implication Graphs

◮ In the sequel we assume that |relevantL(L, F ::J)| ≤ 1 for all L. ⊲ If |relevantL(L, F ::J)| > 1 for some L, then all relevant clauses wrt L except one are deleted; ⊲ Different implication graphs. ◮ Let F be a formula in CNF and J a partial interpretation. ◮ An implication graph for F ::J is a pair (V, E), where ⊲ V = J ∪ {L | relevantL(L, F ::J) = ∅} and ⊲ E = {(L, L′) | L, L′ ∈ V, (∃C) relevantL(L′, F ::J) = {C}, and L ∈ C}. ◮ It is sometimes convenient to label a vertex L by its decision level. ⊲ In our graphs the decision level of a vertex is depicted as subscript. ◮ Each (L, L′) ∈ E is directed from L to L′.

Steffen H¨

  • lldobler

Systematic Search 72

slide-73
SLIDE 73

The Implication Graph of an Old Example

◮ Let F = [1, 2], [2, 3], [2, 3, 4], [1, 3], [4] and J = (3, ˙ 1, 4). ⊲ relevantL(L, F ::J) = ∅ iff L ∈ {4, 3, 2, 2}. ⊲ V = {1, 2, 2, 3, 4} ⊲ We obtain ˙ 11 40 31 21 21 ◮ Observe V contains the complentary pair 2, −2 of literals. ◮ A conflict graph is an implication graph (V, E), where V contains a complementary pair of literals.

Steffen H¨

  • lldobler

Systematic Search 73

slide-74
SLIDE 74

A Disconnected Conflict Graph

◮ Let F = [1, 2], [1, 3], [4, 5], [4, 3] and J = (˙ 4, 3, ˙ 1). ⊲ relevantL(L, F ::J) = ∅ iff L ∈ {3, 3}. ⊲ V = {1, 3, 3, 4} ⊲ We obtain ˙ 11 31 ˙ 42 32 ◮ Observe ⊲ The graph is not connected. ⊲ Instead of deciding on ˙ 4, 4 could have been propagated.

Steffen H¨

  • lldobler

Systematic Search 74

slide-75
SLIDE 75

Extended Conflict Graphs

◮ We extend conflict graphs by adding to their set of edges undirected connections between complementary pairs of literals. ⊲ Such edges are depicted by dotted lines in our figures. ⊲ Complementary pairs of literals are connected in a conflict graph. ◮ We obtain ˙ 11 31 ˙ 42 32 ◮ Let (V, E) be a conflict graph. (V, E−) denotes the graph obtained from (V, E) by deleting all edges between complementary pairs of literals.

Steffen H¨

  • lldobler

Systematic Search 75

slide-76
SLIDE 76

An Implication Graph with Multiple Conflicts

◮ Let F = [1, 7], [1, 5], [5, 3], [5, 4], [2, 8], [2, 6], [6, 3], [6, 4]. ◮ Let J = (4, 3, 6, 5, ˙ 2, ˙ 1). ◮ We obtain ˙ 11 52 ˙ 22 62 32 42 32 42 ◮ For the time being, we restrict ourselves to conflict graphs which are ⊲ connected and ⊲ contain exactly one conflict.

Steffen H¨

  • lldobler

Systematic Search 76

slide-77
SLIDE 77

The Implication Graph of a Larger Example

◮ Suppose F consists of the following clauses C1 = [1, 5] C2 = [2, 6] C3 = [4, 6, 8] C4 = [9, 12] C5 = [13, 14] C6 = [5, 9, 11] C7 = [10, 12, 13] C8 = [2, 8, 9] C9 = [7, 9, 10] C10 = [3, 7] and let J = (14, 13, 10, 12, 11, 9, 8, ˙ 4, 7, ˙ 3, 6, ˙ 2, 5, ˙ 1). ◮ We obtain ˙ 11 ˙ 22 ˙ 44 ˙ 33 51 62 73 84 94 114 124 104 134 144

Steffen H¨

  • lldobler

Systematic Search 77

slide-78
SLIDE 78

The Conflict Graph of an even Larger Example

◮ Suppose F consists of the following clauses C1 = [1, 5] C2 = [2, 6] C3 = [4, 6, 8] C4 = [9, 12] C5 = [13, 14] C6 = [5, 9, 11] C7 = [10, 12, 13] C8 = [2, 8, 9] C9 = [7, 9, 10] C10 = [3, 7] C11 = [11, 14] and let J = (14, 13, 10, 12, 11, 9, 8, ˙ 4, 7, ˙ 3, 6, ˙ 2, 5, ˙ 1). ◮ We obtain ˙ 11 ˙ 22 ˙ 44 ˙ 33 51 144 62 73 84 94 114 124 104 134 144

Steffen H¨

  • lldobler

Systematic Search 78

slide-79
SLIDE 79

Cuts

◮ Let (V, E) be a conflict graph. ◮ Let VS be the set of all literals in V, whose decision level is 0 or which are decision literals. ◮ Let VE be the set of all complementary literals occurring in V. ◮ Let path(V, E) be the set of all directed paths from VS to VE in (V, E−). ◮ A cut (VR, VC) through (V, E) is a partition of V into VR and VC such that ⊲ VR ∩ VC = ∅, ⊲ VR ∪ VC = V, ⊲ VR ⊇ VS, ⊲ VC ⊇ VE, and ⊲ each p ∈ path(V, E) is partitioned into two subpaths pR and pC such that ◮ ◮ pR and pC have no vertex in common, ◮ ◮ p is obtained by adding an edge from the end of pR to the start of pC, ◮ ◮ VR contains all vertices occurring in pR, and ◮ ◮ VC contains all vertices occurring in pC.

Steffen H¨

  • lldobler

Systematic Search 79

slide-80
SLIDE 80

Cuts – A Simple Example

◮ The following conflict graph admits a single cut. ˙ 11 31 ˙ 42 32

Steffen H¨

  • lldobler

Systematic Search 80

slide-81
SLIDE 81

Cuts – Examples

◮ Some cuts in the conflict graph of a larger example. ˙ 11 ˙ 22 ˙ 44 ˙ 33 51 62 73 84 94 114 124 104 134 144 144 cut1 cut2 cut3

Steffen H¨

  • lldobler

Systematic Search 81

slide-82
SLIDE 82

Cut Clauses

◮ Let (VR, VC) be a cut through the conflict graph (V, E). ◮ Let (VR, ER) be the subgraph of (V, E) which consists only of the vertices VR and edges between elements of VR. ◮ Let V′

R be the subset of VR containing all vertices,

where an outgoing edge was cut by (VR, VC). ◮ The cut clause CR determined by (VR, VC) is the clause V′

R. Steffen H¨

  • lldobler

Systematic Search 82

slide-83
SLIDE 83

Cut Clauses – Examples

◮ The cut clauses determined by the cuts in the previous conflict graph. ˙ 11 ˙ 22 ˙ 44 ˙ 33 51 62 73 84 94 114 124 104 134 144 144 [1, 2, 3, 4] cut1 [5, 7, 9] cut2 [11, 13] cut3

Steffen H¨

  • lldobler

Systematic Search 83

slide-84
SLIDE 84

Cut Clauses and DPLL-CDBL

◮ Proposition Each cut clause is a learned clause in DPLL-CDBL. ◮ Example Reconsider F consisting of the following clauses C1 = [1, 5] C2 = [2, 6] C3 = [4, 6, 8] C4 = [9, 12] C5 = [13, 14] C6 = [5, 9, 11] C7 = [10, 12, 13] C8 = [2, 8, 9] C9 = [7, 9, 10] C10 = [3, 7] C11 = [11, 14] and let J = (14, 13, 10, 12, 11, 9, 8, ˙ 4, 7, ˙ 3, 6, ˙ 2, 5, ˙ 1). ⊲ The conflict clause is C11. ⊲ The relevant clauses are C1 − C10. ⊲ We obtain the following linear derivation from C11: C12 = [11, 13] (res(C11, C5)) C13 = [5, 9, 13] (res(C12, C6)) C14 = [5, 9, 10, 12] (res(C13, C7)) C15 = [5, 7, 9, 12] (res(C14, C9)) C16 = [5, 7, 9] (res(C15, C4)) . . .

Steffen H¨

  • lldobler

Systematic Search 84

slide-85
SLIDE 85

Decision Levels

◮ Let dlL be a binary function called decision level of L wrt J, which assigns to each literal occurring in J its decision level. ◮ Let dl be a unary function called decision level of J defined as dl(J) = max({dlL(L, J) | L ∈ J} ∪ {0}). ◮ Let vdl(J) ∈ V be the decision variable of dl(J).

Steffen H¨

  • lldobler

Systematic Search 85

slide-86
SLIDE 86

Unique Implication Points

◮ Let (V, E) be a conflict graph wrt F ::J. ◮ Let VE be the set of all complementary literals occurring in V. ◮ v1 ∈ V is said to dominate v2 ∈ V iff v1 is on any path from vdl(J) to v2. ◮ v ∈ V \ VE is a unique implication point (UIP) in (V, E) iff ⊲ dlL(v, J) = dl(J) and ⊲ v dominates both vertices corresponding to the conflicting variables. ◮ Different UIPs can be ordered by their distance from the conflict. ⊲ The 1UIP is the UIP which is closest to the conflicting literals. ⊲ The nUIP is the UIP which is the nth closest to the conflicting literals. ◮ The decision variable of dl(J) is always a UIP.

Steffen H¨

  • lldobler

Systematic Search 86

slide-87
SLIDE 87

UIPs – Example 1

◮ The marked nodes in the following conflict graph are UIPs. ˙ 11 ˙ 22 ˙ 44

3UIP

˙ 33 51 62 73 84

2UIP

94

1UIP

114 124 104 134 144 144

Steffen H¨

  • lldobler

Systematic Search 87

slide-88
SLIDE 88

UIPs – Example 2

◮ The marked node in the following graph is the only UIP. ˙ 11 31 ˙ 42

1UIP

32

Steffen H¨

  • lldobler

Systematic Search 88

slide-89
SLIDE 89

Asserting Clauses

◮ Let J be a (partial) interpretation. ◮ A clause C = [L, L1, . . . , Lk] is said to be asserting wrt an interpretation J iff ⊲ C|J = [], ⊲ dlL(L, J) = dl(J), and ⊲ dlL(Li, J) < dlL(L, J) for all 1 ≤ i ≤ k. ◮ L is said to be the asserting literal. ◮ max({dlL(Li, J) | 1 ≤ i ≤ k} ∪ {0}) is said to be the asserting level.

Steffen H¨

  • lldobler

Systematic Search 89

slide-90
SLIDE 90

Asserting Clauses – Example

◮ Reconsider F = [1, 2, 3], [2, 4], [2, 4], [5, 6], [1, 5, 6], [5, 7], [1, 5, 7], [1, 3]. ◮ Let J = (6, ˙ 5, 4, 3, ˙ 2, ˙ 1). ◮ Let C = [1, 5]. We obtain ⊲ dlL(1, J) = 1, ⊲ dlL(2, J) = dlL(3, J) = dlL(4, J) = 2, ⊲ dlL(5, J) = dlL(6, J) = 3, ⊲ dl(J) = 3, ⊲ C is asserting wrt J, and ⊲ Cs asserting level is 1. ◮ Let F1 = F, C. We learn ⊲ C is a conflict clause in F1 wrt J. ⊲ It contains exactly one literal with dl(J). ⊲ Backjumping wrt C removes all literal from J whose level is higher than the asserting level of C.

Steffen H¨

  • lldobler

Systematic Search 90

slide-91
SLIDE 91

The CDBL Rule Revisited

◮ Recall F ::J, ˙ L, J′ ❀CDBL F, D ::L′, J′ iff ⊲ there exists C ∈ F such that C|J, ˙

L,J′ = [ ],

⊲ there is a linear resolution derivation from C to D with respect to relevant(F ::J, ˙ L, J′), ⊲ D|J′ = [L′]. ◮ When shall a linear resolution derivation be stopped? ⊲ Different heuristics. ◮ What literals shall be selected for resolution? ⊲ Let the sequence be the sequence defined by the current partial interpretation.

Steffen H¨

  • lldobler

Systematic Search 91

slide-92
SLIDE 92

1UIP Driven Heuristics

◮ A clause D represents an UIP wrt F ::J and conflict clause C iff ⊲ there is a linear derivation from C to D wrt relevant(F ::J), ⊲ the sequence of literals resolved upon is a prefix of J, ⊲ D contains exactly one literal with level dl(J), and ⊲ D ∩ VE = ∅. ◮ A clause D represents the 1UIP wrt F ::J and conflict clause C iff ⊲ D represents a UIP wrt F ::J and conflict clause C and ⊲ the linear derivation from C to D wrt relevant(F ::J) does not contain a clause representing a UIP wrt F ::J and conflict clause C. ◮ Clauses representing UIPs are asserting clauses. ◮ Most modern SAT solvers use the 1UIP driven heuristics.

Steffen H¨

  • lldobler

Systematic Search 92

slide-93
SLIDE 93

1UIP Driven Heuristics – Example 1

◮ Reconsider F consisting of the following clauses C1 = [1, 5] C2 = [2, 6] C3 = [4, 6, 8] C4 = [9, 12] C5 = [13, 14] C6 = [5, 9, 11] C7 = [10, 12, 13] C8 = [2, 8, 9] C9 = [7, 9, 10] C10 = [3, 7] C11 = [11, 14] and let J = (14, 13, 10, 12, 11, 9, 8, ˙ 4, 7, ˙ 3, 6, ˙ 2, 5, ˙ 1). ⊲ The conflict clause is C11. ⊲ The relevant clauses are C1 − C10. ⊲ We obtain the following linear derivation from C11: C12 = [114, 134] (res(C11, C5) wrt 14) C13 = [104, 114, 124] (res(C12, C7) wrt 13) C14 = [73, 94, 114, 124] (res(C13, C9) wrt 10) C15 = [73, 94, 114] (res(C14, C4) wrt 12) 1UIP = [51, 73, 94] (res(C15, C6) wrt 11)

Steffen H¨

  • lldobler

Systematic Search 93

slide-94
SLIDE 94

1UIP Driven Heuristics – Example 2

◮ Let F = [1, 2], [1, 3], [4, 5], [4, 3], J = (˙ 4, 3, ˙ 1), and consider the conflict graph ˙ 11 31 ˙ 42 32 ◮ The conflict clause is [4, 3]. ◮ It does not represent a UIP because 3 ∈ VE = {3, 3}. ◮ The conflict cause can be resolved with [1, 3] to obtain [1, 4] ◮ It represents the 1UIP wrt F ::J and [4, 3]. ◮ In DPLL-CDBL we obtain the following derivation F ::J ❀CDBL F, [4, 1]::(4, 3, ˙ 1) ❀UNIT F, [4, 1]::(5, 4, 3, ˙ 1) ❀SAT SAT.

Steffen H¨

  • lldobler

Systematic Search 94