Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

Size: px
Start display at page:

Download "Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic"

Transcription

1 Propositional Logic Reading: Chapter 7.1, [ased on slides from Jerry Zhu, Louis Oliphant and ndrew Moore] Logic If the rules of the world are presented formally, then a decision maker can use logical reasoning to make rational decisions Several types of logic: ( logic Propositional Logic (oolean ( calculus First-Order Logic (aka first-order predicate Non-Monotonic Logic Markov Logic logic includes: syntax: what is a correctly-formed sentence? semantics: what is the meaning of a sentence? Inference procedure (reasoning, entailment): what sentence logically follows given knowledge? slide 1 slide 3 Propositional Logic symbol in PL is a symbolic variable whose value must be either True or False, and which stands for a natural language statement that could be either or = Smith has chest pain = Smith is depressed C = It is raining Propositional Logic Syntax Sentence tomicsentence ComplexSentence tomicsentence True False Symbol Symbol P Q R... ComplexSentence Sentence ( Sentence ( Sentence ( Sentence ( Sentence ( Sentence ( Sentence ( Sentence ( Sentence NF (ackus-naur Form) grammar in propositional logic P ((True R) Q)) S) well formed ( wff or sentence ) ) S) not well formed slide 4 slide 5

2 Propositional Logic Syntax () control the order of operations Means True P ((True R) Q)) ( S Propositional Logic Syntax Precedence (from highest to lowest): If the order is clear, you can leave off parentheses Means Not Means Or -- disjunction Means nd -- conjunction if-then Means implication P True R Q S ok S not ok Propositional symbols must be specified Means iff -- biconditional slide 6 slide 7 Semantics n interpretation is a complete True / False assignment to all propositional symbols Example symbols: P means It is hot, Q means It is humid, R means It is raining There are 8 interpretations (TTT,..., ( FFF The semantics (meaning) of a sentence is the set of interpretations in which the sentence evaluates to True Example: the semantics of the sentence is the set of 6 interpretations: P=True, Q=True, R=True or False P=True, Q=False, R=True or False P=False, Q=True, R=True or False model of a set of sentences is an interpretation in which all the sentences are Evaluating a Sentence under an Interpretation Calculated using the definitions of all the connectives, recursively Pay attention to 5 is even implies 6 is odd is True! If P is False, regardless of Q, P Q is True No causality needed: 5 is odd implies the Sun is a star is True slide 8 slide 9

3 Understanding This is an operator. lthough we call it implies or implication, do not try to understand its semantic form from the name. We could have called it foo instead and still defined its semantics the same way. means is sufficient but not necessary to make Example: Let be has a cold and be drink water can be interpreted as should drink water when has a cold. However, you can drink water even when you do not have a cold. Thus is still when is not. Example R Q slide 10 slide 11 Example R Q Example (P R Q) P R Q P Q R ~P Q^R ~PvQ^R ~PvQ^R->Q Satisfiable: a sentence that is under some interpretations NP-complete Deciding satisfiability of a sentence is slide 12 slide 13

4 Example (P R Q) P R Q Example () P Q P Q R ~Q R^~Q P^R^~Q P^R P^R->Q final Unsatisfiable: a sentence that is under all interpretations lso called inconsistent or a contradiction slide 14 slide 15 Example () P Q P Q R ~Q P->Q P^~Q (P->Q)vP^~Q Valid: a sentence that is under all interpretations lso called a tautology slide 16 Knowledge ase (K) knowledge base, K, is a set of sentences. Example K: TomGivingLecture (TodayIsTuesday ( TodayIsThursday TomGivingLecture It is equivalent to a single long sentence: the conjunction of all sentences ( TomGivingLecture (TodayIsTuesday TodayIsThursday) ) TomGivingLecture model of a K is an interpretation in which all sentences in K are slide 17

5 Entailment Entailment is the relation of a sentence logically following from other sentences (e.g., K) = = if and only if, in every interpretation in which is, is also ; whenever is, so is ; all models of and also models of Deduction theorem: = if and only if is ( valid (always Proof by contradiction (refutation, reductio ad absurdum): = if and only if is unsatisfiable There are 2 n interpretations to check, if K has n symbols Entailment Entailment is the relation of a sentence logically following from other sentences (e.g., the K) = = if and only if, in every interpretation in which is, is also ll interpretations is is slide 18 slide 19 Deductive Inference Let s say you write an algorithm which, according to you, proves whether a sentence is entailed by The thing your algorithm does is called deductive inference We don t trust your inference algorithm (yet), so we write things your algorithm finds as - It reads is derived from by your algorithm What properties should your algorithm have? Soundness: the inference algorithm only derives entailed sentences. That is, if - then = Completeness: all entailment can be inferred. That is, if = then - Soundness and Completeness Soundness says that any wff that follows deductively from a set of axioms, K, is valid (i.e., in all models) Completeness says that all valid sentences (i.e., in all models of K), can be proved from K and hence are theorems slide 20 slide 21

6 Method 1: Inference by Enumeration Inference by Enumeration lso called Model Checking or Truth Table Enumeration LET: K = C, C α = QUERY: K α? LET: K = C, C α = QUERY: K α? 22 C NOTE: The computer doesn't know the meaning of the proposition symbols So, all logically distinct cases must be checked to prove that a sentence can be derived from K slide C C C K Rows where all of sentences in K are are the models of K slide 23 Inference by Enumeration Inference by Enumeration 24 LET: K = C, C α = QUERY: K α? YES! C C C K K α α is entailed by K if all models of K are models of α, i.e., all rows where K is, α is also In other words: K α is valid slide 24 Using inference by enumeration to build a complete truth table in order to determine if a sentence is entailed by K is a complete inference algorithm for Propositional Logic ut very slow: takes exponential time slide 25

7 Method 2: Natural Deduction using Sound Inference Rules Logical Equivalences Goal: Define a more efficient algorithm than enumeration that uses a set of inference rules to incrementally deduce new sentences that are given the initial set of sentences in K plus uses all logical equivalences slide 26 You can use these equivalences to derive or modify sentences slide 27 Sound Inference Rules ( affirms Modus Ponens (Latin: mode that nd-elimination P Q P P Q Note: Prove that an inference rule is sound by using a truth table P (P Q) Q (P (P Q)) Q T T T T T T T T F T F F F T F T F T F T T F F F T F F slide T 28 slide Some Sound Inference Rules Implication-Elimination, IE (Modus Ponens, MP) nd-elimination, E nd-introduction, I Or-Introduction, OI Double-Negation Elimination, DNE α β, α β α 1 α 2 α n α i α 1, α 2,, α n α 1 α 2 α n α i α 1 α 2 α n α α

8 Inference Rules Question Each inference rule formalizes the idea that infers ( - ) in terms of logically follows ( = ) Doesn t say anything about deducibility just says for each interpretation that makes, that interpretation also makes What s the difference between (logical equivalence) = (entailment) - (derived from) slide 30 slide 31 Natural Deduction = Constructing a Proof Proof is a sequence of inference steps that leads from (i.e., K) to This is a search problem! K: 1. () R 2. (S T) Q 3. S 4. T 5. P : R Proof by Natural Deduction 1. S Premise (in K) 2. T Premise 3. S T Conjunction(1, 2) (nd-introduction) 4. (S T) Q Premise 5. Q Modus Ponens(3, 4) 6. P Premise 7. Conjunction(5, 6) 8. () R Premise 9. R Modus Ponens(7, 8) Last line is query sentence slide 32 slide 33

9 Monotonicity Property Note that natural deduction relies on the monotonicity property of Propositional Logic: Deriving a new sentence and adding it to K does NOT affect what can be entailed from the original K Hence we can incrementally add new sentences that are derived in any order Once something is proved, it will remain Method 3: Resolution Your algorithm can use all the logical equivalences, Modus Ponens, nd-elimination to derive new sentences Resolution rule: a single inference rule Sound: only derives entailed sentences Complete: can derive any entailed sentence Resolution is only refutation complete: if K =, then K - False. ut the sentences need to be preprocessed into a special form ut all sentences can be converted into this form slide 34 slide 37 Resolution Take any two clauses where one contains some symbol, and the other contains its complement ( negative ) R Q S T Merge (resolve) them, throw away the symbol and its complement P R S T If two clauses resolve and there s no symbol left, you have derived the empty clause (False), so K = If no new clauses can be added, K does not entail Resolution Rule of Inference Show K = by proving that K is unsatsifiable, i.e., deducing False from K Resolution Rule of Inference Examples, α β, β γ α γ C D, E F C D E F called unitresolution slide 38 slide 39

10 Resolution Refutation lgorithm 1. dd negation of query to K 2. Pick 2 sentences that haven t been used before and can be used with the Resolution Rule of inference 3. If none, halt and answer that the query is NOT entailed by K 4. Compute resolvent and add it to K 5. If False in K Then halt and answer that the query IS entailed by K Else Goto 2 slide 40 ( CNF ) Conjunctive Normal Form ( C) ( ) C Replace all using iff/biconditional elimination ( ) ( ) Replace all using implication elimination Move all negations inward using double-negation elimination ( ) - de Morgan's rule ( ) ( ) pply distributivity of over ( ) ( ) ( ) + 1 more slide 41 Convert Sentence into CNF ( C) starting sentence ( ( C)) (( C) ) iff/biconditional elimination C) ( ( C) ) implication elimination C) (( C) ) move negations inward Resolution Steps Given K and (query) dd to K, and convert all sentences to CNF Show this leads to False (aka empty clause ). Proof contradiction by Example K: ( C ( Example query: C) ( ) C ) distribute over calleda clause slide 42 slide 43

11 Resolution Preprocessing Resolution Example dd to K, and convert to CNF: a1: C a2: a3: C b: c: a1: C a2: a3: C b: c: Want to reach goal: False (empty clause) slide 44 slide 45 Resolution Example Example a1: C a2: a3: C b: c: Given: P R Q R Step 1: resolve a2, c: Prove: R Step 2: resolve above and b: empty slide 46 slide 47

12 Given: () Q (P P) R (R S) (S Q) Example Given: P P Example Prove: R Prove: R slide 48 slide 49 Efficiency of the Resolution lgorithm Run time can be exponential in the worst case Often much faster Factoring: if a new clause contains duplicates of the same symbol, delete the duplicates P R P T P R T If a clause contains a symbol and its complement, the clause is a tautology and is useless; it can be thrown away ( C a1: ( a2: ( Resolvent of a1 and a2 is: C Which is valid, so throw it away Method 4: Chaining with Horn Clauses Resolution is more powerful than we need for many practical situations weaker form: Horn clauses Disjunction of literals with at most one positive R no R yes K = conjunction of Horn clauses What s the big deal? R R P) Q? slide 50 slide 51

13 R R P) Q (R P) Q P R P Horn Clauses Every rule in K is in this form (special case, no negative literals): fact (special case, no positive literal): goal clause The big deal: K easy for humans to read Natural forward chaining and backward chaining algorithms; proof easy for humans to read Can decide entailment with Horn clauses in time linear with K size ut Can only ask atomic queries Horn Clauses Only 1 rule of inference needed Generalized Modus Ponens: P, Q, () R R slide 52 slide 53 Forward Chaining pply any rule whose premises are satisfied in the K dd its conclusion to the K until query is derived K: query: Q Forward Chaining P L 5. L L GMP(5,6,7) 9. M GMP(3,7,8) 10. P GMP(2,8,9) 11. Q GMP(1,10) Forward chaining with Horn clause K is complete slide 54 slide 55

14 ackward Chaining Forward chaining problem: can generate a lot of irrelevant conclusions Search forward, start state = K, goal test = state contains query ackward chaining Work backwards from goal to premises Find all implications of the form ( ) query Prove all the premises of one of these implications void loops: check if new subgoal is already on the goal stack void repeated work: check if new subgoal 1. Has already been proved, or 2. Has already failed slide 65 ackward Chaining P L 5. L Q Goal 9. P Subgoal(1,8) 10. L M Subgoal(2,9) 11. L Subgoal(10) 12. Subgoal(5,11) 13. True(6) 14. True(7) 15. L True(5,13,14) 16. M True(14,15) 17. P True(15,16) 18. Q True(1,17) slide 66 ackward Chaining ackward Chaining P L L P L L slide 67 slide 68

15 ackward Chaining ackward Chaining P L L P L L slide 69 slide 70 ackward Chaining ackward Chaining P L L P L L slide 71 slide 72

16 ackward Chaining ackward Chaining P L L P L L slide 73 slide 74 ackward Chaining ackward Chaining P L L P L L slide 75 slide 76

17 Forward vs. ackward Chaining Forward chaining is data-driven May perform lots of work irrelevant to the goal ackward chaining is goal-driven ppropriate for problem solving Time complexity can be much less than linear in size of K Some form of bi-directional search may be even better Problems with Propositional Logic Consider the game minesweeper on a 10x10 field with only one land mine How do you express the knowledge, with Propositional Logic, that the squares adjacent to the land mine will display the number 1? slide 77 slide 78 Problems with Propositional Logic Consider the game minesweeper on a 10x10 field with only one land mine How do you express the knowledge, with Propositional Logic, that the squares adjacent to the land mine will display the number 1? Intuitively with a rule like (( Number1(Neighbors(x,y Landmine(x,y) but Propositional Logic cannot do this slide 79 Problems with Propositional Logic Propositional Logic has to say, e.g. for cell (3,4): Landmine_3_4 Number1_2_3 Landmine_3_4 Number1_2_4 Landmine_3_4 Number1_2_5 Landmine_3_4 Number1_3_3 Landmine_3_4 Number1_3_5 Landmine_3_4 Number1_4_3 Landmine_3_4 Number1_4_4 Landmine_3_4 Number1_4_5 nd similarly for each of Landmine_1_1, Landmine_1_2, Landmine_1_3,, Landmine_10_10 Difficult to express large domains concisely Don t have objects and relations First-Order Logic is a powerful upgrade slide 80

18 What You Should Know lot of terms Use truth tables (inference by enumeration) Natural deduction proofs Conjuctive Normal Form (CNF) Resolution Refutation algorithm and proofs Horn clauses Forward chaining algorithm ackward chaining algorithm slide 82

Propositional Logic Part 1

Propositional Logic Part 1 Propositional Logic Part 1 Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [Based on slides from Louis Oliphant, Andrew Moore, Jerry Zhu] slide 1 5 is even

More information

A Short Introduction to Propositional Logic and First-Order Logic

A Short Introduction to Propositional Logic and First-Order Logic A Short Introduction to Propositional Logic and First-Order Logic Xiaojin Zhu jerryzhu@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [Based on slides from Louis Oliphant and

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876

More information

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS Santiago Ontañón so367@drexeledu Summary of last day: Logical gents: The can reason from the knowledge they have They can make deductions from their perceptions,

More information

Logical agents. Chapter 7. Chapter 7 1

Logical agents. Chapter 7. Chapter 7 1 Logical agents Chapter 7 Chapter 7 1 Outline Knowledge-based agents Logic in general models and entailment Propositional (oolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

CS 380: ARTIFICIAL INTELLIGENCE

CS 380: ARTIFICIAL INTELLIGENCE CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS 11/8/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logical gents: The can

More information

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1 Revised by Hankui Zhuo, March, 08 Logical agents Chapter 7 Chapter 7 Outline Wumpus world Logic in general models and entailment Propositional (oolean) logic Equivalence, validity, satisfiability Inference

More information

Logical Agents (I) Instructor: Tsung-Che Chiang

Logical Agents (I) Instructor: Tsung-Che Chiang Logical Agents (I) Instructor: Tsung-Che Chiang tcchiang@ieee.org Department of Computer Science and Information Engineering National Taiwan Normal University Artificial Intelligence, Spring, 2010 編譯有誤

More information

Artificial Intelligence Chapter 7: Logical Agents

Artificial Intelligence Chapter 7: Logical Agents Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent State University February 20, 2006 AI: Chapter 7: Logical Agents 1 Contents Knowledge Based Agents

More information

Intelligent Agents. Pınar Yolum Utrecht University

Intelligent Agents. Pınar Yolum Utrecht University Intelligent Agents Pınar Yolum p.yolum@uu.nl Utrecht University Logical Agents (Based mostly on the course slides from http://aima.cs.berkeley.edu/) Outline Knowledge-based agents Wumpus world Logic in

More information

Proof Methods for Propositional Logic

Proof Methods for Propositional Logic Proof Methods for Propositional Logic Logical equivalence Two sentences are logically equivalent iff they are true in the same models: α ß iff α β and β α Russell and Norvig Chapter 7 CS440 Fall 2015 1

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen 2005 References: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 7 2. S. Russell s teaching materials Introduction The representation

More information

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 10, 5/9/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Logical Agents Chapter 7

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

Logical agents. Chapter 7. Chapter 7 1

Logical agents. Chapter 7. Chapter 7 1 Logical agents Chapter 7 Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:

More information

TDT4136 Logic and Reasoning Systems

TDT4136 Logic and Reasoning Systems TDT436 Logic and Reasoning Systems Chapter 7 - Logic gents Lester Solbakken solbakke@idi.ntnu.no Norwegian University of Science and Technology 06.09.0 Lester Solbakken TDT436 Logic and Reasoning Systems

More information

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring 109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment

More information

Last update: March 4, Logical agents. CMSC 421: Chapter 7. CMSC 421: Chapter 7 1

Last update: March 4, Logical agents. CMSC 421: Chapter 7. CMSC 421: Chapter 7 1 Last update: March 4, 00 Logical agents CMSC 4: Chapter 7 CMSC 4: Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general models and entailment Propositional (oolean) logic Equivalence,

More information

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5 rtificial Intelligence Topic 12 Logical Inference Reading: Russell and Norvig, Chapter 7, Section 5 c Cara MacNish. Includes material c S. Russell & P. Norvig 1995,2003 with permission. CITS4211 Logical

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Outline Knowledge-based agents Wumpus world Logic in general

More information

Logical Agents: Propositional Logic. Chapter 7

Logical Agents: Propositional Logic. Chapter 7 Logical Agents: Propositional Logic Chapter 7 Outline Topics: Knowledge-based agents Example domain: The Wumpus World Logic in general models and entailment Propositional (Boolean) logic Equivalence, validity,

More information

Propositional and First-Order Logic

Propositional and First-Order Logic Propositional and First-Order Logic Chapter 7.4 7.8, 8.1 8.3, 8.5 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer Logic roadmap overview Propositional logic (review) Problems with

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

More information

Inference in Propositional Logic

Inference in Propositional Logic Inference in Propositional Logic Deepak Kumar November 2017 Propositional Logic A language for symbolic reasoning Proposition a statement that is either True or False. E.g. Bryn Mawr College is located

More information

Inference Methods In Propositional Logic

Inference Methods In Propositional Logic Lecture Notes, Artificial Intelligence ((ENCS434)) University of Birzeit 1 st Semester, 2011 Artificial Intelligence (ENCS434) Inference Methods In Propositional Logic Dr. Mustafa Jarrar University of

More information

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13 CSC242: Intro to AI Lecture 11 Propositional Inference Propositional Inference Factored Representation Splits a state into variables (factors, attributes, features, things you know ) that can have values

More information

Deliberative Agents Knowledge Representation I. Deliberative Agents

Deliberative Agents Knowledge Representation I. Deliberative Agents Deliberative Agents Knowledge Representation I Vasant Honavar Bioinformatics and Computational Biology Program Center for Computational Intelligence, Learning, & Discovery honavar@cs.iastate.edu www.cs.iastate.edu/~honavar/

More information

Logical Agents. Outline

Logical Agents. Outline ogical gents Chapter 6, Ie Chapter 7 Outline Knowledge-based agents Wumpus world ogic in general models and entailment ropositional (oolean) logic Equivalence, validity, satisfiability Inference rules

More information

Language of Propositional Logic

Language of Propositional Logic Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called

More information

Propositional Logic: Review

Propositional Logic: Review Propositional Logic: Review Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Wrapping parentheses: ( ) Sentences are combined by connectives:...and...or

More information

Inference Methods In Propositional Logic

Inference Methods In Propositional Logic Lecture Notes, Advanced Artificial Intelligence (SCOM7341) Sina Institute, University of Birzeit 2 nd Semester, 2012 Advanced Artificial Intelligence (SCOM7341) Inference Methods In Propositional Logic

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2016/17 (slides based on Stuart Russell s AI course) Motivation: Most students will have learnt about propositional

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7.

7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7. COMP944/984/34 6s Logic COMP944/ 984/ 34: rtificial Intelligence 7. Logical gents Outline Knowledge-based agents Wumpus world Russell & Norvig, Chapter 7. Logic in general models and entailment Propositional

More information

Class Assignment Strategies

Class Assignment Strategies Class Assignment Strategies ì Team- A'ack: Team a'ack ì Individualis2c: Search for possible ì Poli2cal: look at others and make decision based on who is winning, who is loosing, and conversa;on ì Emo2on

More information

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT The Wumpus Game Stench Stench Gold Stench Start 1 The Wumpus Game Stench in the square containing the wumpus and in the directly adjacent squares in the squares directly adjacent to a pit Glitter in the

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 Artificial Intelligence Spring 2018 Propositional Logic Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart

More information

CS 7180: Behavioral Modeling and Decision- making in AI

CS 7180: Behavioral Modeling and Decision- making in AI CS 7180: Behavioral Modeling and Decision- making in AI Review of Propositional Logic Prof. Amy Sliva September 7, 2012 Outline General properties of logics Syntax, semantics, entailment, inference, and

More information

CS 771 Artificial Intelligence. Propositional Logic

CS 771 Artificial Intelligence. Propositional Logic CS 771 Artificial Intelligence Propositional Logic Why Do We Need Logic? Problem-solving agents were very inflexible hard code every possible state E.g., in the transition of 8-puzzle problem, knowledge

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

More information

Propositional Logic: Methods of Proof. Chapter 7, Part II

Propositional Logic: Methods of Proof. Chapter 7, Part II Propositional Logic: Methods of Proof Chapter 7, Part II Inference in Formal Symbol Systems: Ontology, Representation, ti Inference Formal Symbol Systems Symbols correspond to things/ideas in the world

More information

Artificial Intelligence Knowledge Representation I

Artificial Intelligence Knowledge Representation I Artificial Intelligence Knowledge Representation I Agents that reason logically knowledge-based approach implement agents that know about their world and reason about possible courses of action needs to

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

Artificial Intelligence. Propositional logic

Artificial Intelligence. Propositional logic Artificial Intelligence Propositional logic Propositional Logic: Syntax Syntax of propositional logic defines allowable sentences Atomic sentences consists of a single proposition symbol Each symbol stands

More information

A simple knowledge-based agent. Logical agents. Outline. Wumpus World PEAS description. Wumpus world characterization. Knowledge bases.

A simple knowledge-based agent. Logical agents. Outline. Wumpus World PEAS description. Wumpus world characterization. Knowledge bases. simple knowledge-based agent ogical agents Chapter 7 function K-gent( percept) returns an action static: K, a knowledge base t, a counter, initially, indicating time Tell(K, ake-ercept-entence( percept,

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Logical Agents. Outline

Logical Agents. Outline Logical Agents *(Chapter 7 (Russel & Norvig, 2004)) Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability

More information

Introduction to Artificial Intelligence. Logical Agents

Introduction to Artificial Intelligence. Logical Agents Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based

More information

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference Outline Logical Agents ECE57 Applied Artificial Intelligence Spring 007 Lecture #6 Logical reasoning Propositional Logic Wumpus World Inference Russell & Norvig, chapter 7 ECE57 Applied Artificial Intelligence

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (previous lecture, Part I) Chapter 7.5 (this lecture, Part II) (optional: 7.6-7.8)

More information

Deductive Systems. Lecture - 3

Deductive Systems. Lecture - 3 Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth

More information

Lecture 7: Logical Agents and Propositional Logic

Lecture 7: Logical Agents and Propositional Logic Lecture 7: Logical Agents and Propositional Logic CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA March 07, 2018 Amarda Shehu (580) 1 1

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents Knowledge-based Agents CS 331: Artificial Intelligence Propositional Logic I Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?

More information

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents CS 331: Artificial Intelligence Propositional Logic I 1 Knowledge-based Agents Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?

More information

Lecture 6: Knowledge 1

Lecture 6: Knowledge 1 rtificial Intelligence, CS, Nanjing University Spring, 08, Yang Yu Lecture 6: Knowledge http://cs.nju.edu.cn/yuy/course_ai8.ash Previously... Basic ability: search Path-based search Iterative-improvement

More information

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics

More information

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim INF5390 Kunstig intelligens Logical Agents Roar Fjellheim Outline Knowledge-based agents The Wumpus world Knowledge representation Logical reasoning Propositional logic Wumpus agent Summary AIMA Chapter

More information

Knowledge based Agents

Knowledge based Agents Knowledge based Agents Shobhanjana Kalita Dept. of Computer Science & Engineering Tezpur University Slides prepared from Artificial Intelligence A Modern approach by Russell & Norvig Knowledge Based Agents

More information

Propositional Resolution

Propositional Resolution Computational Logic Lecture 4 Propositional Resolution Michael Genesereth Spring 2005 Stanford University Modified by Charles Ling and TA, for CS2209 Use with permission Propositional Resolution Propositional

More information

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Description Logics. Foundations of Propositional Logic.   franconi. Enrico Franconi (1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World Agenda Artificial Intelligence 10. Propositional Reasoning, Part I: Principles How to Think About What is True or False 1 Introduction Álvaro Torralba Wolfgang Wahlster 2 Propositional Logic 3 Resolution

More information

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Logic Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Last Lecture Games Cont. α-β pruning Outline Games with chance, e.g. Backgammon Logical Agents and thewumpus World

More information

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference Outline Logical Agents ECE57 Applied Artificial Intelligence Spring 008 Lecture #6 Logical reasoning Propositional Logic Wumpus World Inference Russell & Norvig, chapter 7 ECE57 Applied Artificial Intelligence

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

Kecerdasan Buatan M. Ali Fauzi

Kecerdasan Buatan M. Ali Fauzi Kecerdasan Buatan M. Ali Fauzi Artificial Intelligence M. Ali Fauzi Logical Agents M. Ali Fauzi In which we design agents that can form representations of the would, use a process of inference to derive

More information

Propositional Resolution Introduction

Propositional Resolution Introduction Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg

More information

AI Programming CS S-09 Knowledge Representation

AI Programming CS S-09 Knowledge Representation AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering

More information

Logic. (Propositional Logic)

Logic. (Propositional Logic) Logic (Propositional Logic) 1 REPRESENTING KNOWLEDGE: LOGIC Logic is the branch of mathematics / philosophy concerned with knowledge and reasoning Aristotle distinguished between three types of arguments:

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

More information

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets

More information

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer Artificial Intelligence Propositional Logic Copyright 2011 Dieter Fensel and Florian Fischer 1 Where are we? # Title 1 Introduction 2 Propositional Logic 3 Predicate Logic 4 Reasoning 5 Search Methods

More information

CS 188: Artificial Intelligence Spring 2007

CS 188: Artificial Intelligence Spring 2007 CS 188: Artificial Intelligence Spring 2007 Lecture 8: Logical Agents - I 2/8/2007 Srini Narayanan ICSI and UC Berkeley Many slides over the course adapted from Dan Klein, Stuart Russell or Andrew Moore

More information

Propositional inference, propositional agents

Propositional inference, propositional agents ropositional inference, propositional agents Chapter 7.5 7.7 Chapter 7.5 7.7 1 Outline Inference rules and theorem proving forward chaining backward chaining resolution Efficient model checking algorithms

More information

Propositional logic II.

Propositional logic II. Lecture 5 Propositional logic II. Milos Hauskrecht milos@cs.pitt.edu 5329 ennott quare Propositional logic. yntax yntax: ymbols (alphabet) in P: Constants: True, False Propositional symbols Examples: P

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

Propositional Resolution

Propositional Resolution Artificial Intelligence Propositional Resolution Marco Piastra Propositional Resolution 1] Deductive systems and automation Is problem decidible? A deductive system a la Hilbert (i.e. derivation using

More information

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic Dieter Fensel and Dumitru Roman www.sti-innsbruck.at Copyright 2008 STI INNSBRUCK www.sti-innsbruck.at Where are we? # Title 1 Introduction 2 Propositional Logic

More information

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal

More information

Chương 3 Tri th ức và lập luận

Chương 3 Tri th ức và lập luận Chương 3 Tri thức và lập luận Nội dung chính chương 3 Lecture 1 Lecture 2 Lecture 3,4 I. Logic ngôn ngữ của tư duy II. Logic mệnh đề (cú pháp, ngữ nghĩa, sức mạnh biểu diễn, các thuật toán suy diễn) III.

More information

Introduction to Intelligent Systems

Introduction to Intelligent Systems Logical Agents Objectives Inference and entailment Sound and complete inference algorithms Inference by model checking Inference by proof Resolution Forward and backward chaining Reference Russel/Norvig:

More information

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Propositional logic. First order logic. Alexander Clark. Autumn 2014 Propositional logic First order logic Alexander Clark Autumn 2014 Formal Logic Logical arguments are valid because of their form. Formal languages are devised to express exactly that relevant form and

More information

03 Propositional Logic II

03 Propositional Logic II Martin Henz February 12, 2014 Generated on Wednesday 12 th February, 2014, 09:49 1 Review: Syntax and Semantics of Propositional Logic 2 3 Propositional Atoms and Propositions Semantics of Formulas Validity,

More information

CS 2710 Foundations of AI Lecture 12. Propositional logic. Logical inference problem

CS 2710 Foundations of AI Lecture 12. Propositional logic. Logical inference problem CS 2710 Foundations of I ecture 12 ropositional logic ilos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square ogical inference problem ogical inference problem: Given: a knowledge base K (a set of sentences)

More information

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural

More information

Logic and Inferences

Logic and Inferences Artificial Intelligence Logic and Inferences Readings: Chapter 7 of Russell & Norvig. Artificial Intelligence p.1/34 Components of Propositional Logic Logic constants: True (1), and False (0) Propositional

More information

15414/614 Optional Lecture 1: Propositional Logic

15414/614 Optional Lecture 1: Propositional Logic 15414/614 Optional Lecture 1: Propositional Logic Qinsi Wang Logic is the study of information encoded in the form of logical sentences. We use the language of Logic to state observations, to define concepts,

More information

cis32-ai lecture # 18 mon-3-apr-2006

cis32-ai lecture # 18 mon-3-apr-2006 cis32-ai lecture # 18 mon-3-apr-2006 today s topics: propositional logic cis32-spring2006-sklar-lec18 1 Introduction Weak (search-based) problem-solving does not scale to real problems. To succeed, problem

More information