Proof%20Strategies - PowerPoint PPT Presentation

About This Presentation
Title:

Proof%20Strategies

Description:

Show that conclusion q is true. Often hard to see where the proof should lead ... In other words, given conclusion q and implication pq, find an antecedent p that ... – PowerPoint PPT presentation

Number of Views:149
Avg rating:3.0/5.0
Slides: 30
Provided by: csVir
Category:

less

Transcript and Presenter's Notes

Title: Proof%20Strategies


1
Proof Strategies
  • CS/APMA 202
  • Rosen section 3.1
  • Aaron Bloomfield

2
Proof Strategies Whats Important
  • Forward and backward reasoning
  • Leveraging proof by cases
  • Adapting existing proofs
  • Conjecture and proof
  • Conjecture and counterexamples
  • Open problems 3x 1
  • The halting problem

3
Forward reasoning
  • One example modus ponens / direct proof
  • Given an antecedent p and a implication p?q
  • Show that conclusion q is true
  • Often hard to see where the proof should lead
  • In that case, do a backward reasoning to
    determine the forward reasoning

4
Backward reasoning
  • Start with the conclusion of the theorem
  • Find an antecedent that yields the given
    conclusion
  • In other words, given conclusion q and
    implication p?q, find an antecedent p that allows
    the conditional to be true
  • Will often only be one such antecedent

5
Backward reasoning
  • Is not the same as modus badus!
  • Modus badus
  • Given p?q and q, show p via the converse q?p
  • Backward reasoning
  • Given p?q and q, find a p that p?q is true
  • Or show that no such p can exist
  • It can be any p!

6
Backward reasoning
  • Is not the same as modus tonens!
  • Modus tonens
  • Given p?q and q, show p via the contrapositive
    q?p
  • Backward reasoning
  • Given p?q and q, find a p that p?q is true
  • Or show that no such p can exist
  • It can be any p!

7
Backward reasoning
14. Suppose five ones and four zeros are
arranged around a circle. Between any two equal
bits you insert a 0 and between any two unequal
bits you insert a 1 to produce nine new bits.
Then you erase the nine original bits. Show that
when you iterate this procedure you can never get
nine zeros. (Hint work backwards.)
0 0
0
? 0
0
? 0
0 0 0
1 0 1
0 0 1 1
0 0
1 0 1
1 1 1
0 0 0
What to prove?
8
Backward reasoning
  • In order to create 9 0s, the previous step had
    to have all 0s or all 1s
  • Consider two cases for the second-to-last step
  • There were 9 0s
  • The only previous step for this case is 9 0s
    (this case) or 9 1s (other case)
  • There cant be any other ways to get 9 0s
  • There were 9 1s
  • Then every bit needed to be different than the
    bit next to it
  • Not possible with an odd number of bits!

9
Forwards vs. Backwards reasoning
  • Example 1 (Rosen, p. 215) Prove thatwhen a?b,
    agt0, and bgt0

10
Forwards vs. Backwards reasoning
  • Backwards reasoning
  • Because (a-b)2gt0 when a?b, it follows that the
    inequality is true
  • Forwards reasoning
  • Given ,we can show that is
    equivalent to (a-b)2gt0
  • (a-b)2gt0 is always true when a?b

11
Leveraging proof by cases
  • When there is no obvious way to begin a proof,
    but when extra information in each case helps
    move the proof forward
  • Try to reduce the number of cases
  • What to avoid
  • Make sure you get ALL the cases

12
Cases
32. Prove that ën/2û én/2ù ën2/4û for
all integer n.
Consider two cases Even(n) easy
Odd(n) trickier
Let n 2k1 ?(2k1)/2? ?(2k1)/2?
?(2k1)2/4? ?k½? ?k½? ?(4k24k1)/4? (k)(k
1) ?k2k¼? k2k ?k2k¼? k2k k2k
13
Quick survey
  • How are we doing so far?
  • Very well
  • With some review, Ill be good
  • Not really
  • Not at all

14
An optical illusion
15
Another optical illusion
16
Definitions
  • Theorem a statement that can be shown to be true
  • Or something that is widely believed to be true
  • Conjecture a statement whose truth value is
    unknown

17
Conjecture and counterexamples
  • You can prove an existential quantifier by an
    example
  • You can disprove an universal quantifier by
    example
  • You cannot prove an universal quantifier by
    example
  • You cannot disprove an existential quantifier by
    example

18
Proof by counterexample
  • 15. Prove or disprove that n2-79n1601 is a
    prime whenever n is a positive integer
  • How to disprove?
  • Find a single example that shows this to be false
  • Let n 1601
  • Then n2 (1601)2-79(1601)1601 15231601

19
End of lecture on 15 March 2005
20
Proof by example
25. Prove or disprove that there are three
consecutive odd positive integers that are
primes, that is, odd primes of the form p, p2,
p4.
What to prove?
pÎZ (p gt 0 Ù prime(p) Ù prime(p2) Ù
prime(p4) ) Or pÎZ (prime(p) Ù
prime(p2) Ù prime(p4) )
Constructive existence proof 3, 5, 7
21
Proof by example
  • Prove that if you have an eight gallon jug of
    water and two empty jugs with capacities of five
    gallons and three gallons, then you can measure
    four gallons by successively pouring some of or
    all of the water in a jug into another jug.
  • Show that there exists a sequence of steps that
    yields 4 gallons in one of the jugs

22
Open problems
  • Fermats last theorem
  • xnynzn has no solutions in integers when xyz?0
    and ngt2
  • Finally proven!
  • Goldbachs Conjecture
  • Every integer n (for ngt2) is the sum of 2 primes
  • Shown for all n up to 41014
  • Thought to be true
  • Twin prime conjecture
  • There are an infinitely many number of primes
    that differ by 2
  • Biggest twin prime 318,032,3612107,0011
  • That number has 32,220 digits!
  • Thought to be true

23
Open problems
  • 3x1 conjecture
  • Let f(x) return x/2 if x is even, and 3x1 if x
    is odd
  • Shown for all numbersup to 5.61013

24
The Halting problem
  • Is it possible to write a function that will tell
    if any program will halt with any given input?
  • Consider H(P,I)
  • Returns halts or loops forever
  • Note that P and I are both bit strings
  • Now consider function K
  • function K (s)
  • if H (s, s) loops forever then halt
  • else loop forever
  • We then call K(K)

25
The Halting problem
  • Function K
  • function K (s)
  • if H (s, s) loops forever then halt
  • else loop forever
  • We call K(K)
  • Note that this calls H(K,K), which in turn calls
    K(K)
  • If H(K,K) returns halt, then K loops forever
  • But H(K,K) stated that K halts!
  • If H(K,K) returns loops forever, then K halts
  • But H(K,K) stated that K loops forever!
  • Both cases reached contradictions

26
Adapting existing proofs
  • Look at existing proofs
  • To use as a template for your proofs
  • To build upon for your proofs

27
Reuse
  • 49. Show that the problem of determining whether
    a program with a given input ever prints the
    digit 1 is unsolvable.
  • Leverage off the halting problem, which is known
    to be unsolvable (undecidable).
  • Assume the print 1 statement occurs just before
    a halt statement.
  • Since we cant know if program execution will
    ever reach the halt statement, we cant know if
    it will reach the print 1 statement.

28
Quick survey
  • I felt I understood the material in this slide
    set
  • Very well
  • With some review, Ill be good
  • Not really
  • Not at all

29
Quick survey
  • The pace of the lecture for this slide set was
  • Fast
  • About right
  • A little slow
  • Too slow

30
Quick survey
  • How interesting was the material in this slide
    set? Be honest!
  • Wow! That was SOOOOOO cool!
  • Somewhat interesting
  • Rather borting
  • Zzzzzzzzzzz
Write a Comment
User Comments (0)
About PowerShow.com