Download presentation
Presentation is loading. Please wait.
1
Strong Induction, WOP and Invariant Method Leo Cheung
2
Project Register your group at http://spreadsheets.google.com/viewform? hl=en&formkey=dEE5R181ZkJNMXVDNT V2eUNSaGxjR1E6MA
3
A Quick Review Strong induction Well ordering principle Invariant method
4
Prove P(0). Then prove P(n+1) assuming all of P(0), P(1), …, P(n) (instead of just P(n)). Conclude n.P(n) Recall Strong Induction (Lecture 5, Slide 35) 0 1, 1 2, 2 3, …, n-1 n. So by the time we got to n+1, already know all of P(0), P(1), …, P(n) Strong induction Ordinary induction equivalent
5
Strong Induction Given »f 1 = 1 »f k = 2 f floor(k/2) Prove f n <= n
6
Strong Induction - Answer Base case »f 1 = 1 <= 1 Assume f j ≤ j, 1 ≤ j ≤ k f k+1 = 2 f floor((k+1)/2) ≤ 2 floor((k+1)/2) ≤ k+1 Done.
7
Strong Induction Given »g 0 = 12 »g 1 = 29 »g k = 5g k-1 – 6g k-2 for all integers k >=2 Prove g n = 5x3 n + 7x2 n for all integers n>=0
8
Strong Induction - Answer Base Case »n = 0, 1 : Trivial Assume the hypothesis is true for 0,1,2,….k-1,k By induction, the proof is done.
9
Well Ordering Principle Every non-empty set of positive integers contains a smallest element.
10
Well Ordering Principle To prove P is true »Assume P is false »Then there are set of counter examples C = { c | P(c) is false} »By WOP, choose the smallest element x in C »From x, we get y < x s.t. P(y) is also false »Contradiction!
11
Well Ordering Principle The equation has no non-zero positive integer solution
12
Well Ordering Principle - Ans Assume the is solution for the equation By WOP, we pick the solution (u,v,w,x) = (a,b,c,d) such that (a,b,c,d) has the smallest value of u among all the solutions to the equation. »We get Since all the term of left hand side is even, d must be even, so where
13
Well Ordering Principle - Ans Divide both sides by 2 we get Here c must be even, again we can rewrite the equation as where Divide both sides by 2 and we get
14
Well Ordering Principle - Ans Apply the same technique to b and a, we will get where Observe that (a’,b’,c’,d’) is now another set of solution to the equation and a’ < a This contradicts the claim that (a,b,c,d) is the solution set with the smallest value of u The assumption is false, hence the equation has no nonzero positive integer solution.
15
Invariant Method 1.Find properties (the invariants) that are satisfied throughout the whole process. 2.Show that the target do not satisfy the properties. 3.Conclude that the target is not achievable.
16
Invariant Method Integers 1, 2, 3, 4 and 5 are written on a board. Tom picks any two of the numbers, deletes them, and writes on the board the absolute value of their difference. He repeats this procedure with the resulting 4 numbers, and so on. After he does it 4 times, only one number remains on the board. Can this number be 2?
17
Invariant Method - Answer Observe that whatever move you made, you can only get an odd number in the final answer. Observe that the total sum of the numbers on the board remains odd. Consider a move, you pick m and n on the board, and write back m-n. »Change in total sum = m+n-(m-n) = 2n »Which means whatever move you make, the change in total sum must be even »The parity of total sum is the invariant Since we start with an odd total sum 15, it is not possible have 2 as the final number because it is even.
18
Exercises Following exercises can be found in textbook 4.4 : 4, 15, 18, 22
19
END
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.