Upload
howard-maximilian-mason
View
236
Download
0
Tags:
Embed Size (px)
Citation preview
CS322Week 4 - Monday
Last time
What did we talk about last time? Divisibility Quotient-remainder theorem Proof by cases
Questions?
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?
Proof by Cases Review
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
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
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
Floor and Ceiling
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
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?
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
Indirect Proof
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
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
Example
Theorem: There is no largest integer.
Proof by contradiction: Assume that there is a largest integer.
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
Another example
Theorem: x, y Z+, x2 – y2 1Proof by contradiction: Assume
there is such a pair of integers
Two Classic Results
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
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
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:
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
Upcoming
Next time…
Review for Exam 1
Reminders
Exam 1 is next Monday Review is Friday
Start reading Chapter 5