Gremlins and Goblins Gremlins always tell the truth. Goblins sometimes lie. Unfortunately, their appearance is identical. You are in a dungeon with two.

Slides:



Advertisements
Similar presentations
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)
Advertisements

Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
PROOF BY CONTRADICTION
Possible World Semantics for Modal Logic
First Order Logic Resolution
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
04 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Resolution in Propositional and First-Order Logic.
CLASSICAL LOGIC and FUZZY LOGIC. CLASSICAL LOGIC In classical logic, a simple proposition P is a linguistic, or declarative, statement contained within.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Logic 1 Statements and Logical Operators. Logic Propositional Calculus – Using statements to build arguments – Arguments are based on statements or propositions.
Logic 3 Tautological Implications and Tautological Equivalences
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Uses for Truth Tables Determine the truth conditions for any compound statementDetermine the truth conditions for any compound statement Determine whether.
CSRU 1100 Logic. Logic is concerned with determining: Is it True? Is it False?
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
Introduction to Logic Logical Form: general rules
Solving Systems of Linear Equations using Elimination
CSCI2110 – Discrete Mathematics Tutorial 8 Propositional Logic Wong Chung Hoi (Hollis)
Propositions and Truth Tables
Postulates and Paragraph Proofs
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Fall 2010 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
CS 173, Lecture B September 1, 2015 Tandy Warnow.
Chapter 3 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
Chapter Six Sentential Logic Truth Trees. 1. The Sentential Logic Truth Tree Method People who developed the truth tree method: J. Hintikka— “model sets”
F22H1 Logic and Proof Week 6 Reasoning. How can we show that this is a tautology (section 11.2): The hard way: “logical calculation” The “easy” way: “reasoning”
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.7 Switching Circuits.
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 3.1 Logic Statements.
Slides for CISC 2315: Discrete Structures Chapters CISC 2315 Discrete Structures Professor William G. Tanner, Jr. SPRING 2010 Slides created by James.
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Spring 2011 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
Gremlins and Goblins Gremlins always tell the truth. Goblins sometimes lie. Unfortunately, their appearance is identical. You are in a dungeon with two.
Section 2.2 More about Solving Equations. Objectives Use more than one property of equality to solve equations. Simplify expressions to solve equations.
MATH 224 – Discrete Mathematics
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
Thinking Mathematically
Chapter 1: The Foundations: Logic and Proofs
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
Inverse, Contrapositive & indirect proofs Sections 6.2/6.3.
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 25.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Solve 7n – 2 = 5n + 6. Example 1: Solving Equations with Variables on Both Sides To collect the variable terms on one side, subtract 5n from both sides.
Thinking Mathematically Logic 3.4 Truth Tables for the Conditional and Biconditional.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
CS 270 Lecture 1 In Class Problems. Q1: Logic Puzzle You arrive at the end of a long hallway. There are two knights guarding two doors. One knight always.
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
Identities, Contradictions and Conditional Equations.
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
The Foundations: Logic and Proofs
Classwork/Homework Classwork – Page 90 (11 – 49 odd)
Introduction to Knowledge-bases
Discrete Mathematics Lecture # 2.
Discrete Structures for Computer Science
Propositional Equivalences
Indirect Proofs.
Equations and Inequalities
TRUTH TABLES.
A Brief Summary for Exam 1
(1.4) An Introduction to Logic
Logical Truth To show a statement A is a logic truth (tautology) ...
Statements of Symbolic Logic
Section 3.7 Switching Circuits
Section 3.3 Truth Tables for the Conditional and Biconditional
Truth Tables for the Conditional and Biconditional
THE LAWS OF LOGIC Let’s be reasonable!.
Presentation transcript:

Gremlins and Goblins Gremlins always tell the truth. Goblins sometimes lie. Unfortunately, their appearance is identical. You are in a dungeon with two gremlins and a goblin (but you don’t know which is which). There is a red door and a blue door. One door leads to the exit. The other door leads to a pit of deadly venomous snakes.

The Query Your objective is to find the exit. Your companions give you some advice: –Gorbnitz (G1): The red door is the way out. I am telling the truth! –Grovnack (G2): The blue door is the way out. Gorbnitz is lying!! –Glidnoph (G3): I don’t know which door is the way out, but Gorbnitz is telling the truth.

Solving the Problem Express the problem in first-order logic. Express the negated goal in first-order logic and add it to the KB. Translate all of the knowledge into standard form (clausal normal form). Apply resolution to derive a contradiction. The answer is in the bindings.

Describing the Problem Goblins /gremlins mutually exclusive… –  x Gob(x)   Grem(x) –  x Grem(x)   Gob(x) One goblin… –Gob(G1)  Gob(G2)  Gob(G3) Two gremlins… –(Grem(G1)  Grem(G2))  (Grem(G1)  Grem(G3))  (Grem(G1)  Grem(G3))

The Problem II Exactly one door is the exit –Exit(Red)  Exit(Blue) –  (Exit(Red)  Exit(Blue) The creatures’ statements: –Grem(G1)  Exit(Red)  Grem(G1) –Grem(G2)  Exit(Blue)  Grem(G2) –Grem(G3)  Grem(G1)

Describing the Negated Goal Goal:  e Exit(e) Negated goal:  e  Exit(e)

Clausal Normal Form  Gob(x)   Grem(x)  Grem(y)   Gob(y) [redundant] Gob(G1)  Gob(G2)  Gob(G3) Grem(G1)  Grem(G2) Grem(G2)  Grem(G3) Grem(G1)  Grem(G3)  Grem(G1)  Exit(Red)  Grem(G1)  Grem(G1) [tautology]  Grem(G2)  Exit(Blue)  Grem(G2)  Grem(G2) [tautology]  Grem(G3)  Grem(G1)  Exit(e) [negated goal]

Think about the proof! Both G1 and G3 say that G1 is telling the truth, so this must be true (since they can’t both be lying) If G1 is telling the truth, then the red door is the exit! Now all we have to do is construct the resolution proof tree that demonstrates this line of reasoning

Resolution Proof Tree  Grem(G3)  Grem(G1)Grem(G3)  Grem(G1) Grem(G1)  Grem(G1)  Exit(Red) Exit(Red)  Exit(e) FALSE {e/Red}

The Answer The exit is red!