Solutions to Exercises (Sections )

Similar documents
CS0441 Discrete Structures Recitation 3. Xiang Xiao

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Predicate Logic. Andreas Klappenecker

Rules Build Arguments Rules Building Arguments

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

Readings: Conjecture. Theorem. Rosen Section 1.5

CS 2336 Discrete Mathematics

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Solutions to Exercises (Sections )

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Review: Potential stumbling blocks

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Discrete Structures for Computer Science

Predicate Logic & Quantification

Logic Overview, I. and T T T T F F F T F F F F

MAT 243 Test 1 SOLUTIONS, FORM A

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

COMP232 - Mathematics for Computer Science

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

DISCRETE MATHEMATICS BA202

Logic and Proof. Aiichiro Nakano

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

Rules of Inference. Arguments and Validity

software design & management Gachon University Chulyun Kim

Section 1.2: Propositional Logic

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

1 The Foundation: Logic and Proofs

2. Use quantifiers to express the associative law for multiplication of real numbers.

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

1 The Foundation: Logic and Proofs

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

CSC 125 :: Final Exam May 3 & 5, 2010

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

A. Propositional Logic

PROPOSITIONAL CALCULUS

First order Logic ( Predicate Logic) and Methods of Proof

CPSC 121: Models of Computation

ICS141: Discrete Mathematics for Computer Science I

Intro to Logic and Proofs

Discrete Mathematics. Sec

ECOM Discrete Mathematics

(Refer Slide Time: 02:20)

Do not start until you are given the green signal

Introduction to Sets and Logic (MATH 1190)

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

Discrete Mathematics Recitation Course 張玟翔

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Chapter 3. The Logic of Quantified Statements

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

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

ICS141: Discrete Mathematics for Computer Science I

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

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.

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

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

Math 3336: Discrete Mathematics Practice Problems for Exam I

Section 1.1 Propositions

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. March 1, :00 pm Duration: 1:15 hs

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

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

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Formal (Natural) Deduction for Predicate Calculus

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DISCRETE MATHMATICS DISCUSSION ECOM Eng. Huda M.

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

Propositional Logic Not Enough

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class)

At least one of us is a knave. What are A and B?

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Propositional Logic. Spring Propositional Logic Spring / 32

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

CSE Discrete Structures

It rains now. (true) The followings are not propositions.

Supplementary Logic Notes CSE 321 Winter 2009

CSC 125 :: Final Exam December 15, 2010

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Full file at

Chapter 2: The Logic of Quantified Statements

Chapter 1 Elementary Logic

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

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

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

Mat 243 Exam 1 Review

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology

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

Discrete Mathematical Structures: Theory and Applications

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

Transcription:

s to Exercises (Sections 1.11-1.12) Section 1.11 Exercise 1.11.1 (a) p q q r r p 1. q r Hypothesis 2. p q Hypothesis 3. p r Hypothetical syllogism, 1, 2 4. r Hypothesis 5. p Modus tollens, 3, 4. (b) p (q r) q p 1. q Hypothesis 2. q r Addition, 1 3. (q r) De Morgan's law, 2 4. p (q r) Hypothesis 5. p Modus tollens, 3, 4 (c) (p q) r r q p 1. (p q) r Hypothesis 2. r Hypothesis 3. (p q) Modus tollens, 1, 2. 4. p q De Morgan's law, 3 5. q Hypothesis

6. q Double negation law, 5. 7. p Disjunctive syllogism, 4, 6. (d) (p q) r p r 1. (p q) r Hypothesis 2. p Hypothesis 3. p q Addition, 2. 4. r Modus ponens, 1, 3. (e) p q p r q r 1. p q Hypothesis 2. p r Hypothesis 3. q r Resolution, 1, 2. 4. q Hypothesis 5. r Disjunctive syllogism, 3, 4. (f) p q r u p r q u 1. p q Hypothesis 2. p r Hypothesis 3. p Simplification, 2 4. q Modus ponens, 1, 3. 5. r u Hypothesis 6. r Simplification, 2 7. u Modus ponens, 5, 6 8. q u Conjunction, 4, 7.

Exercise 1.11.2 Some of the rules of inference can be proven using the other rules of inference and the laws of propositional logic. (a) One of the rules of inference is Modus tollens: p q q p Prove that Modus tollens is valid using the laws of propositional logic and any of the other rules of inference besides Modus tollens. (Hint: you will need one of the conditional identities from the laws of propositional logic). 1. p q Hypothesis 2. p q Conditional identity, 1 3. q Hypothesis 4. p Disjunctive syllogism, 2, 3 (b) One of the rules of inference is Modus ponens: p q p q Prove that Modus ponens is valid using the laws of propositional logic and any of the other rules of inference besides Modus ponens. (Hint: you will need one of the conditional identities from the laws of propositional logic). 1. p q Hypothesis 2. p q Conditional identity, 1 3. p Hypothesis 4. p Double negation, 3 5. q Disjunctive syllogism, 2, 4

(c) One of the rules of inference is Disjunctive syllogism : p q p q Prove that Disjunctive syllogism is valid using the laws of propositional logic and any of the other rules of inference besides Disjunctive syllogism. (Hint: you will need one of the conditional identities from the laws of propositional logic). 1. p q Hypothesis 2. p q Double negation, 1 3. p q Conditional identity, 2 4. p Hypothesis 4. q Modus ponens, 3, 4 (d) One of the rules of inference is Resolution: p q p r q r Prove that Resolution is valid using the laws of propositional logic and any of the other rules of inference besides Resolution. (Hint: you will need one of the conditional identities from the laws of propositional logic). 1. p q Hypothesis 2. q p Commutative law, 1 3. q p Double negation, 2 4. q p Conditional identity, 3 5. p r Hypothesis 6. p r Conditional identity, 5 7. q r Hypothetical syllogism, 4, 6 8. q r Conditional identity, 7 9. q r Double negation, 8

Exercise 1.11.3 Prove that each argument is valid by replacing each proposition with a variable to obtain the form of the argument. Then use the rules of inference to prove that the form is valid. (a) If I drive on the freeway, I will see the fire. I will drive on the freeway or take surface streets (or both). I am not going to take surface streets. I will see the fire. w: I drive on the freeway f: I will see the fire s: I drive on surface streets w f w s s f 1. w s Hypothesis 2. s Hypothesis 3. w Disjunctive syllogism, 1, 2 4. w f Hypothesis 5. f Modus ponens, 3, 4 (b) If it was not foggy or it didn't rain (or both), then the race was held and there was a trophy ceremony. The trophy ceremony was not held. It rained. f: it was foggy r: it rained h: the race was held t: the trophy ceremony was held ( f r) (h t) t

r 1. t Hypothesis 2. t h Addition, 1 3. (t h) De Morgan's law, 2 4. (h t) Commutative law, 3 5. ( f r) (h t) Hypothesis 6. ( f r) Modus tollens, 4, 5 7. f r De Morgan's law, 6 8. r Simplification, 7 9. r Double negation, 8 (c) If I work out hard, then I am sore. If I am sore, I take an aspirin. I did not take an aspirin. I did not work out hard. h: I work out hard s: I am sore a: I took an aspirin h s s a a h 1. h s Hypothesis 2. s a Hypothesis 3. h a Hypothetical syllogism, 1, 2 4. a Hypothesis 5. h Modus tollens, 3, 4. Section 1.12 Exercise 1.12.1 Prove that the given argument is valid. First find the form of the argument by defining predicates and expressing the hypotheses and the conclusion using the predicates. Then use the rules of inference to prove that the form is valid. (a)

The domain of discourse is the set of musicians in an orchestra. Everyone practices hard or plays badly (or both). Someone does not practice hard. Someone plays badly. P(x): x practices hard B(x): x plays badly x (P(x) B(x)) x P(x) x B(x) 1. x P(x) Hypothesis 2. (c is a specific musician in the orchestra) P(c) Existential instantiation, 1 3. P(c) Simplification, 2 4. c is a specific musician in the orchestra Simplification, 2 5. x (P(x) B(x)) Hypothesis 6. P(c) B(c) Universal instantiation, 4, 5 7. B(c) Disjunctive syllogism, 3, 6 8. x B(x) Existential generalization, 4, 7 (b) The domain of discourse is the set of people who live in a city. Linda lives in the city. Linda lives in the city. Linda owns a Ferrari. Everyone who owns a Ferrari has gotten a speeding ticket. Linda has gotten a speeding ticket. F(x): x owns a Ferrari S(x): x has gotten a speeding ticket Linda lives in the city F(Linda) x (F(x) S(x)) S(Linda) 1. Linda lives in the city Hypothesis

2. x (F(x) S(x)) Hypothesis 3. F(Linda) S(Linda) Universal instantiation, 1, 2 4. F(Linda) Hypothesis 5. S(Linda) Modus ponens, 3, 4 (c) The domain of discourse is the set of all paintings. All of the paintings by Matisse are beautiful. The museum has a painting by Matisse. The museum has a beautiful painting. B(x): x is beautiful M(x): x is by Matisse S(x): The museum has x x (M(x) B(x)) x(s(x) M(x)) x (B(x) S(x)) 1. x(s(x) M(x)) Hypothesis 2. c is a particular painting Element definition 3. S(c) M(c) Existential instantiation, 1, 2 4. S(c) Simplification, 3 5. M(c) Simplification, 3 6. x (M(x) B(x)) Hypothesis 7. M(c) B(c) Universal instantiation, 2, 6 8. B(c) Modus ponens, 5, 7 9. B(c) S(c) Conjunction, 4, 8 10. x (B(x) S(x)) Existential generalization, 2, 9 (d) The domain is the set of students at an elementary school. Every student who has a permission slip can go on the field trip. Every student has a permission slip. Every student can go on the field trip. P(x): x has a permission slip

F(x): x can go on the field trip : x (P(x) F(x)) x P(x) x F(x) 1. c is an arbitrary student at the school Element definition 2. x (P(x) F(x)) Hypothesis 3. P(c) F(c) Universal instantiation, 1, 2 4. x P(x) Hypothesis 5. P(c) Universal instantiation, 1, 4 6. F(c) Modus ponens, 3, 5 7. x F(x) Universal generalization, 1, 6 (e) The domain of discourse is the set of students at a university. Larry is a student at the university. Hubert is a student at the university. Larry and Hubert are taking Boolean Logic. Any student who takes Boolean Logic can take Algorithms. Larry and Hubert can take Algorithms. B(x): x is taking Boolean Logic A(x): x can take Algorithms Larry is a student at the university. Hubert is a student at the university. B(Larry) B(Hubert) x (B(x) A(x)) A(Larry) A(Hubert) 1. Larry is a student at the university. Hypothesis 2. Hubert is a student at the university. Hypothesis 3. B(Larry) B(Hubert) Hypothesis 4. B(Larry) Simplification, 3 5. x (B(x) A(x)) Hypothesis 6. B(Larry) A(Larry) Universal instantiation, 1, 5 7. A(Larry) Modus ponens, 4, 6

8. B(Hubert) Simplification, 3 9. B(Hubert) A(Hubert) Universal instantiation, 2, 5 10. A(Hubert) Modus ponens, 8, 9 11. A(Larry) A(Hubert) Addition, 7, 10 Exercise 1.12.2 Which of the following arguments are valid? Explain your reasoning. (a) I have a student in my class who is getting an A. Therefore, John, a student in my class is getting an A. : Not valid. Consider the scenario in which there is a student in the class who is not John and is getting an A. Also suppose that John is not getting an A. Under this scenario, the hypothesis is true and the conclusion is false. Therefore, the argument is not valid. (b) Every girl scout who sells at least 50 boxes of cookies will get a prize. Suzy, a girl scout, got a prize. Therefore Suzy sold 50 boxes of cookies. : Not valid. The first hypothesis is that x (S(x) P(x)), where the predicate S(x) means that x has sold at least 50 boxes of cookies and P(x) means that x got a prize. Consider a scenario in which there is a girl scout troop for which x (S(x) P(x)) is true. Furthermore, there is a girl named Suzy in the troop such that P(Suzy) is true and S(Suzy) is false. Then all the hypotheses are true but the conclusion is false. Therefore the argument is not valid. Exercise 1.12.3 Show that the given argument is invalid by giving values for the predicates P and Q over the domain {a, b}. (a) x (P(x) Q(x)) x P(x) x Q(x)

P Q a F T b F T x (P(x) Q(x)) is true because P(x) is false for both inputs a and b. x P(x) is true since both a and b are examples. However, since Q(a) = Q(b) = T, x Q(x) is false. Therefore both hypotheses are true and the conclusion is false. (b) x (P(x) Q(x)) x Q(x) x P(x) P Q a F T b F F x (P(x) Q(x)) is true because P(a) Q(a) is true. x Q(x) is true since Q(b) is true. However, since P(a) = P(b) = F, x P(x) is false. Therefore both hypotheses are true and the conclusion is false. Exercise 1.12.4 Determine whether each argument is valid. If the argument is valid, give a proof using the laws of logic. If the argument is invalid, give values for the predicates P and Q over the domain {a, b} that demonstrate the argument is invalid. (a) x (P(x) Q(x)) x Q(x) x P(x) Valid. 1. x (P(x) Q(x)) Hypothesis 2. (c is a particular element) (P(c) Q(c)) Existential instantiation, 1 3. P(c) Q(c) Simplification, 2 4. P(c) Simplification, 3 5. c is a particular element Simplification, 2 6. x P(x) Existential generalization, 4, 5 7. Q(c) Simplification, 3 8. x Q(x) Existential generalization, 5, 7

9. x P(x) x Q(x)Conjunction, 6, 8 (b) x Q(x) x P(x) x (P(x) Q(x)) Not valid. P Q a F T b T F x Q(x) is true because Q(a) is true. x P(x) is true because P(b) is true. However, neither P(a) Q(a) nor P(b) Q(b) is true, so x (P(x) Q(x)) is false. Therefore the hypothesis is true and the conclusion is false. (c) x (P(x) Q(x)) x Q(x) x P(x) Valid. 1. x (P(x) Q(x)) Hypothesis 2. c is an arbitrary element Element definition 3. P(c) Q(c) Universal instantiation, 1, 2 4. P(c) Simplification, 3 5. x P(x) Universal generalization, 2, 4 6. Q(c) Simplification, 3 7. x Q(x) Universal generalization, 2, 6 8. x P(x) x Q(x)Conjunction, 5, 7 (d) x (P(x) Q(x)) x Q(x) x P(x) Not valid. P Q a F T b T F

P(a) Q(a) and P(b) Q(b) are both true, so x (P(x) Q(x)) is true. However, neither x P(x) nor x Q(x) is true. Therefore the hypothesis is true and the conclusion is false.