Homework 2: Solutions

Similar documents
Midterm: Sample 3. ECS20 (Fall 2017) 1) Using truth tables, establish for each of the two propositions below if it is a tautology, a contradiction

Homework 4 Solutions

COM S 330 Homework 02 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem.

Homework 5 Solutions

Homework 3: Solutions

Finals: Solutions. ECS 20 (Fall 2009) Patrice Koehl May 20, 2016

Homework 5 Solutions

Logic and Proofs. Jan COT3100: Applications of Discrete Structures Jan 2007

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

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

Math.3336: Discrete Mathematics. Applications of Propositional Logic

CS 220: Discrete Structures and their Applications. Propositional Logic Sections in zybooks

Quiz 1. Directions: Show all of your work and justify all of your answers.

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

Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers

Definition 2. Conjunction of p and q

Announcements CompSci 102 Discrete Math for Computer Science

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

Discrete Mathematics and Its Applications

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

The Logic of Compound Statements cont.

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

2 Truth Tables, Equivalences and the Contrapositive

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Solutions to Homework I (1.1)

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

Propositional Logic 1

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

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

RYERSON UNIVERSITY DEPARTMENT OF MATHEMATICS

Homework assignment 1: Solutions

Box. Turn in your e xam to Kathy Stackhouse in Chem 303 by noon on Thursday, March 30.

Proving Things. 1. Suppose that all ravens are black. Which of the following statements are then true?

1) Let h = John is healthy, w = John is wealthy and s = John is wise Write the following statement is symbolic form

2.2: Logical Equivalence: The Laws of Logic

CSC Discrete Math I, Spring Propositional Logic

AN INTRODUCTION TO MATHEMATICAL PROOFS NOTES FOR MATH Jimmy T. Arnold

Introduction to Sets and Logic (MATH 1190)

Some Review Problems for Exam 1: Solutions

Truth-Functional Logic

Propositional Logic: Semantics

The Foundations: Logic and Proofs. Part I

Tautologies, Contradictions, and Contingencies

Swansea University Mathematics scholarship exam 2016

Automated Solution of the Riddle of Dracula and Other Puzzles

Supplementary exercises in propositional logic

1.3 Propositional Equivalences

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

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Compound Propositions

Knights, Knaves, and Logical Reasoning Mechanising the Laws of Thought

Reading: EC 1.3. Peter J. Haas. INFO 150 Fall Semester 2018

COT 2104 Homework Assignment 1 (Answers)

Review Sheet for the Final Exam of MATH Fall 2009

COMP Intro to Logic for Computer Scientists. Lecture 3

Chapter 2: The Logic of Compound Statements

Logic and Proofs. (A brief summary)

Sec$on Summary. Tautologies, Contradictions, and Contingencies. Logical Equivalence. Normal Forms (optional, covered in exercises in text)

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

1. Propositions: Contrapositives and Converses

CS103 Handout 09 Fall 2012 October 19, 2012 Problem Set 4

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

Section L.1- Introduction to Logic

Proving Things. Why prove things? Proof by Substitution, within Logic. Rules of Inference: applying Logic. Using Assumptions.

Logic for Computer Science - Week 5 Natural Deduction

Lecture 9: The Splitting Method for SAT

Chapter 4, Logic using Propositional Calculus Handout

A linear equation in two variables is generally written as follows equation in three variables can be written as

Problem Set 7 Solutions

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

1 Tautologies, contradictions and contingencies

PUZZLE. You meet A, B, and C in the land of knights and knaves. A says Either B and I are both knights or we are both knaves.

Chapter 5: Section 5-1 Mathematical Logic

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

MAT 101 Exam 2 Logic (Part I) Fall Circle the correct answer on the following multiple-choice questions.

Natural Deduction for Propositional Logic

Algebra. Formal fallacies (recap). Example of base rate fallacy: Monty Hall Problem.

Math.3336: Discrete Mathematics. Propositional Equivalences

Topic 1: Propositional logic

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

1 The Foundations. 1.1 Logic. A proposition is a declarative sentence that is either true or false, but not both.

Discrete Mathematics and its Applications

Section 1.2: Propositional Logic

Conjunctive Normal Form and SAT

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

Introduction to Metalogic 1

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

Logic. Part I: Propositional Logic. Max Schäfer. Formosan Summer School on Logic, Language, and Computation 2010

ANALYSIS EXERCISE 1 SOLUTIONS

DISCRETE MATH: FINAL REVIEW

1. Prove that the number cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3).

2. Introduction to commutative rings (continued)

Equivalence and Implication

EECS 1028 M: Discrete Mathematics for Engineers

Propositional Equivalence

Independent Events. The multiplication rule for independent events says that if A and B are independent, P (A and B) = P (A) P (B).

ON1 Big Mock Test 4 October 2013 Answers This test counts 4% of assessment for the course. Time allowed: 10 minutes

2. Prove that there are no positive perfect cubes less than 1000 that are the sum of the cubes of two positive integers.

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

Transcription:

Homework 2: Solutions ECS 20 (Fall 2014) Patrice Koehl koehl@cs.ucdavis.edu October 7, 2014 Exercise 1 Construct a truth table for each of these compound propositions: a) (p q) (p q) p q p q p q (p q) (p q) T T T T T T F F T T F T F T T F F F F T b) (q p) (p q) p p q q p p q (q p) (p q) T F T F T F T F F T F F F T T T F F F T F T T T c) (p q) (p q) p q q p q p q (p q) (p q) T T F T F T T F T F T T F T F F T T F F T T F T 1

Exercise 2 Construct a truth table for each of these compound propositions: a) (p q) (p q) p q q p q (p q) (p q) (p q) T T F F T T T F T T F T F T F T F T F F T F T T b) (p q) (p q) p q q p q (p q) (p q) (p q) T T F F T F T F T T F F F T F T F F F F T F T F Exercise 3 Is the assertion This statement is false a proposition? Answer: NO. It is a paradox. It is impossible to assign a consistent truth value to the statement as it contradicts itself. Let us say it is a proposition and it is true. Saying This statement is false leads us to conclude that the statement itself is false, which is in contradiction with our assumption. Similarly, if we assume the proposition is false, then This statement is false is false which means This statement must be true, which is also a contradiction. Exercise 4 A contestant in a TV game show is presented with three boxes, A, B, and C. He is told that one of the boxes contains a prize, while the two others are empty. Each box has a statement written on it: Box A: The prize is in this box Box B: The prize is not in box A Box C: The prize is not in this box The host of the show tells the contestant that only one of the statements is true. Can the contestant find logically which box contains the prize? Justify your answer. The simplest approach to solve this problem is to check systematically if A, B, or C contains the prize. In each case, we test the validities of the three statements. 2

Box A Box B Box C Box with prize prize is in this box prize is not in box A prize is not in this box Box A True False True Box B False True True Box C False True False If the prize were in box A or B, two of the propositions would be true, while if the prize is in box C, only one proposition would be true. The latter is therefore true, and the prize is in box C. Exercise 5 This exercise relate to the inhabitants of the island of knights and knaves created by Smullyan, where knights always tell the truth and knaves always lie. You encounter two people, A and B. Determine, if possible, what A and B are if they address you in the way described. If you cannot determine what these two people are, can you draw any conclusions? A says The two of us are both knights, and B says A is a knave. We proceed as in class. We check all possible values for A and B, as well as the veracity of their statements: Line number A B A says B says The two of us are both knights A is a knave 1 Knight Knight T F 2 Knight Knave F F 3 Knave Knight F T 4 Knave Knave F T We can eliminate: Line 1, as B would be a knight but he lies Line 2, as A would be a knight but he lies Line 4 as B would be a knave but he says the true Line 3 is valid, and it is the only one. Therefore, A is a knave and B is a knight. Exercise 6 Use truth tables to verify the associative laws: 3

a) (p q) r p (q r) We need to show that the two propositions (p q) r and p (q r) have the same truth values: p q r p q q r (p q) r p (q r) T T T T T T T T T F T T T T T F T T T T T T F F T F T T F T T T T T T F T F T T T T F F T F T T T F F F F F F F b) (p q) r p (q r) We need to show that the two propositions (p q) r and p (q r) have the same truth values: p q r p q q r (p q) r p (q r) T T T T T T T T T F T F F F T F T F F F F T F F F F F F F T T F T F F F T F F F F F F F T F F F F F F F F F F F 4

Exercise 7 Show that p q and (p q) ( p q) are equivalent. We show that these two statements have the same truth values: p q p q p q p q (p q) ( p q) p q T T T F F F T T T F F F T F F F F T F T F F F F F F F T T T T T Exercise 8 Show that ( (p F ) ( q T )) p and q p are equivalent. We will use logical equivalence. Let us define A = ( (p F ) ( q T )) p. We proceed by equivalence: A ( (p F ) ( q T )) p Problem definition ( p q) p Absorption law ( p p) ( q p) Distributivity law T (p q) Complement law p q Absorption law q p Definition of implication Extra Credit We are back on the island of knights and knaves (see exercise above). John and Bill are residents. John: if Bill is a knave, then I am a knight Bill: we are different Who is who? We proceed as for exercise 5: we check all possible values for John and Bill, as well as the veracity of their statements. Note that John s statement is an implication. Line number John Bill John says Bill says If Bill is a knave, then I am a knight We are different 1 Knight Knight T F 2 Knight Knave T T 3 Knave Knight T T 4 Knave Knave F F We can eliminate: 5

Line 1, as Bill would be a knight but he lies Line 2, as Bill would be a knave but he tells the truth Line 3 as John would be a knave but he says the true Line 4 is valid, and it is the only one. Therefore, both John and Bill are knaves. 6