CSCI 2110 Discrete Mathematics Tutorial 10 Chin 1.

Slides:



Advertisements
Similar presentations
Tutorial 2: First Order Logic and Methods of Proofs
Advertisements

Review for CS1050. Review Questions Without using truth tables, prove that  (p  q)   q is a tautology. Prove that the sum of an even integer and an.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Elementary Number Theory and Methods of Proof
RMIT University; Taylor's College This is a story about four people named Everybody, Somebody, Anybody and Nobody. There was an important job to be done.
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/01/11
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 12 Number theory Mathematical induction Proof by induction Examples.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
Copyright © Cengage Learning. All rights reserved.
Methods of Proof Lecture 4: Sep 16 (chapter 3 of the book)
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
Methods of Proof & Proof Strategies
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
Introduction to Proofs
CS 173, Lecture B September 1, 2015 Tandy Warnow.
MATH 224 – Discrete Mathematics
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
CSci 2011 Discrete Mathematics Lecture 6
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Predicates and Quantified Statements
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Week 3 - Monday.  What did we talk about last time?  Predicate logic  Multiple quantifiers  Negating multiple quantifiers  Arguments with quantified.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Introduction to Proofs
1 CMSC 250 Chapter 3, Number Theory. 2 CMSC 250 Introductory number theory l A good proof should have: –a statement of what is to be proven –"Proof:"
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Direct Proof and Counterexample I Lecture 11 Section 3.1 Fri, Jan 28, 2005.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
Introduction to Predicates and Quantified Statements I Lecture 9 Section 2.1 Wed, Jan 31, 2007.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Chapter 1 Logic and proofs
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
CS 2210:0001 Discrete Structures Logic and Proof
CSE 311 Foundations of Computing I
Argument An argument is a sequence of statements.
DISCRETE MATHEMATICS CHAPTER I.
Direct Proof by Contraposition Direct Proof by Contradiction
Predicate Calculus Validity
CSCI 3310 Mathematical Foundation of Computer Science
CS201: Data Structures and Discrete Mathematics I
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
CS 220: Discrete Structures and their Applications
First Order Logic Rosen Lecture 3: Sept 11, 12.
Discrete Mathematics Lecture 3: Predicate and Quantifier
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
CS201: Data Structures and Discrete Mathematics I
Foundations of Discrete Mathematics
Presentation transcript:

CSCI 2110 Discrete Mathematics Tutorial 10 Chin 1

About me Name: Chin Office: SHB Office Hour: Friday 10:00 – 12:00 – Outside office hour? me first 2

Proposition A statement that can be true or false, but not both Examples – I hate discrete maths – The quizzes are difficult – = 3 – All primes are odd – No one likes this tutorial 3

Predicate A function that maps elements from a domain to {true, false} A claim with variables Examples – ocamp(x) := x went to ocamp – attend(y) := y attends 2110 lecture – odd(a, b) := a is odd and b is odd – compare(x, y) := x < y – female(p) := p is female 4

Domain of a predicate A set that contains the values a variable can take attend(y) := y attends 2110 lecture Domain can be the set of 2110 students – then attend(Chin) is undefined (neither true, nor false) – because Chin is not in the domain Sometimes, we omit the domain when the context is clear 5

Quantifiers for ∀ ll, – for any, for every, for each, given any, … – P(x) := x goes to tutorial – ∀ x, P(x) there ∃ xists, – (for) some, at least one, (for) one, … – P(x) := x teaches tutorial – ∃ x, P(x) 6

Domain is important Let P be a predicate from the domain D – P(x) := x loves discrete maths Is it true that ∀ x ∈ D, P(x)? When D is the set of – 2110 tutors, yes – 2110 students, no 7

Negation De Morgan’s laws for first order logic: ¬( ∀ x, P(x)) is equivalent to ∃ x, ¬P(x) ¬( ∃ x, P(x)) is equivalent to ∀ x, ¬P(x) 8

De Morgan’s laws Let P(x) := x is female ∀ x, P(x) means everyone is female Which one is its negation, i.e. ¬( ∀ x, P(x)) ? – No one is female, i.e. ¬( ∃ x, P(x)) – Everyone is not female, i.e. ( ∀ x, ¬P(x)) – Someone is female, i.e. ∃ x, P(x) – Someone is not female, i.e. ∃ x, ¬P(x) 9

Express the following using predicates Every one goes to lectures Let attend(x) := x goes to lectures ∀ x, attend(x) What is its negation? 10

More quantifiers Every one goes to some lectures Let attend(x, y) := x attend lecture y ∀ x, ∃ y attend(x, y) What is its negation? 11

More quantifiers What is the negation of ∀ x, ∃ y attend(x, y)? ¬( ∀ x, ∃ y attend(x, y)) ∃ x, ¬( ∃ y attend(x, y)) ∃ x, ∀ y ¬attend(x, y) Some students don’t attend any lectures 12

Order of quantifiers are important Every one goes to some lectures Let attend(x, y) := x attend lecture y ∀ x, ∃ y attend(x, y) – Everyone goes to some lectures – Alice can go to first lecture, Bob can go to the second ∃ y, ∀ x attend(x, y) – There exist some lectures that everyone attends – Everyone goes to the same lectures 13

More quantifiers Every year, someone goes to every lecture attend(x, y, z) := x goes to lecture y in year z ∀ z, ∃ x, ∀ y attend(x, y, z) What is its negation? 14

More quantifiers What is the negation of ∀ z, ∃ x, ∀ y, attend(x, y, z)? ¬( ∀ z, ∃ x, ∀ y, attend(x, y, z)) ∃ z, ¬( ∃ x, ∀ y, attend(x, y, z)) ∃ z, ∀ x, ¬( ∀ y, attend(x, y, z)) ∃ z, ∀ x, ∃ y, ¬attend(x, y, z) In some years, every student does not go to some lectures. 15

More and more quantifiers For every d, there exists x and y, so that for every f, f(x) – f(y) < d Let P(f, x, y, d) := f(x) – f(y) < d ∀ d, ∃ x, ∃ y, ∀ f, P(f, x, y, d) What is its negation? 16

More and more quantifiers What is the negation of – ∀ d, ∃ x, ∃ y, ∀ f, P(f, x, y, d) ¬( ∀ d, ∃ x, ∃ y, ∀ f, P(f, x, y, d)) ∃ d, ¬( ∃ x, ∃ y, ∀ f, P(f, x, y, d)) ∃ d, ∀ x, ¬( ∃ y, ∀ f, P(f, x, y, d)) ∃ d, ∀ x, ∀ y, ¬( ∀ f, P(f, x, y, d)) ∃ d, ∀ x, ∀ y, ∃ f, ¬P(f, x, y, d) 17

Statements in First Order Logic Every odd prime can be written as a sum of the square of two integers What are the predicates? – Let P(p) := p is an odd prime and can be written as a sum of the square of two integers – ∀ p, P(p). Correct, but … In the quiz and exam, you have to break predicates down whenever it is possible 18

Mathematical Statements ∀ p, P(p) – P(p) := p is an odd prime and can be written as a sum of the square of two integers P(p) := oddprime(p) ∧ sumoftwo(p) Can we do more? 19

Mathematical Statements P(p) := oddprime(p) ∧ sumoftwo(p) oddprime(p) := odd(p) ∧ prime(p) – odd(p) := ∃ k ∈ ℤ, p = 2k + 1 – prime(p) := (p > 1) ∧ ( ∀ a ∈ ℤ, ∀ b ∈ ℤ, ((a > 1) ∧ (b > 1) → ab ≠ p)) 20

Mathematical Statements P(p) := oddprime(p) ∧ sumoftwo(p) – sumoftwo(p) := p = x 2 + y 2 for some integers x, y sumoftwo(p) := p = x 2 + y 2 for some integers x, y sumoftwo(p) := ∃ x ∈ ℤ, ∃ y ∈ ℤ, p = x 2 + y 2 21

Mathematical Statements P(p) := oddprime(p) ∧ sumoftwo(p) oddprime(p) := odd(p) ∧ prime(p) – odd(p) := ∃ k ∈ ℤ, p = 2k + 1 – prime(p) := (p > 1) ∧ ( ∀ a ∈ ℤ, ∀ b ∈ ℤ, ((a > 1) ∧ (b > 1) → ab ≠ p)) sumoftwo(p) := ∃ x ∈ ℤ, ∃ y ∈ ℤ, p = x 2 + y 2 ∀ p, P(p) 22

Method of proofs Direct proof Proof by contradiction Proof by cases 23

Direct Proof Let a be an even number and b be an odd. Show that ab is an even number Write a = 2s, and b = 2t + 1 for some integers s and t Then ab = 2s(2t + 1) = 4st + 2s = 2(2st + s) Therefore ab is an even number because 2st+s is an integer. 24 cannot use the same letter

Proof by contradiction Show that if 2x + 45 < 85, then x < 20 Suppose x ≥ 20 2x ≥ 40 2x + 40 ≥ 85 Contradiction! 25

Proof by contradiction Show that 3 is not rational. How to say 3 is a rational number? – 3 = p/q for some integers p and q 26 √ √ √

Proof by contradiction 3 = p/q for some integers p and q We choose p and q so that have no common factors that are greater than 1. – 12/64 → 3/16 – You can always reduce a fraction If we can show p and q have 3 as their common factor, done. But how? 27 √

Proof by contradiction 3 = p/q for some integers p and q – Where p and q have no common factors that are > 1 3q 2 = p 2 If p 2 = 3s, p = 3t for some integer t – Prove by contradiction 28 √

Proof by contradiction If p 2 = 3s for some integer s, p = 3t for some integer t – Prove by contradiction Suppose p ≠ 3t for any t – Case 1: p = 3t + 1 for some t – Case 2: p = 3t + 2 for some t 29

Proof by contradiction If p 2 = 3s for some integer s, p = 3t for some integer t Suppose p 2 = 3s for some integer s but p ≠ 3t for any t – Case 1: p = 3t + 1, p 2 = 9t 2 + 6t + 1 = 3(3t 2 + 2t) + 1 p 2 ≠ 3s for any s – Case 2: p = 3t + 2, p 2 = 9t t + 4 = 3(3t 2 + 4t + 1) + 1 p 2 ≠ 3s for any s Contradiction. 30

Proof by contradiction 3q 2 = p 2 – If p 2 = 3s for some integer s, p = 3t for some integer t p = 3t for some integer t 3q 2 = p 2 = 9t – q 2 = 3t – If p 2 = 3t for some integer t, p = 3u for some integer u q = 3u for some integer u 31

Proof by contradiction p = 3t for some integer t q = 3u for some integer u So p and q have 3 as their common factor. Contradiction because we begin with the fact that p and q do not have common factor > 1. 32

Proof by contradiction Suppose 100 students took a quiz and the mean is 80 (out of 100). Show that at least 50 students score greater than 60. What is the negation of at least 50 students score > 60? – At most 49 students score > 60 – (or at least 51 score ≤ 60) 33

Proof by contradiction What is the highest mean we can get? The 49 students who score > 60 get 100 The rest of the 51 students who score ≤ 60 get 60 Then the mean is (# people who score 100) × (# people who score 60) × 60 = (49 × × 60) / 100 = ( ) / 100 = 79.6 < 80 Contradiction! 34 (total number of students)

Proof by cases Prove that max(x, y) + min(x, y) = x + y. If y > x – max(x, y) = y and min(x, y) = x – max(x, y) + min(x, y) = y + x = x + y If y ≤ x – max(x, y) = x and min(x, y) = y – max(x, y) + min(x, y) = x + y done, since either x < y or y <= x must be true. 35

Proof by cases Suppose x > 0 and y > 0. Prove that (|x + y| - |x – y|)/2 = min(x, y) If x > y – min(x, y) = y – |x + y| = x + y, |x – y| = x – y – |x + y| - |x – y| = (x + y) – (x – y) = 2y – (|x + y| - |x – y|)/2 = y = min(x, y) 36

Proof by cases Suppose x > 0 and y > 0. Prove that (|x + y| - |x – y|)/2 = min(x, y) If x ≤ y – min(x, y) = x – |x + y| = x + y, |x – y| = y – x – (because |a| = -a if a ≤ 0, and (x – y) ≤ 0) – |x + y| - |x – y| = (x + y) – (y – x) = 2x – (|x + y| - |x – y|)/2 = x = min(x, y) 37

End Questions? 38