Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.

Similar presentations


Presentation on theme: "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."— Presentation transcript:

1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.

2 Clauses and Resolvents CSE2303 Formal Methods I Lecture 21

3 Overview Formula Disjunctive Normal Form Conjunctive Normal Form Clauses Resolvents

4 Formula Using propositional variables every statement can be represented by a formula. Example. S: If the price is less than $30 and I have at least $50, then I will buy that CD. P: The price of the CD is less than $30. L: I have at least $50. B: I will buy that CD. S: (P  L)  B

5 Terminology (P  ¬R  Q)  (¬P  R  Q) propositional variables literals A literal is either a propositional variable, or the negation of a propositional variable.

6 Terminology (P  ¬R  Q)  (¬P  R  Q) conjunction of literals disjunction of literals

7 Logical Equivalent We say two formulae are logically equivalent if they always have the same truth table. E.g. (P  Q ) and ¬P  Q ¬(P  R  Q) and ¬P  ¬R  ¬Q ¬(P  R  Q) and ¬P  ¬R  ¬Q P  Q and (¬P  Q)  (P  ¬Q)

8 Special Forms A formula is in Disjunctive Normal Form (DNF) if it is a disjunction D 1  D 2  …  D n where each D i is a conjunction of literals. A formula is in Conjunctive Normal Form (CNF) if it is a conjunction C 1  C 2  …  C n where each C i is a disjunction of literals.

9 Example Disjunctive Normal Forms (¬P  ¬R)  (¬P  Q)  (Q  ¬R)  Q (¬P  ¬R  ¬Q)  (¬P  ¬R  Q)  (¬P  R  Q)  (P  ¬R  Q)  (P  R  Q) Conjunctive Normal Forms (¬P  ¬R  Q)  (¬P  R  Q)  (P  ¬R  Q) (¬P  Q)  (¬R  Q) P  Q

10 Theorem Every formula is logically equivalent to formula in disjunctive normal form. Example: (P  Q )  (R  Q) is logically equivalent to: (¬P  ¬R  ¬Q)  (¬P  ¬R  Q)  (¬P  R  Q)  (P  ¬R  Q)  (P  R  Q)

11 Proof of Theorem Take any formula A. Write the truth table A. Delete those rows where A gets F. If no rows are left output (P  ¬P) Else, delete the last column. Replace each T by the variable at the top of the column, each F by the negation of the variable. Put  between the literals. Put brackets around the rows, and  between the rows.

12 Theorem Every formula is logically equivalent to formula in conjunctive normal form. Example: (P  Q )  (R  Q) is logically equivalent to: (¬P  ¬R  Q)  (¬P  R  Q)  (P  ¬R  Q)

13 Proof of Theorem Take any formula A. Write the truth table A. Delete those rows where A gets T. If no rows are left output (P  ¬P) Else, delete the last column. Replace each T by the negation of the variable at the top of the column, each F by the variable. Put  between the literals. Put brackets around the rows, and  between the rows.

14 Clause A clause is a set of literals. Every clause corresponds to a disjunction. E.g. {¬P, Q, ¬R} (¬P  Q  ¬R) Every set of clauses correspond to a CNF. E.g. {{¬P, Q, ¬R}, {¬Q, R}} (¬P  Q  ¬R)  (¬Q  R)

15 Clausal Form Every formula can be represented as a set of clauses. Example: (P  Q )  (R  Q) CNF: (¬P  ¬R  Q)  (¬P  R  Q)  (P  ¬R  Q) Clausal Form: {{¬P, ¬R, Q}, {¬P, R, Q}, {P, ¬R, Q}}

16 Resolvents {¬P, ¬R, Q}{¬P, R, Q} {¬P, Q}R-resolvent

17 Definition If C 1 is a clause which contains P, and If C 2 is a clause which contains ¬P, then P-resolvent(C 1, C 2 ) is the set C 1  C 2 -{P, ¬P}

18 Examples {¬P, ¬R, Q}{P, R, Q} {¬P, ¬R, Q}{P, R, Q} {¬P}{P} {¬P, P, Q} {¬R, R, Q}  Empty clause

19 Terminology A formula is a tautology when it always gets the value T. A formula is called unsatisfiable if it never gets the value T.

20 Examples (P  Q)  ¬Q  P P  ¬P The Empty Clause 

21 Resolvent {A, ¬R}{B, R} {A, B}

22 (A  ¬R)  (B  R) is logically equivalent to (A  ¬R)  (B  R)  (A  B) {{A, ¬R},{B, R}} is logically equivalent to {{A, ¬R}, {B, R}, {A, B}} {{A, ¬R},{B, R}} is unsatisfiable if and only if {{A, ¬R}, {B, R}, {A, B}} is unsatisfiable.

23 Example {P, ¬Q}{P, Q}{¬P, Q}{¬P, ¬Q} {P}{Q} {¬P}

24 Revision Know the definition of the following forms: –DNF (disjunctive normal form). –CNF (conjunctive normal form). –Clausal Form. Be able to express a propositional formula in the following forms: –DNF (disjunctive normal form). –CNF (conjunctive normal form). –Clausal Form. Know what are resolvents.


Download ppt "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."

Similar presentations


Ads by Google