Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness proof; introducing knowledge representation.

Similar presentations


Presentation on theme: "CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness proof; introducing knowledge representation."— Presentation transcript:

1 CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness proof; introducing knowledge representation

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

3 An example to illustrate the completeness proof pqp  (p V q) TFT TTT FTT FFT

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

5 Completeness Proof

6 Completeness of Propositional Calculus Statement If V(A) = T for all V, then |--A i.e. A is a theorem. Lemma: If A consists of propositions P 1, P 2, …, P n then P’ 1, P’ 2, …, P’ n |-- A’, where A’ = A if V(A) = true = ~Aotherwise Similarly for each P’ i

7 Proof for Lemma Proof by induction on the number of ‘ → ’ symbols in A Basis: Number of ‘ → ’ symbols is zero. A is ℱ or P. This is true as, |-- (A → A) i.e. A → A is a theorem. Hypothesis: Let the lemma be true for number of ‘ → ’ symbols ≤ n. Induction: Let A which is B → C contain n+1 ‘ → ’

8 Induction: By hypothesis, P’ 1, P’ 2, …, P’ n |-- B’ P’ 1, P’ 2, …, P’ n |-- C’ If we show that B’, C’ |-- A’ (A is B → C), then the proof is complete. For this we have to show: B, C |-- B → C True as B, C, B |-- C B, ~C |-- ~(B → C) True since B, ~C, B → C |-- ℱ ~B, C |-- B → C True since ~B, C, B |-- C ~B, ~C |-- B → C True since ~B, ~C, B, C → ℱ |-- ℱ Hence the lemma is proved. Proof of Lemma (contd.)

9 Proof of Theorem A is a tautology. There are 2 n models corresponding to P 1, P 2, …, P n propositions. Consider, P 1, P 2, …, P n |--A and P 1, P 2, …, ~P n |--A P 1, P 2, …, P n-1 |-- P n → A and P 1, P 2, …, P n-1 |-- ~P n → A RHS can be written as: |--((P n → A) → ((~P n → A) → A)) |--(~P n → A) → A |--A Thus dropping the propositions progressively we show |-- A

10 Assignment-2 Create a system to prove syntactically the theoremhood of any propositional calculus expression. This will be an automatic theorem prover for propositional calculus. The input to the system will be any propositional calculus expression and the output a yes/no answer depending on whether the expression is a theorem or not.

11 Detour Reasoning two types: Monotonic: Adding inferred knowledge monotonically to the system but not retracting from the knowledge base. Nonmonotonic: Retracts knowledge which becomes false in the face of new evidence Types of Sentences in English: 3 kinds of sentences important from Natural Language Processing point of view. Useful to remember in knowledge extraction. Simple Sentence: Single verb, e.g., Ram plays cricket Compound Sentence: Two independent clauses joined by coordinator. Two verbs are present. e.g. Ram went to school and Shyam played cricket Complex Sentence: Independent clauses joined by one or more dependent clauses. More than one verb e.g. Ram who sings well is performing in the festival today

12 Predicate Calculus Introduction through an example (Zohar Manna, 1974): Problem: A, B and C belong to the Himalayan club. Every member in the club is either a mountain climber or a skier or both. A likes whatever B dislikes and dislikes whatever B likes. A likes rain and snow. No mountain climber likes rain. Every skier likes snow. Is there a member who is a mountain climber and not a skier? Given knowledge has: Facts Rules

13 Predicate Calculus: Example contd. Let mc denote mountain climber and sk denotes skier. Knowledge representation in the given problem is as follows: 1. member(A) 2. member(B) 3. member(C) 4. ∀ x[member(x) → (mc(x) ∨ sk(x))] 5. ∀ x[mc(x) → ~like(x,rain)] 6. ∀ x[sk(x) → like(x, snow)] 7. ∀ x[like(B, x) → ~like(A, x)] 8. ∀ x[~like(B, x) → like(A, x)] 9. like(A, rain) 10. like(A, snow) 11. Question: ∃ x[member(x) ∧ mc(x) ∧ ~sk(x)] We have to infer the 11 th expression from the given 10. Done through Resolution Refutation.

14 Interpretation in Logic Logical expressions or formulae are “FORMS” (placeholders) for whom contents are created through interpretation. Example: This is a Second Order Predicate Calculus formula. Quantification on ‘F’ which is a function.

15 Interpretation – 1 a and b ∈ N In particular, a = 0 and b = 1 x ∈ N P(x) stands for x > 0 g(m,n) stands for (m x n) h(x) stands for (x – 1) Above interpretation defines Factorial Examples

16 Interpretation – 2 a = b = λ P(x) stands for “x is a non empty string” g(m, n) stands for “append head of m to n” h(x) stands for tail(x) Above interpretation defines “reversing a string” Examples (contd.)

17 More Examples ∀ x [ P(x) → Q(x)] Following interpretations conform to above expression: man(x) → mortal(x) dog(x) → mammal(x) prime(x) → 2_or_odd(x) CS(x) → bad_hand_writing(x)

18 Structure of Interpretation All interpretations begin with a domain ‘D’, constants (0-order functions) and functions pick values from there. With respect to - ∀ x [ P(x) → Q(x)] D = {living beings} P: D → {T, F} Q: D → {T, F} P can be looked upon as a table shown here: Elements of D i.e. x P(x) RamT PushpakT Virus 1201 F

19 Factorial: interpretation of the structure D = {0, 1, 2, …, ∞ } a = 0, b = 1 g(m, n) = m x n and g: D x D → D h(x) = (x – 1) and h(0) = 0, h: D → D P(x) is x > 0 and P: D → {T, F}

20 Steps in Interpretation 1. Fix Domain D 2. Assign values to constants 3. Define functions 4. Define predicates An expression which is true for all interpretations is called valid or tautology. Interpretations and their validity in “Herbrand’s Universe” is sufficient for proving validity in Predicate Calculus. Note:- Possible seminar topic – “Herbrand’s Interpretation and Validity”


Download ppt "CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness proof; introducing knowledge representation."

Similar presentations


Ads by Google