Presentation is loading. Please wait.

Presentation is loading. Please wait.

3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams 16.412/6.834 October 7 th, 2002.

Similar presentations


Presentation on theme: "3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams 16.412/6.834 October 7 th, 2002."— Presentation transcript:

1 3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams 16.412/6.834 October 7 th, 2002

2 3/11/2002copyright Brian Williams2 Reading Assignments: Propositional Logic AIMA Ch. 6 – Propositional Logic

3 3/11/2002copyright Brian Williams3 Outline Motivation Propositional Logic Syntax Semantics Propositional Satisfiability Systematic methods Characteristics of systematic search Through local search Summary Appendix: Reduction to Clausal Form

4 3/11/2002copyright Brian Williams4 How can Logic Help Us to Perform Diagnosis? Helium tank Fuel tankOxidizer tank Main Engines Flow 1 = zero Pressure 1 = nominal Pressure 2 = nominal Acceleration = zero

5 3/11/2002copyright Brian Williams5 Consistency-based Diagnosis Given: Observations “no thrust” Device schematic Component models Specifies all correct and faulty modes Constraints describe behavior of each mode. Find: Component mode assignment that is consistent with the Obs, Schematic & Models.

6 3/11/2002copyright Brian Williams6 Candidate: Assignment to all component modes. 0 1 0 0 1 Or1 Or2 Or3 And1 And2 A B C D E F G X Y Z 1 And(i): G(i): Out(i) = In1(i) AND In2(i) U(i): 0 Diagnosis identifies consistent modes Candidate = {G(And1) & G(And2) & G(Or1) & G(Or2) & G(Or3)}

7 3/11/2002copyright Brian Williams7 Diagnosis identifies consistent modes AND(i): G(i): Out(i) = In1(i) AND In2(i) U(i): Candidate: Assignment to all component modes. Diagnosis D: Candidate consistent with model Phi and observables OBS. 3 2 2 3 3 Or1 Or3 And1 A B C D E F G X Y Z 10 12 Diagnosis = {G(And1) & U(And2) & G(Or1) & G(Or2) & G(Or3)} Or2

8 3/11/2002copyright Brian Williams8 How do we write down the constraints? Helium tank Fuel tankOxidizer tank Main Engines Flow 1 = zero Pressure 1 = nominal Pressure 2 = nominal Acceleration = zero

9 3/11/2002copyright Brian Williams9 What formal languages exist for describing constraints? Logic: Propositional logictruth of facts First order logicfacts,objects,relations Temporal logictime, …. Modal logicsknowledge, belief … Probability ….

10 3/11/2002copyright Brian Williams10 Logic in General Logics formal languages for representing information such that conclusions can be drawn. Syntax defines the sentences in the language. Semantics define the “meaning” of sentences; i.e., truth of a sentence in a world.

11 3/11/2002copyright Brian Williams11 Outline Motivation Propositional Logic Syntax Semantics Propositional Satisfiability Summary Appendix: Reduction to Clausal Form

12 3/11/2002copyright Brian Williams12 Propositional Logic: Syntax Proposition Statement that is true or false (valve v1) (= voltage high) Propositional sentence (S) S ::= proposition | (NOT S) | (OR S1... Sn) | (AND S1... Sn) Defined Constructs (implies S1 S2) => ((not S1) OR S2) (IFF S1 S2) => (AND (IMPLIES S1 S2)(IMPLIES S2 S1))...

13 3/11/2002copyright Brian Williams13 Engine Example: propositional logic sentence (mode(E1) = ok implies (thrust(E1) = on if and only if flow(V1) = on and flow(V2) = on)) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown) E1 V1V2

14 3/11/2002copyright Brian Williams14 Propositional Logic: Semantics A model assigns true/false to every proposition symbol P i A = True, B = False, C = False The truth of sentence S is defined as a composition of boolean operators applied to the model (S, S 1 and S 2 are sentences): Not S is True iff S is False S 1 and S 2 is True iff S 1 is True and S 2 is True S 1 or S 2 is True iff S 1 is True or S 2 is True S 1 implies S 2 is True iff S 1 is False or S 2 is True S 1 iff S 2 is True iff S 1 implies S 2 is True and S 2 implies S 1 is True

15 3/11/2002copyright Brian Williams15 Example: Determining the truth of a sentence (mode(E1) = ok implies [(thrust(E1) = on if and only if (flow(V1) = on and flow(V2) = on)) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown)]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

16 3/11/2002copyright Brian Williams16 Example: Determining the truth of a sentence (True implies [(thrust(E1) = on if and only if (flow(V1) = on and flow(V2) = on)) and (True or mode(E1) = unknown) and not (True and mode(E1) = unknown)]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

17 3/11/2002copyright Brian Williams17 Example: Determining the truth of a sentence (True implies [(False if and only if (True and False)) and (True or False) and not (True and False)]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

18 3/11/2002copyright Brian Williams18 Example: Determining the truth of a sentence (True implies [(False if and only if (True and False)) and (True or False) and not (True and False)]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

19 3/11/2002copyright Brian Williams19 Example: Determining the truth of a sentence (True implies [(False if and only if (True and False)) and (True or False) and not False]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

20 3/11/2002copyright Brian Williams20 Example: Determining the truth of a sentence (True implies [(False if and only if (True and False)) and (True or False) and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

21 3/11/2002copyright Brian Williams21 Example: Determining the truth of a sentence (True implies [(False if and only if False) and True and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

22 3/11/2002copyright Brian Williams22 Example: Determining the truth of a sentence (True implies [(False if and only if False) and True and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

23 3/11/2002copyright Brian Williams23 Example: Determining the truth of a sentence (True implies [(False implies False ) and (False implies False )) and True and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

24 3/11/2002copyright Brian Williams24 Example: Determining the truth of a sentence (True implies [(not False or False ) and (not False or False )) and True and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

25 3/11/2002copyright Brian Williams25 Example: Determining the truth of a sentence (True implies [(True or False ) and (True or False )) and True and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

26 3/11/2002copyright Brian Williams26 Example: Determining the truth of a sentence (True implies [(True and True) and True and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

27 3/11/2002copyright Brian Williams27 Example: Determining the truth of a sentence (True implies [True and True and True]) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

28 3/11/2002copyright Brian Williams28 Example: Determining the truth of a sentence (True implies True) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

29 3/11/2002copyright Brian Williams29 Example: Determining the truth of a sentence (not True or True) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

30 3/11/2002copyright Brian Williams30 Example: Determining the truth of a sentence (False or True) Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

31 3/11/2002copyright Brian Williams31 Example: Determining the truth of a sentence True! Model: mode(E1) = ok is True thrust(E1) = on is False flow(V1) = on is True flow(V2) = on is False mode(E1) = unknown is False

32 3/11/2002copyright Brian Williams32 Outline Motivation Propositional Logic Syntax Semantics Propositional Satisfiability Clausal Form Systematic methods Characteristics of systematic search Through local search Summary Appendix: Reduction to Clausal Form

33 3/11/2002copyright Brian Williams33 Propositional Satisfiability Find a model M that satisfies sentence T (called a theory): Reduce sentence T to clausal form. Perform search similar to Forward Checking Propositional satisfiability testing: 1990: 100 variables / 200 clauses (constraints) 1998: 10,000 - 100,000 vars / 10^6 clauses Novel applications: e.g. diagnosis, planning, software / circuit testing, machine learning, and protein folding

34 3/11/2002copyright Brian Williams34 Propositional Clauses: A Simpler Form Literal: proposition or its negation B, Not A Clause: disjunction of literals (not A or B or E) Conjunctive Normal Form Phi = (A or B or C) and (not A or B or E) and (not B or C or D) Viewed as a set of clauses

35 3/11/2002copyright Brian Williams35 Engine Example: Clausal Model (mode(E1) = ok implies (thrust(E1) = on iff flow(V1) = on and flow(V2) = on)) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown) not (mode(E1) = ok) or not (thrust(E1) = on) or flow(V1) = on; not (mode(E1) = ok) or not (thrust(E1) = on) or flow(V2) = on; not (mode(E1) = ok) or not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on; mode(E1) = ok or mode(E1) = unknown; not (mode(E1) = ok) or not (mode(E1) = unknown);

36 3/11/2002copyright Brian Williams36 Outline Propositional Satisfiability Clausal form Systematic methods Backtrack Search Deduction by Resolution DPLL: Combining search and deduction Characteristics of DPLL local search using GSAT Summary Appendix: Reduction to Clausal Form

37 3/11/2002copyright Brian Williams37 Propositional Satisfiability by Enumeration Assign true or false to an unassigned proposition. Backtrack as soon as a clause is violated. Example: C1: Not A or B C2: Not C or A C3: Not B or C A FT B FT C FT C FT B FT CC FTFT

38 3/11/2002copyright Brian Williams38 Backtrack Search Procedure BT(phi,A) Input: A cnf theory phi, an assignment A to propositions in phi Output: A decision of whether phi is satisfiable. 1. If a clause is violated return(false); 2. Else if all propositions are assigned return(true); 3. ElseQ = some unassigned proposition in phi; 4.Return (BT(phi, A[Q = True]) or 5. BT(phi, A[Q = False])

39 3/11/2002copyright Brian Williams39 Outline Propositional Satisfiability Clausal form Systematic methods Backtrack Search Deduction by Resolution DPLL: Combining search and deduction Characteristics of DPLL local search using GSAT Summary Appendix: Reduction to Clausal Form

40 3/11/2002copyright Brian Williams40 Inference: Resolution on Clauses  or B, not B or   or  Example: Checking Satisfiability of C1 – C4: C1: A C2: Not A or B C3: Not B or C C4: Not C or Not A C5: Not A or CResolving C2 and C3 using B C6: CResolving C1 and C5 using A C7: Not AResolving C6 and C4 using C C8: FalseResolving C7 and C1 using A

41 3/11/2002copyright Brian Williams41 Outline Propositional Satisfiability Clausal form Systematic methods Backtrack Search Deduction by Resolution DPLL: Combining search and deduction Characteristics of DPLL local search using GSAT Summary Appendix: Reduction to Clausal Form

42 3/11/2002copyright Brian Williams42 How Do We Combine Resolution and Back Track Search? Backtrack Search Assign true or false to an unassigned proposition. Backtrack as soon as a clause is violated. Satisfiable if assignment is complete. Example: C1: Not A or B C2: Not C or A C3: Not B or C A FT B FT C FT C FT B FT CC FTFT  Similar to Forward Checking:  Perform limited form of inference  apply inference rule after assigning each variable.

43 3/11/2002copyright Brian Williams43 Perform limited inference: Unit Clause Resolution Idea: Conclude propositions, not disjunctive clauses Unit clause: a clause with a single literal. Not A Unit resolution: resolution with unit clauses: not A (A or B or C) (B or C) Unit propagation: unit resolve until only a unit clause is left: (not A) (not B) (A or B or C) C

44 3/11/2002copyright Brian Williams44 Unit Propagation Examples C1: Not A or B C2: Not C or A C3: Not B or C C4: A C4 A True C1 B True C3 C True Satisfied

45 3/11/2002copyright Brian Williams45 Unit Propagation Examples C1: Not A or B C2: Not C or A C3: Not B or C C4: A C4’: Not B C1C3C4 C1 C2 C4’ A True B C A False B C C4 A True Satisfied

46 3/11/2002copyright Brian Williams46 C 1 : ¬r  q  p C 2 : ¬ p  ¬ t r true q false p t procedure propagate(C)// C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate Unit Propagation

47 3/11/2002copyright Brian Williams47 C 1 : ¬r  q  p C 2 : ¬ p  ¬ t r true q false p t procedure propagate(C)// C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate Unit Propagation

48 3/11/2002copyright Brian Williams48 C 1 : ¬r  q  p rq p C 2 : ¬ p  ¬ t truefalse true t procedure propagate(C)// C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate Unit Propagation

49 3/11/2002copyright Brian Williams49 C 1 : ¬r  q  p rq p C 2 : ¬ p  ¬ t truefalse true t procedure propagate(C)// C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate Unit Propagation

50 3/11/2002copyright Brian Williams50 rq p truefalse true procedure propagate(C)// C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate C 2 : ¬ p  ¬ t t C 1 : ¬r  q  p Unit Propagation

51 3/11/2002copyright Brian Williams51 rq p C 2 : ¬ p  ¬ t truefalse true t false procedure propagate(C)// C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate C 1 : ¬r  q  p Unit Propagation

52 3/11/2002copyright Brian Williams52 Propositional Satisfiability by DPLL Initially: Unit propagate. Repeat: Assign true or false to an unassigned proposition. Unit propagate. Backtrack as soon as a clause is violated. Satisfiable if assignment is complete. Propagate: C = F B = F A = F A F T Propagate: B = T C = T A = T Example: C1: Not A or B C2: Not C or A C3: Not B or C

53 3/11/2002copyright Brian Williams53 DPLL Procedure [Davis, Putnam Logmann, Loveland, 1962] DPLL(phi,A) Input: A cnf theory phi, an assignment A to propositions in phi Output: A decision of whether phi is satisfiable. 1. propagate(phi); 2. If a clause is violated return(false); 3. Else if all propositions are assigned return(true); 4. ElseQ = some unassigned proposition in phi; 6.Return (DPLL(phi, A[Q = True]) or 7. DPLL(phi, A[Q = False])

54 3/11/2002copyright Brian Williams54 Outline Motivation Propositional Logic Propositional Satisfiability Systematic methods Characteristics of systematic search Through local search Summary Appendix: Reduction to Clausal Form

55 3/11/2002copyright Brian Williams55

56 3/11/2002copyright Brian Williams56

57 3/11/2002copyright Brian Williams57

58 3/11/2002copyright Brian Williams58 Intuition At low ratios: few clauses (constraints) many assignments easily found At high ratios: many clauses inconsistencies easily detected

59 3/11/2002copyright Brian Williams59 Fraction of Formulae Unsatisfied Phase Transitions for Different Numbers of Variables

60 3/11/2002copyright Brian Williams60 Phase transition 2-, 3-, 4-, 5-, and 6-SAT

61 3/11/2002copyright Brian Williams61 Outline Motivation Propositional Logic Propositional Satisfiability Systematic methods Characteristics of systematic search Through local search Summary Appendix: Reduction to Clausal Form

62 3/11/2002copyright Brian Williams62 GSAT Example C1: Not A or B C2: Not C or Not A C3: or B or Not C C1, C2, C3 violated A True B False C True C3 violated False C2 violated True C1 violated False 1.Pick random assignment 2.Check effect of flipping each assignment, counting violated clauses 3.Pick assignment with fewest violations.

63 3/11/2002copyright Brian Williams63 GSAT Example C1: Not A or B C2: Not C or Not A C3: or B or Not C C1 violated A True B False C Satisfied False Satisfied True C1,C2,C3 violated True 1.Pick random assignment 2.Check effect of flipping each assignment, counting violated clauses 3.Pick assignment with fewest violations.

64 3/11/2002copyright Brian Williams64 GSAT Example C1: Not A or B C2: Not C or Not A C3: or B or Not C Satisfied A True B C False 1.Pick random assignment 2.Check effect of flipping each assignment, counting violated clauses 3.Pick assignment with fewest violations.

65 3/11/2002copyright Brian Williams65 Outline Motivation Propositional Logic Propositional Satisfiability Systematic methods Characteristics of systematic search Through local search Summary Appendix: Reduction to Clausal Form

66 3/11/2002copyright Brian Williams66 Satisfiability Testing Procedures Reduce to CNF (Clausal Form) then: Systematic, complete procedures Depth-first backtrack search (Davis, Putnam, & Loveland 1961) unit propagation, shortest clause heuristic State-of-the-art implementations: ntab (Crawford & Auton 1997) itms (Nayak & Williams 1997) many others! See SATLIB 1998 / Hoos & Stutzle Stochastic, incomplete procedures GSAT (Selman et. al 1993) Walksat (Selman & Kautz 1993) greedy local search + noise to escape local minima

67 3/11/2002copyright Brian Williams67 Summary Logical agents apply inference to a knowledge base to derive new information and make decisions. Basic concepts in logic Syntax: formal structure of sentences. Semantics: truth of sentence wrt models. Entailment: necessary truth of a sentence given another. Inference: deriving sentences from others. Soundness: derivations produce only entailed sentences. Completeness: derivations can produce all entailed sentences. Enumeration, Resolution, DPLL and DPLL+TMS are sound and complete methods for propositional logic. Local repair methods (e.g., GSAT) are sound but incomplete.

68 3/11/2002copyright Brian Williams68 Appendix: Reduction to Clauses Note: You are responsible for reading this material

69 3/11/2002copyright Brian Williams69 Engine Example: Mapping to a Clausal Model (mode(E1) = ok implies (thrust(E1) = on iff flow(V1) = on and flow(V2) = on)) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown) not (mode(E1) = ok) or not (thrust(E1) = on) or flow(V1) = on; not (mode(E1) = ok) or not (thrust(E1) = on) or flow(V2) = on; not (mode(E1) = ok) or not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on; mode(E1) = ok or mode(E1) = unknown; not (mode(E1) = ok) or not (mode(E1) = unknown);

70 3/11/2002copyright Brian Williams70 Reducing Propositional Formula to Clauses (CNF) Eliminate IFF and Implies E1 iff E2 => (E1 implies E2) and (E2 implies E1) E1 implies E2 => not E1 or E2

71 3/11/2002copyright Brian Williams71 Engine Example: Eliminate IFF (mode(E1) = ok implies (thrust(E1) = on iff (flow(V1) = on and flow(V2) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown)

72 3/11/2002copyright Brian Williams72 Engine Example: Eliminate IFF (mode(E1) = ok implies (thrust(E1) = on iff (flow(V1) = on and flow(V2) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown) (mode(E1) = ok implies ((thrust(E1) = on implies (flow(V1) = on and flow(V2) = on)) and ((flow(V1) = on and flow(V2) = on) implies thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown)

73 3/11/2002copyright Brian Williams73 Engine Example: Eliminate Implies (mode(E1) = ok implies ((thrust(E1) = on implies (flow(V1) = on and flow(V2) = on)) and ((flow(V1) = on and flow(V2) = on) implies thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown)

74 3/11/2002copyright Brian Williams74 Engine Example: Eliminate Implies (mode(E1) = ok implies ((thrust(E1) = on implies (flow(V1) = on and flow(V2) = on)) and ((flow(V1) = on and flow(V2) = on) implies thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown) (not (mode(E1) = ok) or ((not (thrust(E1) = on) or (flow(V1) = on and flow(V2) = on)) and (not (flow(V1) = on and flow(V2) = on)) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown)

75 3/11/2002copyright Brian Williams75 Reducing Propositional Formula to Clauses (CNF) Move negations in to propositions (De Morgan) Not (E1 and E2) => (not E1) or (not E2) Not (E1 or E2) => (not E1) and (not E2) Not (not E1) => E1

76 3/11/2002copyright Brian Williams76 Engine Example: Move Negations In (not (mode(E1) = ok) or ((not (thrust(E1) = on) or (flow(V1) = on and flow(V2) = on)) and (not (flow(V1) = on and flow(V2) = on)) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown)

77 3/11/2002copyright Brian Williams77 Engine Example: Move Negations In (not (mode(E1) = ok) or ((not (thrust(E1) = on) or (flow(V1) = on and flow(V2) = on)) and (not (flow(V1) = on and flow(V2) = on)) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown) (not (mode(E1) = ok) or ((not (thrust(E1) = on) or (flow(V1) = on and flow(V2) = on)) and (not (flow(V1) = on) or not (flow(V2) = on)) or thrust(E1) = on) ) and (mode(E1) = ok or mode(E1) = unknown) and (not (mode(E1) = ok) or not (mode(E1) = unknown)))

78 3/11/2002copyright Brian Williams78 Reducing Propositional Formula to Clauses (CNF) Move conjunction out (Distribution) E1 or (E2 and E3) =>(E1 or E2) and (E1 or E3)

79 3/11/2002copyright Brian Williams79 Engine Example: Move Conjunctions Out (not (mode(E1) = ok) or ((not (thrust(E1) = on) or (flow(V1) = on and flow(V2) = on)) and (not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and (not (mode(E1) = ok) or not (mode(E1) = unknown))

80 3/11/2002copyright Brian Williams80 Engine Example: Move Conjunctions Out (not (mode(E1) = ok) or ((not (thrust(E1) = on) or (flow(V1) = on and flow(V2) = on)) and (not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and (not (mode(E1) = ok) or not (mode(E1) = unknown)) (not (mode(E1) = ok) or (((not (thrust(E1) = on) or flow(V1) = on) and (not (thrust(E1) = on) or flow(V2) = on)) and (not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and (not (mode(E1) = ok) or not (mode(E1) = unknown))

81 3/11/2002copyright Brian Williams81 Engine Example: Move Conjunctions Out (not (mode(E1) = ok) or (((not (thrust(E1) = on) or flow(V1) = on) and (not (thrust(E1) = on) or flow(V2) = on)) and (not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and (not (mode(E1) = ok) or not (mode(E1) = unknown))

82 3/11/2002copyright Brian Williams82 Engine Example: Move Conjunctions Out (not (mode(E1) = ok) or (((not (thrust(E1) = on) or flow(V1) = on) and (not (thrust(E1) = on) or flow(V2) = on)) and (not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on))) and (mode(E1) = ok or mode(E1) = unknown) and (not (mode(E1) = ok) or not (mode(E1) = unknown)) (not (mode(E1) = ok) or not (thrust(E1) = on) or flow(V1) = on) and (not (mode(E1) = ok) or not (thrust(E1) = on) or flow(V2) = on)) and (not (mode(E1) = ok) or not (flow(V1) = on) or not (flow(V2) = on) or thrust(E1) = on) and (mode(E1) = ok or mode(E1) = unknown) and (not (mode(E1) = ok) or not (mode(E1) = unknown))


Download ppt "3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams 16.412/6.834 October 7 th, 2002."

Similar presentations


Ads by Google