logic is everywhere
play

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


  1. Hikmat har Jaga Hai Systematic Search logika je svuda � � ��� � � �� ���� � Steffen H¨ olldobler � � �� Mantık her yerde International Center for Computational Logic logika je vˇ sude Technische Universit¨ at Dresden la logica ` e dappertutto Germany logic is everywhere ◮ Truth Tables la l´ ogica est´ a por todas partes ◮ Semantic Trees ��� � �� ��� ◮ DPLL � ��� � �� � ◮ DPLL-NB Logik ist ¨ uberall ◮ DPLL-CDBL Logika ada di mana-mana ◮ Generic DPLL Logica este peste tot ��� � ���� ��� �������� �� � �� � a l´ ogica est´ a em toda parte la logique est partout Steffen H¨ olldobler Systematic Search 1

  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 R F = { A | A ∈ R and A ∈ S ( F ) } and n = |R F | be the number of propositional variables occurring in F . 3 Form a table TT( F ) with 2 n rows and m columns, where the first n columns are marked by the elements of R F , 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¨ olldobler Systematic Search 2

  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 ) \R F calculate: ζ ( F ◦ G ) = ζ ( F ) ◦ ∗ ζ ( G ) and ζ ( ¬ F ) = ¬ ∗ ζ ( F ) . Steffen H¨ olldobler Systematic Search 3

  4. Some Observations ◮ Let I be an interpretation, F a formula, R F the set of variables occurring in F and n = |R F | . ◮ If we fix A I for all A ∈ R F , then F I is uniquely determined. ◮ There are exactly 2 n different possibilities of assigning truth values to R F . ◮ 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 G I = ζ I ( G ) for all G ∈ S ( F ) . ◮ For every row ζ in TT( F ) exists an interpretation I of the language L ( R ) with G I = ζ ( G ) for all G ∈ S ( F ) . ⊲ I is not uniquely determined. Steffen H¨ olldobler Systematic Search 4

  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¨ olldobler Systematic Search 5

  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¨ olldobler Systematic Search 6

  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¨ olldobler Systematic Search 7

  8. The ST Calculus ◮ Given a CNF-formula F . ◮ Computations are initialized by F ::( ) . ◮ The rules of the calculus are F :: J F :: SAT iff F | J = � � . ❀ SAT F :: J F :: CONFLICT iff [ ] ∈ F | J . ❀ CONF F :: ˙ ˙ A, J | F :: ¬ A, J A ∈ atom ( F | J ) and [ ] �∈ F | J . F :: J iff ❀ SPLIT ◮ 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¨ olldobler Systematic Search 8

  9. Example ◮ Let F = � [2 , − 3] , [2 , 3] , [ − 1 , − 2] , [1 , − 3] , [1 , − 2 , 3] � in F ::( ) ✏ PPPPPPPP ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✮ P q F ::(˙ F ::( ˙ 1) − 1) � ❅ � ❅ � ❅ � ❅ ✠ � ❘ ❅ � ✠ ❅ ❘ F ::( ˙ F ::(˙ 2 , ˙ ˙ F ::( ˙ ˙ − 2 , ˙ F ::(˙ 1) 1) 3 , − 1 ) − 3 , − 1) � ❅ ❇ ✂ � ❅ � ❅ ❇ ✂ � ❅ � ✠ ❅ ❘ � ✠ ❅ ❘ ❇ ✂ ❇ ✂ F ::(˙ − 2 , ˙ ˙ F ::( ˙ − 2 , ˙ ˙ F ::(˙ ˙ ˙ F ::( ˙ ˙ ˙ 3 , 1) − 3 , 1) 2 , − 3 , − 1) − 2 , − 3 , − 1) ❇ ✂ ❳❳❳❳❳❳❳❳❳❳❳ ✘ ❇ ✂ ❍❍❍ ✟ ✘ ✘ ✟ ✘ ❇ ◆ ✌ ✂ ✘ ✟ ✘ ❥ ❍ ✙ ✟ ✘ ✘ ✘ ✘ ✘ ❳ ③ ✾ ✘ F :: CONFLICT ◮ F is unsatisfiable. Steffen H¨ olldobler Systematic Search 9

  10. Another Example ◮ Let F = � [2 , 3] , [ − 1 , − 2] , [1 , − 3] , [1 , − 2 , 3] � in F ::( ) ✏ PPPPPPPP ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✮ P q F ::(˙ F ::( ˙ 1) − 1) � ❅ � ❅ � ❅ � ❅ ✠ � ❘ ❅ � ✠ ❅ ❘ F ::( ˙ F ::(˙ 2 , ˙ ˙ F ::( ˙ ˙ − 2 , ˙ F ::(˙ 1) 1) 3 , − 1 ) − 3 , − 1) � ❅ ❇ ✂ � ❅ � ❅ ❇ ✂ � ❅ � ✠ ❅ ❘ � ✠ ❅ ❘ ❇ ✂ ❇ ✂ F ::(˙ − 2 , ˙ ˙ F ::( ˙ − 2 , ˙ ˙ F ::(˙ ˙ ˙ F ::( ˙ ˙ ˙ 3 , 1) − 3 , 1) 2 , − 3 , − 1) − 2 , − 3 , − 1) ❇ ✂ ✘ ❇ ✂ ❍❍❍ ✟ ✘ ✘ ✟ ✘ ◆ ❇ ✌ ✂ ✘ ✟ ✘ ❥ ❍ ✙ ✟ ✘ ✘ ✘ ✘ ✘ ❄ ✘ ✾ F :: SAT F :: CONFLICT ◮ (3 , − 2 , 1) | = F . Steffen H¨ olldobler Systematic Search 10

  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 t 0 → t 1 → . . . , iff t 1 ← ∗ t → ∗ t 2 implies ( ∃ t ′ ) t 1 → ∗ t ′ ← ∗ t 2 , ⊲ confluent iff t 1 ← t → t 2 implies ( ∃ t ′ ) t 1 → ∗ t ′ ← ∗ t 2 , ⊲ locally confluent ⊲ 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¨ olldobler Systematic Search 11

  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¨ olldobler Systematic Search 12

  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¨ olldobler Systematic Search 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend