Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
38 views

COMP9414: Artificial Intelligence - Solutions Week 5 Propositional Logic

The document discusses propositional logic, including: 1) Converting logical statements to conjunctive normal form (CNF) and determining if they are tautologies or not. Several examples are provided of converting statements to CNF and using truth tables to check for tautologies. 2) Validating arguments using truth tables. Examples show checking if inferences are valid by examining the truth tables. 3) Simplifying logical statements using rules like distribution, double negation, etc. Worked examples demonstrate simplifying statements.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

COMP9414: Artificial Intelligence - Solutions Week 5 Propositional Logic

The document discusses propositional logic, including: 1) Converting logical statements to conjunctive normal form (CNF) and determining if they are tautologies or not. Several examples are provided of converting statements to CNF and using truth tables to check for tautologies. 2) Validating arguments using truth tables. Examples show checking if inferences are valid by examining the truth tables. 3) Simplifying logical statements using rules like distribution, double negation, etc. Worked examples demonstrate simplifying statements.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

COMP9414: Articial Intelligence - Solutions Week 5 Propositional Logic

1. (i) (Ja Jo) T Where: Ja: Jane is in town Jo: John is in town T : we will play tennis (ii) R R Where: R: it will rain today (iii) S P Where: S: you study P : you will pass this course (i) P Q P Q (remove ) (ii) (P Q) R (P Q) R (remove ) (P Q) R (De Morgan) (P Q) R (Double Negation) (P R) (Q R) (Distribute over ) (iii) (P Q) (R Q) (P Q) (R Q) (remove ) (P Q) (R Q) (Double Negation) (P R Q) (Q R Q) (Distribute over ) This can be further simplied to: (P R Q) (Q R) And in fact this can be simplied to Q R since Q R P R Q

2.

P Q P Q Q P T T T F F 3. (i) T F F T F F T T F T F F T T T In all rows where both P Q and Q are true, P is also true. Therefore, inference is valid. P Q P Q P Q Q P T T F F T T (ii) T F F T F F F T T F T T F F T T T T In all rows where both P Q is true, Q P is also true. Therefore, inference is valid. P Q R P Q QR P R T T T T T T T T F T F F T F T F T T (iii) T F F F T F F T T T T T F T F T F T F F T T T T F F F T T T

In all rows where both P Q and Q R are true, P R is also true. Therefore, inference is valid. 4. (i) CNF(P Q) P Q CNF(Q) Q CNF(P ) P (Double Negation) Proof: 1. P Q 2. Q 3. P 4. Q 5. (ii) CNF(P Q) P Q CNF((Q P )) (Q P ) (Remove ) (Q P ) (Double Negation) Q P (De Morgan) Q P (Double Negation) Proof: 1. P Q 2. Q 3. P 4. P 5. (Hypothesis) (Negation of Conclusion) (Negation of Conclusion) 1, 2 Resolution 3, 4 Resolution (Hypothesis) (Hypothesis) (Negation of Conclusion) 1, 3 Resloution 2, 4 Resloution

(iii) P Q, Q R P R CNF(P Q) P Q CNF(Q R) Q R CNF((P R)) (P R) (Remove ) P R (De Morgan) P R (Double Negation) Proof: 1. P Q 2. Q R 3. P 4. R 5. Q 6. R 7. (Hypothesis) (Hypothesis) (Negation of Conclusion) (Negation of Conclusion) 1, 3 Resolution 2, 5 Resolution 4, 6 Resolution

5.

P Q P P Q (P Q) P ((P Q) P ) Q T T F T F T (i) T F F T F T F T T T T T F F T F F T Last column is always true no matter what truth assignment to P and Q. Therefore ((P Q) P ) Q is a tautology. (ii) S = ((P Q) (P R)) (P Q) P Q R P Q P R (P R) (P Q) (P R) S T T T T T F F T T T F T F T T T T F T F T F F T T F F F F T F T F T T T T F F T F T F T T F F T F F T T T F F T F F F T T F F T Last column is always true no matter what truth assignment to P , Q and R. Therefore ((P Q) (P R)) (P Q) is a tautology. (iii) P T F Last P P P (P P ) (P P ) P F F T T T F T F column is not always true. Therefore (P P ) P is not a tautology.

(iv) (P Q) (P Q) P Q P Q P Q P Q (P Q) (P Q) (P Q) T T F F T F T T T F F T T F T T F T T F T F T T F F T T F T F T Last column is always true no matter what truth assignment to P and Q. Therefore (P Q) (P Q) is a tautology. 6. (i) CNF((((P Q) P ) Q)) (((P Q) P ) Q) (Remove ) ((P Q) P ) Q (De Morgan) (P Q) P Q (Double Negation) Proof: 1. P Q (Negated Conclusion) 2. P (Negated Conclusion) 3. Q (Negated Conclusion) 4. Q 1, 2 Resolution 5. 3, 4 Resolution Therefore (((P Q) P ) Q) is a tautology. (ii) CNF((((P Q) (P R)) (P Q))) (((P Q) (P R)) (P Q)) (Remove ) ((P Q) (P R)) (P Q) (De Morgan) (P Q) (P R) (P Q) (Double Negation and De Morgan) (P Q) (P R) (P Q) (Double Negation) Proof:

1. P Q (Negated Conclusion) 2. P (Negated Conclusion) 3. R (Negated Conclusion) 4. Q (Negated Conclusion) 5. Q 1, 2 Resolution 6. 4, 5 Resolution Therefore ((P Q) (P R)) (P Q) is a tautology. (iii) CNF(((P P ) P )) (P P ) P (De Morgan) (P P ) P (Double Negation) (P P ) (P P ) (Distribute over ) P (Can simplify to this by removing repetition and tautologies) Proof: 1. P (Negated Conclusion) Cannot obtain empty clause using resolution so (P P ) P is not a tautology. (iv) CNF(((P Q) (P Q))) ((P Q) (P Q)) (Remove ) (P Q) (P Q) (De Morgan) (P Q) P Q (Double Negation) Proof: 1. P Q 2. Q 3. P 4. P 5. Therefore (P (Negated Conclusion) (Negated Conclusion) (Negated Conclusion) 1, 2 Resolution 3, 4, Resolution Q) (P Q) is a tautology.

You might also like