Practice assignment 2

Similar documents
Mathematical Logic. Truth Tables. Truth Tables: Example. Practical Class: Formalization in Propositional Logic. Chiara Ghidini

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Math.3336: Discrete Mathematics. Propositional Equivalences

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

Logic: Propositional Logic Truth Tables

Propositional Logic: Review

Write the negation of each of the following propositions without using any form of the word not :

Learning Goals of CS245 Logic and Computation

Logic: Propositional Logic Tableaux

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Propositional Logic Not Enough

1 Propositional Logic

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Generalized Quantifiers Logical and Linguistic Aspects

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

SOEN331 Winter Tutorial 4 on Logic

Only one of the statements in part(a) is true. Which one is it?

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

EXERCISE 10 SOLUTIONS

Deductive Systems. Lecture - 3

Language of Propositional Logic

Logik für Informatiker Formal proofs for propositional logic

A statement is a sentence that is definitely either true or false but not both.

Propositional logic (revision) & semantic entailment. p. 1/34

Predicate Calculus lecture 1

Artificial Intelligence Chapter 7: Logical Agents

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

EECS 1028 M: Discrete Mathematics for Engineers

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Phil Introductory Formal Logic

Section 1.1: Logical Form and Logical Equivalence

Propositional Languages

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

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

THE LOGIC OF COMPOUND STATEMENTS


FUNDAMENTALS OF MATHEMATICS HANDOUT 1.3 DR. MCLOUGHLIN

A Quick Lesson on Negation

Logic Review Solutions

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

The Logic of Compound Statements cont.

Quantifiers. P. Danziger

ARTIFICIAL INTELLIGENCE

Math 3336: Discrete Mathematics Practice Problems for Exam I

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

B1.1 Motivation. Theory of Computer Science. Theory of Computer Science. B1.1 Motivation. B1.2 Syntax. B1.3 Semantics

Compound Propositions

PHIL 50 - Introduction to Logic

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

(p == train arrives late) (q == there are taxis) (r == If p and not q, then r. Not r. p. Therefore, q. Propositional Logic

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Section 2.1: Introduction to the Logic of Quantified Statements

Propositional logic. Programming and Modal Logic

Chapter 1: The Logic of Compound Statements. January 7, 2008

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

Introduction to Sets and Logic (MATH 1190)

Examples. Example (1) Example (2) Let x, y be two variables, and denote statements p : x = 0 and q : y = 1. Solve. x 2 + (y 1) 2 = 0.

Announcements CompSci 102 Discrete Math for Computer Science

Recall that the expression x > 3 is not a proposition. Why?

CIS 375 Intro to Discrete Mathematics Exam 1 (Section M004: Blue) 6 October Points Possible

ANALYSIS EXERCISE 1 SOLUTIONS

LOGIC. Name: Teacher: Pd: Page 1

The statement calculus and logic

Math 2534 Solution Homework 2 sec

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Lecture 4: Proposition, Connectives and Truth Tables

LAMC Intermediate I & II November 9, Oleg Gleizer. The following is the list of the important Boolean algebra properties we have learned.

Logic: Propositional Logic (Part I)

Section 3.1 Statements, Negations, and Quantified Statements

Alternative Notations and Connectives

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Section 2.3: Statements Containing Multiple Quantifiers

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

First-Order Logic (FOL)

Logic of Sentences (Propositional Logic) is interested only in true or false statements; does not go inside.

Propositional Resolution Introduction

Theory of Computer Science

SYMBOLIC LOGIC (PART ONE) LAMC INTERMEDIATE - 5/18/14

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

PL: Truth Trees. Handout Truth Trees: The Setup

Mat 243 Exam 1 Review

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

Logic and Propositional Calculus

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Symbolic Logic Outline

1. Propositions: Contrapositives and Converses

Knowledge Representation. Propositional logic

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

DISCRETE MATHEMATICS BA202

Discrete Structures of Computer Science Propositional Logic I

Discrete Mathematics

CPPE TURN OVER

Transcription:

Exercise 2 1 Practice assignment 2 Propositional Logic Angelo, Bruno and Carlo are three students that took the Logic exam. Let s consider a propositional language where A stands for Aldo passed the exam B stands for Bruno passed the exam C stands for Carlo passed the exam Formalize the following sentences: (a) Carlo is the only one passing the exam (b) Aldo is the only one not passing the exam (c) Only one, among Aldo, Bruno and Carlo, passed the exam (d) At least one among Aldo, Bruno and Carlo passed the exam (e) At least two among Aldo, Bruno and Carlo passed the exam (f) At most two among Aldo, Bruno and Carlo passed the exam (g) Exactly two, among Aldo, Bruno and Carlo passed the exam (a) Carlo is the only one passing the exam C B A (b) Aldo is the only one not passing the exam A B C (c) Only one, among Aldo, Bruno and Carlo, passed the exam (A B C) ( A B C) ( A B C) (d) At least one among Aldo, Bruno and Carlo passed the exam A B C (e) At least two among Aldo, Bruno and Carlo passed the exam (A B) (A c) (B C) (f) At most two among Aldo, Bruno and Carlo passed the exam A B C Practice assignment 2 Page 1/8

(g) Exactly two, among Aldo, Bruno and Carlo passed the exam (A B C) (A B c) ( A B C) Exercise 2 2 (a) Let p be the proposition You have the flu, q be the proposition You miss the final examination and r be the proposition You pass the course. Express the following as an English sentence: (p r) (q r) (b) Let p be the proposition You get an A on the final exam, q be the proposition You do every exercise in the book and r be the proposition You get an A in this course Write down the following using p; q and r and logical connectives: Getting an A on the final and doing every exercise in the book is sufficient for getting an A in this course. (c) Express the following statements in propositional logic: 1. If premises are either true or false, then arguments can only be either true or false. 2. If the set of sets that are not members of themselves is a member of itself, then it is not a member of itself. (a) If you have the flu or you miss the final examination then you will not pass the course. (b)(p q) r (c) 1. (p p) (q q) 2. p p Exercise 2 3 Translation (a) If it is hot and humid, then it is raining. (b) If it is humid, then it is hot. (c) It is either humid or hot. (d) It is never humid and cold. (e) If it is raining and not humid then it is cold. Translate the following statements into propositional logic formulas using the following propositions: h: it is hot. m: it is humid. r: it is raining. c: it is cold. (a) If it is hot and humid, then it is raining: h m r (b) If it is humid, then it is hot: m h (c) It is either humid or hot: m h Practice assignment 2 Page 2/8

(d) It is never humid and cold: (m c) (e) If it is raining and not humid then it is cold: (r h) c Exercise 2 4 It is not the case that the car is red and the truck is blue. Let proposition p = the car is red and q = the truck is blue. Which formula represents the above statement? i. p q ii. (p q) iii. (p q) iv. p q iii. (p q) Exercise 2 5 Three boxes are presented to you. One contains gold, the other two are empty. Each box has imprinted on it a clue as to its contents; the clues are: Box 1 The gold is not here Box 2 The gold is not here Box 3 The gold is in Box 2 Only one message is true; the other two are false. Which box has the gold? using truth table: Box 1 The gold is not here means B1 Box 2 The gold is not here means B2 Box 3 The gold is in Box 2 means B2 We can formalize the statements of the problem as follows: One box contains gold, the other two are empty. Eqn(1) : (B1 B2 B3) ( B1 B2 B3) ( B1 B2 B3) Only one message is true; the other two are false. Eqn(2) : ( B1 B2 B2) ( B1 B2 B2) ( B1 B2 B2) Practice assignment 2 Page 3/8

B1 B2 B3 Eqn(1) Eqn(2) t t t f f t t f t f t t f t t f f f t f t f f f f f f f The only message that verifies both Eqn(1) and Eqn(2) is the one with I(B1) =T and I(B2) = I(B3) = F, which implies that the gold is in the first box. Exercise 2 6 Kyle, Neal, and Grant find themselves trapped in a dark and cold dungeon (how they arrived there is another story). After a quick search the boys find three doors, the first one red, the second one blue, and the third one green. Behind one of the doors is a path to freedom. Behind the other two doors, however, is an evil fire-breathing dragon. Opening a door to the dragon means almost certain death. On each door there is an inscription: Red Door: Freedom is behind this door. Blue Door: Freedom is not behind this door. Green Door: Freedom is not behind the blue door. Given the fact that at LEAST ONE of the three statements on the three doors is true and at LEAST ONE of them is false, which door would lead the boys to safety? r: freedom is behind the red door b: freedom is behind the blue door g: freedom is behind the green door We can formalize the statements of the problem as follows: behind one of the door is a path to freedom, behind the other two doors is an evil dragon (r b g) ( r b g) ( r b g) at least one of the three statements is true (r b) at least one of the three statements is false ( r b) r b g Eqn(2) Eqn(3) Eqn(2 3) t f f t f f f t f f t f f f Freedom is behind the green door. Practice assignment 2 Page 4/8

Exercise 2 7 Let F = ((b c) (( a b) (c a))) be a formula and A = {(a f), (b f), (c t)} be a valuation for F. Find the interpretation of F. I(F) = f Exercise 2 8 Show that the following formulas can be replaced by equivalent formulas that only use and as connectives. (a) (b) (c) a b (d) a b (e) a b (a) (a a) (b) (a a) (c) a b ( a b) (d) a b a b (e) a b ( ( a b) ( b a)) Exercise 2 9 Show that the following formulas can be replaced by equivalent formulas that only use and as connectives. (a) a (b) (c) a b (d) a b (e) a b (a) a a Practice assignment 2 Page 5/8

(b) a a (c) a b (a (b )) (d) a b ((a ) b) (e) a b ((a b) ((b a) )) Exercise 2 10 For each of the following propositions, decide whether the proposition is valid, satisfiable, unsatisfiable or falsifiable. (a) p ( q r) p q r p ( q r) f t f t t f f t t t f f p ( q r) is satisfiable and falsifiable. (b) p (q r) p q r p (q r) f t f f t f f t p (q r) is satisfiable and falsifiable. (c) (p q) ( p r) p q r (p q) ( p r) f t f t t f f t (p q) ( p r) is valid and satisfiable. (d) (p q) ( p r) Practice assignment 2 Page 6/8

p q r (p q) ( p r) f f f f f t f f t f f f t f t f (p q) ( p r) is satisfiable and falsifiable. (e) (p q) ( q r) p q r (p q) ( q r) f t f t f t t f t f f f (p q) ( q r) is satisfiable and falsifiable. (f) ( p q) (p q) p q ( p q) (p q) f f f f t f t f f t t f ( p q) (p q) is unsatifsiable and falsifiable. Exercise 2 11 Determine which of the following are equivalent to each other: (a) (P Q) ( P Q) (b) P Q (c) (P Q) (Q P) (d) (P Q) (e) (Q P) P p q (P Q) ( P Q) P Q (P Q) (Q P) (P Q) (Q P) P f f t f t f t f f t t f f f f f f t f t Practice assignment 2 Page 7/8

(P Q) ( P Q) (P Q) (Q P) ( P Q) ((Q P) P) Exercise 2 12 A formula F is said to be unstable if for every valuation A, changing the truth assignment to a single variable, changes the interpretation of F. Find an unstable formula containing the atoms {a, b, c}. a b c F f f t f f t f f t f f f t t t f F = ( a b c) ( a b c) (a b c) (a b c) Useful Links https://www.geeksforgeeks.org/propositional-and-first-order-logic-qq/ http://www.logicinaction.org/docs/ch2.pdf http://turner.faculty.swau.edu/mathematics/materialslibrary/truth/ Practice assignment 2 Page 8/8