Title: University of Florida Dept' of Computer
1University of FloridaDept. of Computer
Information Science EngineeringCOT
3100Applications of Discrete StructuresDr.
Michael P. Frank
- Slides for a Course Based on the TextDiscrete
Mathematics Its Applications (5th Edition)by
Kenneth H. Rosen
2Module 11Proof Strategies
- Rosen 5th ed., 3.1
- 21 slides
3Module 11 Overview
- In module 2, we already saw
- Several types of proofs of implications p?q
- Vacuous, Trivial, Direct, Indirect
- Types of existence proofs
- Constructive vs. Nonconstructive.
- Some methods of proving general statements p
- Proof by cases, proof by contradiction.
- In this module, we will see examples of
- Forward vs. backward reasoning.
- Proof by cases.
- Adapting existing proofs.
- Turning conjectures into proofs.
4Forward Reasoning
- Have premises p, and want to prove q.
- Find a s1 such that p?s1
- Then, modus ponens gives you s1.
- Then, find an s2 ? (such that) s1?s2.
- Then, modus ponens gives you s2.
- And hope to eventually get to an sn ? sn?q.
- The problem with this method is
- It can be tough to see the path looking from p.
5Backward Reasoning
- It can often be easier to see the very same path
if you just start looking from the conclusion q
instead - That is, first find an s-1 such that s-1?q.
- Then, find an s-2 ? s-2?s-1, and so on
- Working back to an s-n ? p?s-n.
- Note we still are using modus ponens to propagate
truth forwards down the chain from p to s-n to
to s1 to q! - We are finding the chain backwards, but applying
it forwards. - This is not quite the same thing as an indirect
proof - In that, we would use modus tollens and q to
prove s-1, etc. - However, it it similar.
6Backward Reasoning Example
Example 1
- Theorem ?agt0,bgt0,a?b (ab)/2 gt (ab)1/2.
- Proof
- Notice it is not obvious how to go from the
premises agt0, bgt0, a?b directly forward to the
conclusion (ab)/2 gt (ab)1/2. - So, lets work backwards from the conclusion,
(ab)/2 gt (ab)1/2 !
7Steps of Example
- (ab)/2 gt (ab)1/2 ? (squaring both sides)
- This preserves the gt since both sides are
positive. - (ab)2/4 gt ab ? (multiplying through by 4)
- (ab)2 gt 4ab ? (squaring ab)
- a22abb2 gt 4ab ? (subtracting out 4ab)
- a2-2abb2 gt 0 ? (factoring left side)
- (a-b)2 gt 0
- Now, since a?b, (a-b)?0, thus (a-b)2gt0, and we
can work our way back along the chain of steps
8Forwardized version of Example
- Theorem ?agt0,bgt0,a?b (ab)/2 gt (ab)1/2.
- Proof. Since a?b, (a-b)?0. Thus, (a-b)2gt0,
i.e., a2-2abb2 gt 0. Adding 4ab to both sides,
a22abb2 gt 4ab. Factoring the left side, we
have (ab)2 gt 4ab, so (ab)2/4 gt ab. Since ab is
positive, we can take the square root of both
sides and get (ab)/2 gt (ab)1/2. - This is just a simple proof proceeding directly
from premises to conclusion, but if you dont
realize how it was obtained, it looks magical. - A common student reaction But how did you know
to pick 4ab out of thin air, to add to both
sides? - Answer By working backwards from the conclusion!
9Stone Game Example
Example 2
- Game rules
- There are 15 stones in a pile. Two players take
turns removing either 1, 2, or 3 stones. Whoever
takes the last stone wins. - Theorem There is a strategy for the first player
that guarantees him a win. - How do we prove this? Constructive proof
- Looks complicated How do we pick out the winning
strategy from among all possible strategies? - Work backwards from the endgame!
10Working Backwards in the Game
- Player 1 wins if it is player 2s turn and there
are no stones - P1 can arrange this ifit is his turn, and
thereare 1, 2, or 3 stones - This will be true aslong as player 2 had4
stones on his turn - And so on
11Forwardized version
- Theorem. Whoever moves first can always force a
win. - Proof. Player 1 can remove 3 stones, leaving 12.
After player 2 moves, there will then be either
11, 10, or 9 stones left. In any of these cases,
player 1 can then reduce the number of stones to
8. Then, player 2 will reduce the number to 7,
6, or 5. Then, player 1 can reduce the number to
4. Then, player 2 must reduce them to 3, 2, or
1. Player 1 then removes the remaining stones
and wins.
12Proof by Cases Example
Example 3
- Theorem ?n?Z (2n ? 3n) ? 24(n2-1)
- Proof Since 236, the value of n mod 6 is
sufficient to tell us whether 2n or 3n. If (n
mod 6)?0,3 then 3n if it is in 0,2,4 then
2n. Thus (n mod 6)?1,5. - Case 1 If n mod 6 1, then (?k) n6k1.
n236k212k1, so n2-136k212k 12(3k1)k.
Note 2(3k1)k since either k or 3k1 is even.
Thus 24(n2-1). - Case 2 If n mod 6 5, then n6k5. n2-1
(n-1)(n1) (6k4)(6k6) 12(3k2)(k1).
Either k1 or 3k2 is even. Thus, 24(n2-1).
13Proof by Examples?
- A universal statement can never be proven by
using examples, unless the universe can be
validly reduced to only finitely many examples,
and your proof covers all of them! - Theorem ?x,y?Z x23y2 8.
- Proof If x3 or y2 then x23y2 gt8. This
leaves x2?0,1,4 and 3y2?0,3. The largest
pair sum to 43 7 lt 8.
Example 4
14A Constructive Existence Proof
Example 7
- Theorem For any integer ngt0, there exists a
sequence of n consecutive composite integers. - Same statement in predicate logic?ngt0 ?x ?i
(1?i?n)?(xi is composite) - Proof follows on next slide
15The proof...
- Given ngt0, let x (n 1)! 1.
- Let i ? 1 and i ? n, and consider xi.
- Note xi (n 1)! (i 1).
- Note (i1)(n1)!, since 2 ? i1 ? n1.
- Also (i1)(i1). So, (i1)(xi).
- ? xi is composite.
- ? ?n ?x ?1?i?n xi is composite. Q.E.D.
16Nonconstructive Existence Proof
- Theorem There are infinitely many prime numbers.
- Any finite set of numbers must contain a maximal
element, so we can prove the theorem if we can
just show that there is no largest prime number. - I.e., show that for any prime number, there is a
larger number that is also prime. - More generally For any number, ? a larger prime.
- Formally Show ?n ?pgtn p is prime.
17The proof, using proof by cases...
- Given ngt0, prove there is a prime pgtn.
- Consider x n!1. Since xgt1, we know that (x
is prime)?(x is composite). - Case 1 Suppose x is prime. Obviously xgtn, so
let px and were done. - Case 2 x has a prime factor p. But for q?n, q
mod x 1. So pgtn, and were done.
18Adapting Existing Proofs
Example 5
- Theorem There are infinitely many primes of the
form 4k3, where k?N. (Franks wrong proof) - Recall we proved there are infinitely many primes
because if p1,,pn were all the primes, then
(?pi)1 must be prime or have a prime factor
greater than pn, ? contradiction! - Proof Similarly, suppose q1,,qn lists all
primes of the form 4k3, - and analogously consider Q 4(?qi)3.
- Unfortunately, since q1 3 is possible, 3Q and
so Q does have a prime factor among the qi, so
this doesnt work! - So instead, consider Q 4(?qi)-1 4(?qi-1)3.
This has the right form, and has no qi as a
factor since ?i Q -1 (mod qi).
19and getting them right
Example 5
- Theorem There are infinitely many primes of the
form 4k3, where k?N. - The previous proof has a huge hole
- Just because no qi is a factor, doesnt mean
there isnt a prime factor, or that it has the
right form. - In fact, we have to observe that all odd numbers
(hence all primes except 2) have the form 4n1 or
4n3 - But the product of numbers of the form 4n1
itself has the form 4n1 - That is, (4k1)(4l1) 4(4kllk) 1
- And a product including 2 is of form 4n or 4n2
- So if Q is composite, it must have a prime factor
of form 4k3 - And it cant be any of the qi
- C!
- (this means This is a contradiction)
20Conjecture and Proof
Example 6
- We know that some numbers of the form 2p-1 are
prime when p is prime. - These are called the Mersenne primes.
- Can we prove the inverse, that an-1 is composite
whenever either agt2, or (a2 but n is composite)? - All we need is to find a factor greater than 1.
- Note an-1 factors into (a-1)(an-1a1).
- When agt2, (a-1)gt1, and so we have a factor.
- When n is composite, ?r,sgt1 nrs. Thus, given
a2, an 2n 2rs (2r)s, and since rgt1, 2r gt 2
so 2n - 1 bs-1 with b 2r gt 2, which now fits
the first case.
21Conjecture Counterexamples
Example 8
- Conjecture ? integers ngt0, n2-n41 is prime.
- Hm, lets see if we can find any
counter-examples - 12-141 41 (prime)
- 22-241 4-241 43 (prime)
- 32-341 9-341 47 (prime) Looking good so
far!! - Can we conclude after showing that it checks out
in, say, 20 or 30 cases, that the conjecture must
be true? - NEVER NEVER NEVER NEVER NEVER!
- Of course, 412-4141 is divisible by 41!!
22Even Great Mathematicians Can Propose False
Conjectures!
Example 9
- Euler conjectured that for ngt2, the sum of n-1
nth powers of positive integers is not an nth
power. - Remained true for all cases checked for 200
years, but no proof was found. - Finally, in 1966, someone noticed that 275 845
1105 1335 1445. - Larger counter-examples have also been found for
n4, but none for ngt5 yet.
23Fermats Last Theorem
- Theorem xnynzn has no solutions in integers
xyz ? 0 with integer ngt2. - In the 1600s, Fermat famously claimed in a
marginal note that he had a wondrous proof of
the theorem. - But unfortunately, if he had one, he never
published it! - The theorem remained a publicly unproven
conjecture for the next 400 years! - Finally, a proof that requires hundreds of pages
of advanced mathematics was found by Wiles at
Princeton in 1990. - It took him 10 years of work to find it!
- Challenge Find a short, simple proof of Fermats
last theorem, and you will become instantly
famous!
Theorem 2
24Some Open Conjectures
- Conjecture There are infinitely many primes of
the form n21, where n?Z. - Conjecture (Twin Prime Conjecture) There are
infinite pairs of primes of the form (p, p2). - Conjecture (The Hailstone Problem) If h(x)
x/2 when x is even, and 3x1 when x is odd, then
?x?N ?n?N hn(x) 1 (where the superscript
denotes composition of h with itself n times).
Example 11
Example 12
Example 13
Prove any of these, and you can probably have a
lifetimecareer sitting around doing pure
mathematics