Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS344 : Introduction to Artificial Intelligence

Similar presentations


Presentation on theme: "CS344 : Introduction to Artificial Intelligence"— Presentation transcript:

1 CS344 : Introduction to Artificial Intelligence
Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness

2 Formalization of propositional logic (review)
Axioms : A1 A2 A3 Inference rule: Given and A, write B A Proof is: A sequence of i) Hypotheses ii) Axioms iii) Results of MP A Theorem is an Expression proved from axioms and inference rules

3 Soundness, Completeness & Consistency
Semantic World Valuation, Tautology Syntactic World Theorems, Proofs Completeness * *

4 Soundness Provability Truth Completeness Truth Provability

5 Soundness: Correctness of the System
Proved entities are indeed true/valid Completeness: Power of the System True things are indeed provable

6 Tautology An expression ‘E’ is a tautology if V(E) = T
for all valuations of constituent propositions Each ‘valuation’ is called a ‘model’.

7 Problem (P Q) (P Q) Semantic Proof A B P Q P Q P Q A B T F F T T
T T T T T F F F F T F T F T T

8 To show syntactically (P Q) (P Q) i.e. [(P (Q F )) F ] [(P F ) Q]

9 If we can establish (P (Q F )) F , (P F ), Q F ⊢ F This is shown as Q F hypothesis (Q F ) (P (Q F )) A1

10 QF; hypothesis (QF)(P(QF)); A1 P(QF); MP F; MP Thus we have a proof of the line we started with

11 Completeness

12 Necessary results Statement: (pq)((~pq)q) Proof:
If we can show that (pq), (~pq) |- q Or, (pq), (~pq), qF |- F Then we are done.

13 Proof continued 1. (pq) H1 2. (~pq) H2 3. qF H3
4. (~pq) (~qp) theorem of contraposition 5. ~qp MP, 2, 4 6. P MP, 3,5 7. q MP, 6, 1 8. F MP,7,3 QED

14 How to prove contraposition
To show (pq)(~q~p) Proof: pq, ~q, p |- F Very obvious!

15 An example to illustrate the completeness proof
q p(p V q) T F

16 Running the completeness proof
For every row of the truth table set up a proof: p, ~q |- p(p V q) p, q |- p(p V q) ~p, q |- p(p V q) ~p, ~q |- p(p V q)

17 p, ~q |- p  (p V q) i.e. p, ~q, p |- p V q p, ~q, p, ~p |- q p, ~q, p, ~p |- F |- F  q |- q

18 p, q |- p  (p V q) i.e. p, q, p, ~p |- q same as 1

19 ~p, q |- p  (p V q) ~p, q, p, ~p |- q Same as 1, since F is derived 4. ~p, ~q |- p  (p V q)

20 Why all this? If we have shown p, q |- A and p, ~q |- A
then we can show that p |- A

21 p |- (q  A) also p |- (~q  A) But (q  A)  ((~q  A)  A) is a theorem by MP twice p |- A

22 General Statement of the completeness proof
If V(A) = T for all models then |- A

23 Elaborating, If P1, P2, …, Pn are constituent propositions of A and if V(A) = T for every model V(Pi) = T/F then |- A

24 We have a truth table with 2n rows
P1 P2 P Pn A F F F F T F F F T T . T T T T T

25 If we can show P1’, P2’, …, Pn’ |- A’ For every row where Pi’ = Pi if V(Pi) = T = ~Pi if V(Pi) = F And A’ = A if V(A) = T = ~A if V(A) = F

26 Lemma If row has P1’, P2’, …, Pn’, A’ Then P1’, P2’, …, Pn’ |- A’

27 Check p q p q F F F F T F T F F T T F It is true that p’, q’ |- (p q)’
i.e., ~p, ~q |- ~(p q)

28 Proof of Lemma By Induction on the no. of ‘’ symbols in A Base Case:
A is either Pi or F A is V(A) |- A’ F |- A  F |- F  F

29 A is Pi V(Pi) V(A) T T F F Pi |- A But |- A A is a theorem and ~Pi |- ~A which is also fine


Download ppt "CS344 : Introduction to Artificial Intelligence"

Similar presentations


Ads by Google