week 4 - monday. what did we talk about last time? divisibility quotient-remainder theorem proof...

26
CS322 Week 4 - Monday

Upload: howard-maximilian-mason

Post on 17-Jan-2016

236 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

CS322Week 4 - Monday

Page 2: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Last time

What did we talk about last time? Divisibility Quotient-remainder theorem Proof by cases

Page 3: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Questions?

Page 4: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Logical warmup

An epidemic has struck the Island of Knights and Knaves Sick Knights always lie Sick Knaves always tell the truth Healthy Knights and Knaves are unchanged

During the epidemic, a Nintendo Wii was stolen There are only three possible suspects: Jacob, Karl, and Louie They are good friends and know which one actually stole the Wii Here is part of the trial's transcript:

Judge (to Jacob): What do you know about the theft? Jacob: The thief is a Knave Judge: Is he healthy or sick? Jacob: He is healthy Judge( to Karl): What do you know about Jacob? Karl: Jacob is a Knave. Judge: Healthy or sick? Karl: Jacob is sick.

The judge thought a while and then asked Louie if he was the thief. Based on his yes or no answer, the judge decided who stole the Wii.

Who was the thief?

Page 5: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Proof by Cases Review

Page 6: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Proof by cases formatting For a direct proof using cases, follow the

same format that you normally would When you reach your cases, number

them clearly Show that you have proved the

conclusion for each case Finally, after your cases, state that,

since you have shown the conclusion is true for all possible cases, the conclusion must be true in general

Page 7: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Consecutive integers have opposite parity

Prove that, given any two consecutive integers, one is even and the other is odd

Hint Divide into two cases: The smaller of the two integers is even The smaller of the two integers is odd

Page 8: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Another proof by cases

Theorem: for all integers n, 3n2 + n + 14 is even

How could we prove this using cases?

Be careful with formatting

Page 9: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Floor and Ceiling

Page 10: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

More definitions

For any real number x, the floor of x, written x, is defined as follows: x = the unique integer n such that n ≤

x < n + 1

For any real number x, the ceiling of x, written x, is defined as follows: x = the unique integer n such that n –

1 < x ≤ n

Page 11: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Examples

Give the floor for each of the following values 25/4 0.999 -2.01

Now, give the ceiling for each of the same values

If there are 4 quarts in a gallon, how many gallon jugs do you need to transport 17 quarts of werewolf blood?

Does this example use floor or ceiling?

Page 12: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Proofs with floor and ceiling

Prove or disprove: x, y R, x + y = x + y

Prove or disprove: x R, m Z x + m = x + m

Page 13: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Indirect Proof

Page 14: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Proof by contradiction

The most common form of indirect proof is a proof by contradiction

In such a proof, you begin by assuming the negation of the conclusion

Then, you show that doing so leads to a logical impossibility

Thus, the assumption must be false and the conclusion true

Page 15: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Contradiction formatting

A proof by contradiction is different from a direct proof because you are trying to get to a point where things don't make sense

You should always mark such proofs clearly Start your proof with the words Proof by

contradiction Write Negation of conclusion as the

justification for the negated conclusion Clearly mark the line when you have both p and

~p as a contradiction Finally, state the conclusion with its justification

as the contradiction found before

Page 16: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Example

Theorem: There is no largest integer.

Proof by contradiction: Assume that there is a largest integer.

Page 17: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Another example

Theorem: There is no integer that is both even and odd.

Proof by contradiction: Assume that there is an integer that is both even and odd

Page 18: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Another example

Theorem: x, y Z+, x2 – y2 1Proof by contradiction: Assume

there is such a pair of integers

Page 19: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Two Classic Results

Page 20: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Square root of 2 is irrational

1. Suppose is rational2. = m/n, where m,n Z, n 0 and

m and n have no common factors3. 2 = m2/n2

4. 2n2 = m2

5. 2k = m2, k Z6. m = 2a, a Z

7. 2n2 = (2a)2 = 4a2

8. n2 = 2a2

9. n = 2b, b Z10. 2|m and 2|n

11. is irrational

QED

1. Negation of conclusion2. Definition of rational

3. Squaring both sides4. Transitivity5. Square of integer is

integer6. Even x2 implies even x

(Proof on p. 202)7. Substitution8. Transitivity9. Even x2 implies even x10. Conjunction of 6 and 9,

contradiction11. By contradiction in 10,

supposition is false

Theorem: is irrationalProof by contradiction:

2

22

2

Page 21: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Proposition 4.7.3

Claim: Proof by contradiction:1. Suppose such that

2. 3. 4. 15. 1

6. 7. Contradiction

8. Negation of conclusion

9. Definition of divides10.Definition of divides11.Subtraction12.Substitution13.Distributive law14.Definition of divides15.Since 1 and -1 are the only

integers that divide 116.Definition of prime17.Statement 8 and statement 9

are negations of each other18.By contradiction at statement

10QED

Page 22: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Infinitude of primes

1. Suppose there is a finite list of all primes: p1, p2, p3, …, pn

2. Let N = p1p2p3…pn + 1, N Z

3. pk | N where pk is a prime4. pk | p1p2p3…pn + 15. p1p2p3…pn = pk(p1p2p3…pk-1pk+1…pn)6. p1p2p3…pn = pkP, P Z7. pk | p1p2p3…pn

8. pk does not divide p1p2p3…pn + 19. pk does and does not divide p1p2p3…

pn + 110. There are an infinite number of primes

QED

1. Negation of conclusion

2. Product and sum of integers is an integer

3. Theorem 4.3.4, p. 1744. Substitution5. Commutativity6. Product of integers is

integer7. Definition of divides8. Proposition from last slide9. Conjunction of 4 and 8,

contradiction10. By contradiction in 9,

supposition is false

Theorem: There are an infinite number of primesProof by contradiction:

Page 23: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

A few notes about indirect proof

Don't combine direct proofs and indirect proofs

You're either looking for a contradiction or not

Proving the contrapositive directly is equivalent to a proof by contradiction

Page 24: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Upcoming

Page 25: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Next time…

Review for Exam 1

Page 26: Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases

Reminders

Exam 1 is next Monday Review is Friday

Start reading Chapter 5