CS0441 Discrete Structures Recitation 3. Xiang Xiao

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

Solutions to Exercises (Sections )

Review: Potential stumbling blocks

Discrete Mathematics Recitation Course 張玟翔

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

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

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

CS 2336 Discrete Mathematics

Rules Build Arguments Rules Building Arguments

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

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

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

Discrete Mathematics. Sec

software design & management Gachon University Chulyun Kim

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

Discrete Structures for Computer Science

ICS141: Discrete Mathematics for Computer Science I

Rules of Inference. Arguments and Validity

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

Readings: Conjecture. Theorem. Rosen Section 1.5

Predicate Logic. Andreas Klappenecker

DISCRETE MATHEMATICS BA202

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

Logic and Proof. Aiichiro Nakano

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

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

Discrete Mathematics for CS Spring 2006 Forbes HW 1 Solutions

A. Propositional Logic

CSE 20 DISCRETE MATH. Fall

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

CSC 125 :: Final Exam December 15, 2010

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

MAT 243 Test 1 SOLUTIONS, FORM A

DISCRETE MATH: LECTURE Chapter 3.3 Statements with Multiple Quantifiers If you want to establish the truth of a statement of the form

CSI30. Chapter 1. The Foundations: Logic and Proofs Nested Quantifiers

Do not start until you are given the green signal

Chapter 3. The Logic of Quantified Statements

Predicate Logic & Quantification

CSE 20 DISCRETE MATH. Winter

Math 3336: Discrete Mathematics Practice Problems for Exam I

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

Chapter 4, Logic using Propositional Calculus Handout

CSC 125 :: Final Exam December 14, 2011

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

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

Discrete Structures Homework 1

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.

Chapter 2: The Logic of Quantified Statements

Solutions to Exercises (Sections )

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

PROPOSITIONAL CALCULUS

Review. p q ~p v q Contrapositive: ~q ~p Inverse: ~p ~q Converse: q p

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

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Intro to Logic and Proofs

CSE Discrete Structures

Math 55 Homework 2 solutions

Full file at Chapter 1

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

Propositional Logic Not Enough

ECOM Discrete Mathematics

Supplementary Logic Notes CSE 321 Winter 2009

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

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

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

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

Mat 243 Exam 1 Review

Computer Science 280 Spring 2002 Homework 2 Solutions by Omar Nayeem

Section 1.1 Propositions

First order Logic ( Predicate Logic) and Methods of Proof

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

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

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

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

1 The Foundation: Logic and Proofs

Propositional Functions. Quantifiers. Assignment of values. Existential Quantification of P(x) Universal Quantification of P(x)

CSE Discrete Structures

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

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

ITS336 Lecture 6 First-Order Logic

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

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

A Little Deductive Logic

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Section 1.2: Propositional Logic

1 The Foundation: Logic and Proofs

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

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

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Reexam in Discrete Mathematics

Mat2345 Week 2. Chap 1.5, 1.6. Fall Mat2345 Week 2. Chap 1.5, 1.6. Week2. Negation. 1.5 Inference. Modus Ponens. Modus Tollens. Rules.

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

Collins' notes on Lemmon's Logic

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

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

Full file at

Transcription:

CS0441 Discrete Structures Recitation 3 Xiang Xiao

Section 1.5 Q10 Let F(x, y) be the statement x can fool y, where the domain consists of all people in the world. Use quantifiers to express each of these statements. g. Nancy can fool exactly two people. x y( F( Nancy, x) F( Nancy, y) ( x y) z( F( Nancy, z) ( z x) ( z y))) h. There is exactly one person whom everybody can fool. x y( F( x, y) z( F( x, z) ( z y))) j. There is someone who can fool can fool exactly one person besides himself or herself x y( F( x, y) ( x y) z( F( x, z) ( z y)))

Section 1.5 Q14 Use quantifiers and predicates with more than one variable to express these statements e. There is a student in this class who has taken every course offered by one of the departments in this school. T(x, y): student x has taken course y; O(y, z): course y is offered by department z. x y z( O( y, z) T ( x, y))

Section 1.5 Q14 Use quantifiers and predicates with more than one variable to express these statements f. Some student in this class grew up in the same town as exactly one other student in this class Domain: student in this class S(x, y): x grew up in the same town as y. x y( S( x, y) ( x y) z( S( x, z) ( z y)))

Section 1.5 Q32 Express the negations of each of these statements so that all negation symbols immediately precede predicates. c. x y( Q( x, y) Q( y, x) Step 1: x y( Q( x, y) Q( y, x) x y ( Q( x, y) Q( y, x) Step 2: ( Q( x, y) Q( y, x)) (( Q( x, y) Q( y, x)) ( Q( y, x) Q( x, y))) (( Q( x, y) Q( y, x)) ( Q( y, x) Q( x, y))) ( ( Q( x, y) Q( y, x)) ( ( Q( y, x) Q( x, y))) ( Q( x, y) Q( y, x)) ( Q( y, x) Q( x, y))) Step 3: x y( Q( x, y) Q( y, x) x y( Q( x, y) Q( y, x)) ( Q( y, x) Q( x, y)))

Section 1.6 Q6 Use rules of inference to show that the hypotheses If it does not rain or if it is not foggy, then the sailing race will be held and the lifesaving demonstration will go on, If the sailing race is held, then the trophy will be awarded, and The trophy was not awarded imply the conclusion It rained. p: It rains; q: It is foggy; r: the sailing race will is held; s: the lifesaving demonstration goes on t: the trophy is awarded Step Reason

Section 1.6 Q6 Use rules of inference to show that the hypotheses If it does not rain or if it is not foggy, then the sailing race will be held and the lifesaving demonstration will go on, If the sailing race is held, then the trophy will be awarded, and The trophy was not awarded imply the conclusion It rained. Step Reason 1. t Premise 2. r t Premise 3. r Modus tollens from (1) and (2) 4. p q r s Premise 5. r s r Simplification 6. p q r Hypothetical syllogism from (4) and (5) 7. ( p q) Modus tollens from (3) and (6) 8. p q De Morgan's law, Double negation 9. p Simplification from (8)

Section 1.6 Question 14 For each of these arguments, explain which rules of inference are used for each step. a. Linda, a student in this class, owns a red convertible. Everyone who owns a red convertible has gotten at least one speeding ticked. Therefore, some one in this class has gotten a speeding ticket. C(x): x is in the class; O(x): x owns a red convertible; S(x): x has gotten a speeding ticket. Step Reason 1. x( R( x) S( x)) Premise 2. R( Linda) S( Linda) Universal instantiation from (1) 3. R( Linda) Premise 4. S( Linda) Modus pones from (2) and (3) 5. C( Linda) Premise 6. C( Linda) S( Linda) Conjuction from (4) and (5) 7. x( C( x) S( x)) Existential generalization from (6)

Section 1.6 Question 16 Prove that if n is a perfect square, then n + 2 is not a perfect square. Solution: direct proof Assume n is a perfect square, prove that n+2 is not a perfect square Assume n is a perfect square, n = k 2 (k >= 0) The next largest perfect square after n should be (k+1) 2 = k 2 +2k+1 = n+1+2k When k = 0, n = 0, n+2 = 2 is not a perfect square When k >= 1, (k+1) 2 = n+1+2k >= n + 3 > n+2, n+ 2 is not a perfect square Therefore, n + 2 is not a perfect square.

Section 1.6 Question 16 Prove that if n is a perfect square, then n + 2 is not a perfect square. Solution: proof by contraposition Proof that when n+2 is a perfect square, n cannot be a perfect square. Assume n+2 is a perfect square, n+2 = k 2 (k >= 0), then n = k 2-2. When k = 0; n = -2, which is not a perfect square. Let s discuss situations when k >= 1: The perfect square right before (n+2) should be (k-1) 2 = k 2-2k+1 = n+1-2k. Because k >= 1, (k-1) 2 = n+1-2k <= n - 1 < n, n is not a perfect square Therefore, when n+2 is a perfect square, n cannot be a perfect square.

Section 1.6 Question 16 Prove that if n is a perfect square, then n + 2 is not a perfect square. Solution: proof by contradiction Proof that when n and n+2 are both perfect squares, there are some contradictions Assume n+2 is a perfect square, n + 2 = a 2 (a >= 0) Given the condition n is a perfect square, n = b 2 (b >= 0). (n + 2) n = a 2 - b 2 = (a b)(a + b) = 2 a and b are both integers larger all equal to zero. Therefore, (a - b) and (a + b) are all integers. Therefore, we have a b = 1 and a + b = 2. As a result, a = 1.5, b = 0.5. This leads to the contradiction a and b are all integers. Therefore, the assumption does not stand, n+2 is not a perfect square.

Section 1.6 Question 28 Prove that m 2 = n 2 if and only if m = n or m = -n. You need to prove: m 2 = n 2 m = n or m = -n and m = n or m = -n m 2 = n 2