Recitation Week 3. Taylor Spangler. January 23, 2012

Similar documents
We last time we began introducing equivalency laws.

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

CSC Discrete Math I, Spring Propositional Logic

2.2: Logical Equivalence: The Laws of Logic

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

CSC165 Mathematical Expression and Reasoning for Computer Science

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Definition 2. Conjunction of p and q

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

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

MATH 215 Discrete Mathematics Worksheets. Which of these are propositions? What are the truth values of those that are propositions?

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

Proofs. Joe Patten August 10, 2018

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Homework assignment 1: Solutions

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

The Logic of Compound Statements cont.

C241 Homework Assignment 4

EECS 1028 M: Discrete Mathematics for Engineers

Chapter 1, Section 1.1 Propositional Logic

CSE 20 DISCRETE MATH WINTER

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

Solutions to Sample Problems for Midterm

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

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Introduction to Decision Sciences Lecture 2

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

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

For all For every For each For any There exists at least one There exists There is Some

1.1 Language and Logic

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

Discrete Structures for Computer Science

Equivalence and Implication

CS 173: Discrete Mathematical Structures, Spring 2008 Homework 1 Solutions

Truth-Functional Logic

Propositional Logic and Semantics

Prof. Girardi Exam 1 Math 300 MARK BOX

Proof by contrapositive, contradiction

CSE 20 DISCRETE MATH WINTER

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

CSE 20: Discrete Mathematics

Propositional Languages

Propositional Logic: Equivalence

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Show Your Work! Point values are in square brackets. There are 35 points possible. Tables of tautologies and contradictions are on the last page.

Section 1.2: Propositional Logic

Logic and Propositional Calculus

1.1 Statements and Compound Statements

PS10.3 Logical implications

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

Logic: Propositional Logic (Part I)

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

Course Staff. Textbook

Logic and Propositional Calculus

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

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

Compound Propositions

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Math 3336: Discrete Mathematics Practice Problems for Exam I

More examples of mathematical. Lecture 4 ICOM 4075

PROPOSITIONAL CALCULUS

Mathematical Logic Part One

Lecture 02: Propositional Logic

Announcements CompSci 102 Discrete Math for Computer Science

1 Boolean Algebra Simplification

Introduction. Applications of discrete mathematics:

Today s Topic: Propositional Logic

Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai , India. Assignment 1 - Propositional Logic

1 Propositional Logic

1 Propositional Logic

Boolean Logic. CS 231 Dianna Xu

CS 486: Lecture 2, Thursday, Jan 22, 2009

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Math.3336: Discrete Mathematics. Propositional Equivalences

Exercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.

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

Logic, Sets, and Proofs

COS 140: Foundations of Computer Science

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Stanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014

Announcement. Homework 1

Lecture 3 : Predicates and Sets DRAFT

Section 2.3: Statements Containing Multiple Quantifiers

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Chapter 4: Classical Propositional Semantics

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Part I: Propositional Calculus

PHIL12A Section answers, 16 February 2011

Section 1.1: Logical Form and Logical Equivalence

Supplementary exercises in propositional logic

Logic. Quantifiers. (real numbers understood). x [x is rotten in Denmark]. x<x+x 2 +1

15414/614 Optional Lecture 1: Propositional Logic

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Learning Goals of CS245 Logic and Computation

Topic 1: Propositional logic

Transcription:

Recitation Week 3 Taylor Spangler January 23, 2012 Questions about Piazza, L A TEX or lecture? Questions on the homework? (Skipped in Recitation) Let s start by looking at section 1.1, problem 15 on page 14 of your Rosen textbook 1. First, lets figure out what our terms are: - p : Grizzly bears have been in the area. - q : Hiking is safe on the trail. - r : Berries are ripe along the trail. 2. Now why don t we try converting the following sentences into logical connectives, our clauses: a : Berries are ripe along the trail, but grizzly bears have not been seen in the area: r p b : Grizzly bears have not been seen in the area and hiking on the trail is safe, but berries are ripe along the trail: p q r c : If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not been seen in the area: r (q p) d : It is not safe to hike on the trail, but grizzly bears have not been seen in the area and berries along the trail are ripe: q p r e : For hiking on the trail to be safe, it is necessary but not sufficient that berries not be ripe along the trail and for grizzly bears not to have been seen in the area: (q ( r p)) (( r p) q) f : Hiking is not safe on the trail whenever grizzly bears have been seen in the area and berries are ripe along the trail: (p r) q 1

Now let s look at section 1.1, problem 35, part C. Construct the truth table for the following (p q) ( p q) 1. First we break the problem into 3 parts - p q - p q - (p q) ( p q) 2. Now we construct a table filling in the p an q values: 3. Now fill in the rest of the table: p q p q p q (p q) ( p q) 0 0 - - - 0 1 - - - 1 0 - - - 1 1 - - - p q p q p q (p q) ( p q) 0 0 1 0 1 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 Now a harder problem, from section 1.2, problem 35. 1. First decide what the terms are: - Let b be the butler - Let c be the cook - Let g be the gardener - Let h be the handyman We will use 0 to represent that the person is lying, and a 1 to represent that the person is telling the truth. 2. Next we parse the question to get our clauses: - If the butler is telling the truth then so is the cook. b c - The cook and the gardener cannot both be telling the truth. (c g) c g - The gardener and the handyman are not both lying. ( g h) g h - If the handyman is telling the truth, then the cook is lying. h c 2

3. Now we want to find a model for our sentence. Remember a model is a truth assignment of our terms which satisfies all of our clauses. Since we are looking for a model, we can stop looking at an assignment once we see that a clause evaluates to false. A - is used in the following table to denote that we stopped before evaluating that clause. b c g h b c c g g h h c 0 0 0 0 1 1 0-0 0 0 1 1 1 1 1 0 0 1 0 1 1 1 1 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0-0 1 0 1 1 1 1 0 0 1 1 0 1 0 - - 0 1 1 1 1 0 - - 1 0 0 0 0 - - - 1 0 0 1 0 - - - 1 0 1 0 0 - - - 1 0 1 1 0 - - - 1 1 0 0 1 1 0-1 1 0 1 1 1 1 0 1 1 1 0 1 0 - - 1 1 1 1 1 0 - - 4. From this table we can conclude that the butler and the cook are both lying, and that either the gardener, the handyman, or both are telling the truth. Now let s look at Section 1.1 problem number 27 (b) on page 15 of the text: - I come to class whenever there is going to be a quiz. Notice that this can be rephrased If there is going to be a quiz, I come to class. p q - What is the inverse of this sentence, p q? If there is not going to be a quiz, then I do not come to class. - What is the converse of this sentence, q p? If I come to class, then there is a quiz. - What is the contrapositive of this sentence, q p? If I do not come to class, then there will not be a quiz. - Let s compare the truth tables for the inverse, contrapositive, and converse with implication. p q p q p q q p q p 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1 3

Now let s look at a different kind of problem, section 1.1 problem 17 (c) on page 14. Let p stand for 1 + 1 = 3 Let q stand for Dogs can fly. What is p q? 1 0 which is false. 1.1 number 39, pg 15: Construct the truth table for (p q) (r s) First, can you tell immediately how many rows our truth table will have? With n terms, we get 2 n rows. a b c d (p q) (r s) (p q) (r s) 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 1 1 1 1 Now let s try looking at a problem using logical equivalences. From section 1.3, number 29 on page 35: Show that (p q) (q r) (p r) is a tautology First we will do so by using a truth table, then we will do so using the logical equivalences. Recall that has higher precedence than. We begin by constructing the truth table: 4

p q r p q q r p r (p q) (q r) (p r) 0 0 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 1 We can see that every truth assignment here evaluates to true, therefore we have that this is a tautology. Now let s try proving it using logical equivalences: 1. (p q) (q r) (p r) Given 2. ((p q) (q r)) (p r) Implication 3. (( p q) ( q r)) ( p r) Implication 3 4. ( p q) ( q r) ( p r) DeMorgan s Law 5. (p q) (q r) ( p r) DeMorgan s Law 2 and Double Negation 6. (p q) (q r) p r Associative Law 7. (p q) p (q r) r Commutative Law 8. ((p p) ( p q)) (q r) r Distributive Law 9. (1 ( p q)) (q r) r p p = 1 10. ( p q) (q r) r Identity 11. ( p q) ((q r) ( r r)) Distributive Law 12. ( p q) ((q r) 1) r r = 1 13. ( p q) (q r) Identity 14. p q q r Associative Law 15. p 1 r q q = 1 16. 1 Identity Thus we have a tautology. Now how do we show that 2 things are not logically equivalent, here we see 1.3 problem 31: Show that (p q) r is not logically equivalent to p (q r). Here we can use a counterexample. Suppose p = 0, q = 1, and r = 0. We can see that (p q) r is false, however p (q r) is true. 5

Another useful procedure is to be able to show that two compound propositions are equal. Well to do that we can simply use the logical equivalences. For example, problem number 27 in section 1.3 on page 35: Show that p q p q 1. p q Given 2. p q q p Equivalence Rule 3. p q q p Implication 2 4. q p p q Commutative Law 5. q p p q Double Negation 6. q p p q Implication 2 7. p q q p Commutativity 8. p q Equivalence Rule Thus we have shown that the two are equivalent. (Last 10 minutes) Quiz. 6