Lee CSCE 314 TAMU 1 CSCE 314 Programming Languages Haskell 101 Dr. Hyunyoung Lee.
TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE...
Transcript of TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE...
![Page 1: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/1.jpg)
CSCE 222 Discrete Structures for Computing
Proof by InductionDr. Hyunyoung Lee
Based on slides by Andreas Klappenecker
�1
![Page 2: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/2.jpg)
Motivation
Induction is an axiom which allows us to prove that certain properties are true for all positive integers (or for all nonnegative integers, or all integers >= some fixed number)
�2
![Page 3: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/3.jpg)
Induction Principle
Let A(n) be an assertion concerning the integer n.If we want to show that A(n) holds for all positive integer n, we can proceed as follows: Induction basis: Show that the assertion A(1) holds. Induction step: For all positive integers n, show that A(n) implies A(n+1).
�3
![Page 4: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/4.jpg)
Standard Example:Sum of the First n Positive Integers (1/2)
�4
For all n � 1, we havePn
k=1 k = n(n+ 1)/2
We prove this by induction.Let A(n) be the claimed equality.
Basis Step: We need to show that A(1) holds.For n = 1, we have
P1k=1 k = 1 = 1(1 + 1)/2.
![Page 5: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/5.jpg)
Sum of the First n Positive Integers (2/2)
�5
Induction Step: We need to show that 8n � 1 : [A(n) ! A(n+ 1)].As induction hypothesis, suppose that A(n) holds. Then,
n+1X
k=1
k =nX
k=1
k + (n+ 1) by definition ofX
=n(n+ 1)
2+
2(n+ 1)
2by induction hypothesis
=(n+ 1)(n+ 2)
2by factoring out (n+ 1)
Therefore, the claim follows by induction on n.<latexit sha1_base64="iZORPDk58DGQu2erR2UXQDM6JbQ=">AAAD0HicbVNLb9NAEHYSHsU82sKRy4iGqqVVFOcCqhTUigsckAr0JWVDtF6P7VXWu2Z3TRsZC3Hl53HjD/A7WDtR1bQd2db425lvZr/ZDXPBje33/7banTt3791feeA/fPT4yera+tMTowrN8JgpofRZSA0KLvHYcivwLNdIs1DgaTh9V6+ffkdtuJJHdpbjOKOJ5DFn1Dpost76R6TiMkJp/Q8yKlgNwxeL+R6cIkjECKwCk6pzsCm10CWx0lQIkCRBCPZgdLAlt4nmSWqp1i7M/e8E2+NujxD/wAC/ZE1nubIpGm52wRR5rgwuOGuKLqRKRKYHRynKXZ+EmHBZUsET+aryiSmySTkdBtXX0tFXU9gcQkkaAUqNUQVLEdW02mnaAPKtoBEQixe2DGcQYcwlb9pRMcyzXJ+bw2WuWFNWyoahKgdVtTNHBpfIEu/VVFfjth27hLrKnKZhcZ/BTSqXHlNmleYyAVVY12IT7ROU0aUaTiKNbg646wREYILyDGIlhDo3yx24pyu7PX+yttHv9RuDm06wcDa8hR1O1v6QSLEicwfD0RszCvq5HZdUW84EuoEUBnPKpjTBkXMlzdCMy0aICl46JHINafdKCw16NaOkmTGzLHSRGbWpub5Wg7etjQobvxmXXOaFRcnmheJC1Ee0Pt0QcY3MCjdnTpl2c2bAUuo0t+4O1CIE17d80zkZ9IJ+L/g02Nh/u5BjxXvuvfC2vMB77e17771D79hj7Y9t0/7RrjqfOxedn51f89B2a5HzzFuyzu//cEg3Wg==</latexit><latexit sha1_base64="iZORPDk58DGQu2erR2UXQDM6JbQ=">AAAD0HicbVNLb9NAEHYSHsU82sKRy4iGqqVVFOcCqhTUigsckAr0JWVDtF6P7VXWu2Z3TRsZC3Hl53HjD/A7WDtR1bQd2db425lvZr/ZDXPBje33/7banTt3791feeA/fPT4yera+tMTowrN8JgpofRZSA0KLvHYcivwLNdIs1DgaTh9V6+ffkdtuJJHdpbjOKOJ5DFn1Dpost76R6TiMkJp/Q8yKlgNwxeL+R6cIkjECKwCk6pzsCm10CWx0lQIkCRBCPZgdLAlt4nmSWqp1i7M/e8E2+NujxD/wAC/ZE1nubIpGm52wRR5rgwuOGuKLqRKRKYHRynKXZ+EmHBZUsET+aryiSmySTkdBtXX0tFXU9gcQkkaAUqNUQVLEdW02mnaAPKtoBEQixe2DGcQYcwlb9pRMcyzXJ+bw2WuWFNWyoahKgdVtTNHBpfIEu/VVFfjth27hLrKnKZhcZ/BTSqXHlNmleYyAVVY12IT7ROU0aUaTiKNbg646wREYILyDGIlhDo3yx24pyu7PX+yttHv9RuDm06wcDa8hR1O1v6QSLEicwfD0RszCvq5HZdUW84EuoEUBnPKpjTBkXMlzdCMy0aICl46JHINafdKCw16NaOkmTGzLHSRGbWpub5Wg7etjQobvxmXXOaFRcnmheJC1Ee0Pt0QcY3MCjdnTpl2c2bAUuo0t+4O1CIE17d80zkZ9IJ+L/g02Nh/u5BjxXvuvfC2vMB77e17771D79hj7Y9t0/7RrjqfOxedn51f89B2a5HzzFuyzu//cEg3Wg==</latexit><latexit sha1_base64="iZORPDk58DGQu2er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10CWx0lQIkCRBCPZgdLAlt4nmSWqp1i7M/e8E2+NujxD/wAC/ZE1nubIpGm52wRR5rgwuOGuKLqRKRKYHRynKXZ+EmHBZUsET+aryiSmySTkdBtXX0tFXU9gcQkkaAUqNUQVLEdW02mnaAPKtoBEQixe2DGcQYcwlb9pRMcyzXJ+bw2WuWFNWyoahKgdVtTNHBpfIEu/VVFfjth27hLrKnKZhcZ/BTSqXHlNmleYyAVVY12IT7ROU0aUaTiKNbg646wREYILyDGIlhDo3yx24pyu7PX+yttHv9RuDm06wcDa8hR1O1v6QSLEicwfD0RszCvq5HZdUW84EuoEUBnPKpjTBkXMlzdCMy0aICl46JHINafdKCw16NaOkmTGzLHSRGbWpub5Wg7etjQobvxmXXOaFRcnmheJC1Ee0Pt0QcY3MCjdnTpl2c2bAUuo0t+4O1CIE17d80zkZ9IJ+L/g02Nh/u5BjxXvuvfC2vMB77e17771D79hj7Y9t0/7RrjqfOxedn51f89B2a5HzzFuyzu//cEg3Wg==</latexit>
![Page 6: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/6.jpg)
The Main Points
We established in the induction basis that the assertion A(1) is true.
We showed in the induction step that A(n+1) holds, assuming that A(n) holds. In other words, we showed in the induction step that A(n) A(n+1) holds for all n >= 1.
�6
![Page 7: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/7.jpg)
Perfect Squares
The perfect squares are given by12=1, 22=4, 32=9, 42=16, …
�
(n+1)2 = n2+n+n+1 = n2+2n+1 1+3+5+7 = 42
Chapter 4
Proofs by InductionI think some intuition leaks out in every step of an induction proof.
— Jim Propp, talk at AMS special session, January 2000
The principle of induction and the related principle of strong induction havebeen introduced in the previous chapter. However, it takes a bit of practiceto understand how to formulate such proofs. In this chapter, we will illustrateboth methods with several examples.
4.1 Perfect Squares
The perfect squares are given by
12 “ 1, 22 “ 4, 32 “ 9, 42 “ 16, . . .
Figure 4.1 depicts the perfect squares graphically.
�� �⇠ �
� ��⇠ ⇠�⇠ ⇠�
� �� �⇠ ⇠⇠ �⇠ ⇠⇠ �⇠ ⇠⇠ �
Figure 4.1: The first four perfect squares are 1, 4, 9, and 16. The illustrationexplains why these are also known as square numbers. The number of squares withoutan asterisk in the subfigures are 1, 3, 5, and 7.
The figure makes it apparent that going from the perfect square n2 to thenext, we have to add n squares on top, n squares on the side, and 1 for thecorner; hence,
pn ` 1q2
“ n2` 2n ` 1,
a fact that we could have just as easily obtained by algebra. However, thefigure moreover suggests that
1 ` 3 ` 5 ` 7 “ 42.
Prelim. version: Discrete Structures by A. Klappenecker and H. Lee, © 2014-2019 113
�7
![Page 8: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/8.jpg)
Example 2
Theorem: For all positive integers n, we have
1+3+5+...+(2n-1) = n2
Proof. We prove this by induction on n. Let A(n) be the assertion of the theorem.
Induction basis: Since 1 = 12, it follows that A(1) holds.
Induction step: As induction hypothesis (IH), suppose that A(n) holds. Then
1+3+5+...+(2n-1)+(2n+1) = n2+(2n+1) = (n+1)2
holds. In other words, A(n) implies A(n+1).
Therefore, the claim follows by induction on n. �8
by IH
![Page 9: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/9.jpg)
Example 3
Theorem: We have 12 + 22 + ... + n2 = n(n+1)(2n+1)/6for all n >= 1. Proof. Your turn!!!Let B(n) denote the assertion of the theorem.
Induction basis:
Since 12 = 1(1+1)(2+1)/6, we can conclude that B(1) holds.
�9
![Page 10: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/10.jpg)
Example 3 (Cont.)
Inductive step: As induction hypothesis (IH), suppose that B(n) holds. Then
12 + 22 + ... + n2 + (n+1)2 = n(n+1)(2n+1)/6 + (n+1)2 by IH
Factoring out (n+1) on the right hand side yields
(n+1)(n(2n+1)+6(n+1))/6 = (n+1)(2n2 +7n+6)/6
One easily verifies that this is equal to
(n+1)(n+2)(2n+3)/6 = (n+1)((n+1)+1)(2(n+1)+1)/6
Thus, B(n+1) holds.
Therefore, the claim follows by induction on n.
�10
![Page 11: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/11.jpg)
Example 4
Theorem: We have 13 + 23 + ... + n3 = n2(n+1)2/4for all n >= 1. Proof. Let P(n) denote the assertion of the theorem.
Induction basis: Show that P(1) holds.
Since 13 = 12(1+1)2/4, we conclude that P(1) holds.
�11
![Page 12: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/12.jpg)
Example 4 (Cont.)
Inductive step: As induction hypothesis (IH), suppose that P(n) holds. Then
13 + 23 + ... + n3 + (n+1)3= n2(n+1)2/4 + (n+1)3 by IH
Factoring out (n+1)2 on the right hand side yields
(n+1)2(n2+4(n+1))/4 = (n+1)2(n2 +4n+4)/4 = (n+1)2(n+2)2/4
which is equal to
(n+1)2((n+1)+1)2/4
Thus, P(n+1) holds.
Therefore, the claim follows by induction on n.
�12
![Page 13: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/13.jpg)
Tip
How can you verify whether your algebra is correct?
Use http://www.wolframalpha.com
[Not allowed in any exams, though. Sorry!]
�13
![Page 14: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/14.jpg)
More Examples
�14
![Page 15: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/15.jpg)
Sum of Fibonacci Numbers (1/2)
Let f0 = 0 and f1 = 1 and fn = fn�1 + fn�2 forn � 2. Then
nX
k=1
fk = fn+2 � 1.
Induction basis: For n = 1, we have
1X
k=1
fk = 1 = (1 + 1)� 1 = f1 + f2 � 1 = f3 � 1
�15
![Page 16: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/16.jpg)
Sum of Fibonacci Numbers (2/2)
�16
Let A(n) be the claimed equality.
Induction Step: We need to show that 8n � 1 : [A(n) ! A(n+ 1)]
As induction hypothesis, suppose that A(n) holds. Then,
n+1X
k=1
fk = fn+1 +
nX
k=1
fk
= fn+1 + fn+2 � 1 by Induction Hypothesis
= fn+3 � 1 by definition
Therefore, the claim follows by induction on n.
![Page 17: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/17.jpg)
Factorials
�17
Theorem.Pn
i=0 i(i!) = (n+ 1)!� 1. (By convention, 0! = 1.)
Induction Basis: For n = 0.
SinceP0
I=0 i(i!) = 0(0!) = 0 = 1� 1 = (0 + 1)!� 1, the claim holds for n = 0.
Induction Step: As induction hypothesis (IH), suppose the claim is true for n.Then,
n+1X
i=0
i(i!) =nX
i=0
i(i!) + (n+ 1)(n+ 1)!
= (n+ 1)!� 1 + (n+ 1)(n+ 1)! by IH
= (n+ 2)(n+ 1)!� 1 by factoring out (n+ 1)!
= (n+ 2)!� 1 by definition of !
Therefore, the claim follows by induction on n.<latexit sha1_base64="iZgghZqr5zmN1HKFNL5a01KZMRE=">AAAEf3icdZPLbtNAFIbdJEAxtxaWbE7aAAlNLbsS4iIFlSKhZlfUqxSn0Xg8Tka1Z4xnXBpZfgxejB3vwoJjOy1pAiNLPjp3f7/Hi0OutG3/WqnVG3fu3lu9bz54+Ojxk7X1pydKpgllx1SGMjnziGIhF+xYcx2yszhhJPJCdupdfC7ip5csUVyKIz2N2TAiY8EDTolG12i99sMVkgufCW26ml1pL8iOJkwmLLJys+WqNBplvGfn5wJ4mzc7vbbYcjrNbadlgfstJb7Z3psCleISW2DLLrTsJvQA4x3XHTjsami6KQ5IihWzvvBTWuTBHlFcfcjhi0ygJXp2y3Jd85ALymA2tl+Mtaux2NFu29W76L7t9Nr2bJEu6AkDGhIewUSGvoJgrufA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7jZXGq4bVsKvU2sqs5plx6zTe/wH/I1z6</latexit>
![Page 18: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/18.jpg)
Divisibility
Theorem: For all positive integers n, the number
7n-2n
is divisible by 5.
Proof: By induction.
Induction basis. Since 7-2=5, the theorem holds for n=1.
�18
![Page 19: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/19.jpg)
Divisibility
Inductive step:
Suppose that 7n-2n is divisible by 5. Our goal is to show that this implies that 7n+1-2n+1 is divisible by 5. We note that
7n+1-2n+1 = 7x7n-2x2n= 5x7n+2x7n-2x2n = 5x7n +2(7n-2n).
By induction hypothesis, (7n-2n) = 5k for some integer k.
Hence, 7n+1-2n+1= 5x7n +2x5k = 5(7n +2k), so
7n+1-2n+1 =5 x some integer.
Thus, the claim follows by induction on n.
�19
![Page 20: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/20.jpg)
Strong Induction
�20
![Page 21: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/21.jpg)
Strong Induction
Suppose we wish to prove a certain assertion concerning positive integers.
Let A(n) be the assertion concerning the integer n.
To prove it for all n >= 1, we can do the following:
1) Prove that the assertion A(1) is true.
2) Assuming that the assertions A(k) are proved for all k<n, prove that the assertion A(n) is true.
We can conclude that A(n) is true for all n>=1.
�21
![Page 22: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/22.jpg)
Strong Induction
Induction basis: Show that A(1) is true.
Induction step: Show that (A(1) ⋀ A(2) ⋀ ... ⋀ A(n)) → A(n+1)
holds for all n >=1.
�22
strong induction hypothesis
![Page 23: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/23.jpg)
Postage
Theorem: Every amount of postage that is at least 12 cents can be made from 4¢ and 5¢ stamps.
�23
![Page 24: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/24.jpg)
Postage
Proof by induction on the amount of postage.Induction Basis: If the postage is 12¢: use three 4¢ and zero 5¢ stamps (12=3x4+0x5)13¢: use two 4¢ and one 5¢ stamps (13=2x4+1x5)14¢: use one 4¢ and two 5¢ stamps (14=1x4+2x5) 15¢: use zero 4¢ and three 5¢ stamps (15=0x4+3x5)(Not part of induction basis, but let us try some more)16¢: use (three+one) 4¢ and zero 5¢ stamps ((3+1)x4+0x5)17¢: use (two+one) 4¢ and one 5¢ stamps ((2+1)x4+1x5)18¢: use (one+one) 4¢ and two 5¢t stamps ((1+1)x4+2x5) 19¢: use (zero+one) 4¢ and three 5¢ stamps ((0+1)x4+3x5)20¢: use (three+two) 4¢ and zero 5¢ stamps ((3+2)x4+0x5) . . .
�24
![Page 25: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/25.jpg)
Postage
Inductive step: Suppose that we have shown how to construct postage for every value from 12 up through k. We need to show how to construct k + 1 cents of postage.
Since we’ve already proved the induction basis, we may assume that k + 1 ≥ 16. Since k+1 ≥ 16, we have (k+1)−4 ≥ 12. By inductive hypothesis, we can construct postage for (k + 1) − 4 cents using m 4¢ stamps and n 5¢ stamps for some non-negative integers m and n. In other words ((k + 1) − 4) = 4m + 5n; hence, k+1 = 4(m+1)+5n.
Therefore, the claim follows by strong induction on n.�25
![Page 26: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/26.jpg)
Quiz
Why did we need to establish four cases in the induction basis? Isn’t it enough to remark that the postage for 12 cents is given by three 4 cents stamps?
�26
![Page 27: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/27.jpg)
Another Example: Sequence
Theorem: Let a sequence (an) be defined as follows: a0=1, a1=2, a2=3,
ak = ak-1+ak-2+ak-3 for all integers k≥3.
Then an ≤ 2n for all integers n ≥ 0. P(n)
Proof. Induction basis:The statement is true for n=0, since a0=1 ≤1=20 P(0)
for n=1: since a1=2 ≤2=21 P(1) for n=2: since a2=3 ≤4=22 P(2)
�27
![Page 28: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/28.jpg)
Sequence (cont’d)
Inductive step: (S.I.H.) Assume that P(i) is true for all i with 0≤i<k, that is, ai ≤ 2i for all 0≤i<k, where k>2.
Show that P(k) is true: ak ≤ 2k ak = ak-1+ak-2+ak-3 by def. of seq. ≤ 2k-1+2k-2+2k-3 by S.I.H. ≤ 20+21+…+2k-3+2k-2+2k-1
= 2k-1 ≤ 2k by understanding binary number systemThus, P(n) is shown true for all integers n≥0 by strong induction.
�28
1 0 0 02
1 1 12
= 810 - 12 - 110
= 710
20212223
![Page 29: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/29.jpg)
Yet Another Example Sequence
A sequence a0, a1, a2, ... is defined recursively as follows:a0 = 0;a1 = 1;an = 5an-1 - 6an-2 for all n >= 2.
Prove that for all non-negative integers n, an = 3n - 2n : P(n)
Proof. Induction basis: need to show P(0) and P(1) hold.
P(0) holds since a0 = 0 = 1 - 1 = 30 - 20
P(1) holds since a1 = 1 = 3 - 2 = 31 - 21
�29
![Page 30: TAMU Computer Science People Pages - Proof by …faculty.cse.tamu.edu/hlee/csce222/induction.pdfCSCE 222 Discrete Structures for Computing Proof by Induction Dr. Hyunyoung Lee Based](https://reader034.fdocuments.in/reader034/viewer/2022042203/5ea3f09227112e4e732a64de/html5/thumbnails/30.jpg)
Yet Another Example Sequence (Cont.)
�30
Inductive step: (S.I.H.) Assume that P(i) is true for all i with 0 ≤ i < n, that is, ai
= 3i - 2i for all 0≤i<n, where n>1. Show that P(n) is true: an = 3n - 2n an = 5an-1 - 6an-2 by def. of seq. = 5(3n-1 - 2n-1) - 6(3n-2 - 2n-2) by S.I.H. = (3+2)(3n-1 - 2n-1) - 3·2(3n-2 - 2n-2)
= 3·3n-1 - 3·2n-1 + 2·3n-1 - 2·2n-1 - 2·3·3n-2 + 3·2·2n-2 = 3·3n-1 - 2·2n-1 = 3n - 2n Thus, P(n) is shown true for all integers n≥0 by strong induction.