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

Slides:



Advertisements
Similar presentations
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 12–Prolog examples: Himalayan club, member, rem_duplicate,
Advertisements

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10– Club and Circuit Examples.
Standard Logical Equivalences
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9,10,11- Logic; Deduction Theorem 23/1/09 to 30/1/09.
CS344: Artificial Intelligence
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–5 and 6: Propositional Calculus.
Logic Concepts Lecture Module 11.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 15, 16, 17- Completeness Proof; Self References and.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 12- Completeness Proof; Self References and Paradoxes 16 th August,
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 7– Predicate Calculus and Knowledge Representation.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–28, 29: Predicate Calculus;
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 21– Predicate Calculus and Knowledge Representation 7 th September,
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 22, 23- Prolog.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17, 18: Predicate Calculus 15.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
CS344 Artificial Intelligence Prof. Pushpak Bhattacharya Class on 5 Mar 2007.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 19: Interpretation in Predicate.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 12- Completeness Proof; Self References and Paradoxes 16 th August,
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 15, 16: Predicate Calculus 8.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9 Continuation of Logic and Semantic Web.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–7: (a) Formal System;(b) How to read research papers 3 rd August, 2010.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
CS621: Artificial Intelligence Lecture 28: Propositional calculus; Puzzle Solving Pushpak Bhattacharyya Computer Science and Engineering Department IIT.
CS621: Artificial Intelligence
Computer Science CPSC 322 Lecture 22 Logical Consequences, Proof Procedures (Ch 5.2.2)
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 14: AI, Logic, and Puzzle Solving.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
We will now study some special kinds of non-standard quantifiers. Definition 4. Let  (x),  (x) be two fixed formulae of a language L n such that x is.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 35–Himalayan Club example; introducing Prolog.
Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture 16 – 09/09/05 Prof. Pushpak Bhattacharyya Soundness, Completeness,
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–10: Soundness of Propositional Calculus 12 th August, 2010.
CS 344 Artificial Intelligence By Prof: Pushpak Bhattacharya Class on 12/Feb/2007.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
CS 344 Artificial Intelligence By Prof: Pushpak Bhattacharya Class on 26/Feb/2007.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic.
Chapter 1 Logic and proofs
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–6: Propositional calculus, Semantic Tableau, formal System 2 nd August,
CS621: Artificial Intelligence
Chapter 7. Propositional and Predicate Logic
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
Knowledge Representation and Reasoning
CS344 : Introduction to Artificial Intelligence
CS621: Artificial Intelligence
CS 621 Artificial Intelligence Lecture 4 – 05/08/05
Back to “Serious” Topics…
CS621: Artificial Intelligence
Chapter 7. Propositional and Predicate Logic
CS621 : Artificial Intelligence
CS621: Artificial Intelligence
CS621: Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
CS621: Artificial Intelligence
Representations & Reasoning Systems (RRS) (2.2)
CS 621 Artificial Intelligence Lecture /09/05 Prof
Artificial Intelligence
Presentation transcript:

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

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

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

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)

Completeness Proof

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

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 ‘ → ’

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.)

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

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.

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

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

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.

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.

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

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.)

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)

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

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}

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”