Propositional Logic Session 3

Slides:



Advertisements
Similar presentations
1 Knowledge Representation Introduction KR and Logic.
Advertisements

PROOF BY CONTRADICTION
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Logic Use mathematical deduction to derive new knowledge.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
3/30/00 Agents that Reason Logically by Chris Horn Jiansui Yang Xiaojing Wu.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
ITCS 3153 Artificial Intelligence Lecture 11 Logical Agents Chapter 7 Lecture 11 Logical Agents Chapter 7.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
Knowledge Representation I (Propositional Logic) CSE 473.
Knowledge in intelligent systems So far, we’ve used relatively specialized, naïve agents. How can we build agents that incorporate knowledge and a memory?
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Let remember from the previous lesson what is Knowledge representation
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
Knowledge Representation Use of logic. Artificial agents need Knowledge and reasoning power Can combine GK with current percepts Build up KB incrementally.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 11 of 41 Wednesday, 15.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Propositional Logic Predicate Logic
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #6
EA C461 Artificial Intelligence
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
Knowledge and reasoning – second part
EA C461 – Artificial Intelligence Logical Agent
The Propositional Calculus
ARTIFICIAL INTELLIGENCE
Introduction to Knowledge-bases
Logics for Data and Knowledge Representation
Logical Inference: Through Proof to Truth
Logics for Data and Knowledge Representation
Logic Use mathematical deduction to derive new knowledge.
Artificial Intelligence
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Knowledge and reasoning – second part
Back to “Serious” Topics…
Logical Agents Chapter 7.
Chapter 7. Propositional and Predicate Logic
Methods of Proof Chapter 7, second half.
Propositional Logic: Methods of Proof (Part II)
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
ece 720 intelligent web: ontology and beyond
Logical Agents Chapter 7 Andreas Geyer-Schulz and Chuck Dyer
Presentation transcript:

Propositional Logic Session 3 Expert Systems: Knowledge Representation & Automated Reasoning By:H.Nematzadeh

Expert system is an intelligent agent We want to create an intelligent agent which can perceives its environment and adds new information to its knowledge base and answer questions! Intelligent agent Knowledge base perceive Environment Inference engine action

Knowledge base agent Such an intelligent agent is called knowledge base agent. We have several ways to represent the knowledge to the knowledge base: 1) logic: propositional logic, predicate logic 2) programming languages : C, Basic,… 3) semantic network …

Main concepts We want to show how we can represent the knowledge inside a knowledge base using a prepositional logic Two important things: syntax and semantic Syntax shows the grammar of the logic (how the prepositional logic is built) and semantic shows the meaning of the logic

Syntax The grammar of prepositional logic can be defined as follow: Sentence atomicsentence|complexsentence Atomicsentencetrue|false|p|q|r… Complexsentence(sentence)|sentenceconectivesentence|- sentence Connective  ^ |v | => |<=> Try to find (p ^ q) , (p v r)

Semantics Semantic of prepositional logic is either true or false. Truth table helps to find the semantics of more complex logics

Inference using truth table Using a truth table show that –p can be concluded from the given knowledge base. 1)- AND all the terms in Knowledge Base 2)- check to see if you can conclude –p from 1 R1: p=> q -p R2: q=> r True or false? R3: -q

Inference using truth table

inference using resolution 1- change all logics inside the KB to the form of CNF 2- to prove the logic S, we add the –S (contradiction of S) in the form of CNF to the KB We repeat the following three steps to find a contradiction or a new production is not available: 1- choose two logics inside the KB as parents and 2-produce the child 3- if the result (the child) is empty, then a contradiction happened, otherwise add the child to the logics in the KB

inference using resolution How to transform from non-CNF logics to CNF logics? 1- eliminate the THEN connective (=>) p=>q : -p v q 2-distribute the contradiction: (p v q ) : -p ^ -q, - (p ^ q ) : -p v -q 3- simplify the logic to the form of conjunction of disjunct logics (p ^ q ) v r = (p v r) ^ (q v r) 4- each logic should be added separately to the KB Rn-1 : (p v r) R n-2 : (q v r) Rn : (p v r) ^ (q v r)

inference using resolution Rn-1 : p R n-2 : q R n-3 : (s v r) Rn : (p ^ q) ^ (s v r) (p ^ q) v (s ^ r) = ((p v r) ^ (q v r)) ^ ((p v s) ^ (q v s)) Rn-1 : (p v r) Rn-2 : (q v r) Rn-3 : (p v s) Rn-4 : (q v s)

Example 1 Can you conclude r from the following KB? CNF

Example 1 ø

Example 2 2- If people becomes cruel, they wont have good thoughts q 1- If rules are difficult, people will be cruel. 2- If people becomes cruel, they wont have good thoughts 3- People will have good thoughts or they miss unity 4-If people are not enslaved, they wont miss unity q r q -r s t -s If the rules are difficult, will the people be enslaved?

Example 2 CNF ø

Example 3 Is Tom sick? s p q p t r -r s 1- if Tom buys a house under her wife’s name , he is either kind or sick. 2- if Tom is kind or he is unemployed then he is poor. 3- Tom is not poor. 4- Tom buys a house under his wife’s name. p q p t r -r s Is Tom sick?

Example 3 CNF ø

Inference using rules 1: 2: 3: 4: 5: 6: 7: The proof for rule 1 is given. The last column should always be TRUE!

Example using rules Using rule 2 from slide 18, we can conclude –p from the knowledge base Question: Answer:

Remember slide 14 p q 1- If rules are difficult, people will be cruel. 2- If people becomes cruel, they wont have good thoughts 3- People will have good thoughts or they miss unity 4-If people are not enslaved, they wont miss unity q r q -r s t -s If the rules are difficult, will the people be enslaved?

Solution using inference rules

Shift to predicate logic Using prepositional logic we can not represent general rules, for example we can not show this in prepositional logic: All people are mortal Using predicate logic it is easy show it: