Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Mathematical Induction Proofs, Papers of Computer Science

An abstract of a mathematical induction proof, which is a technique used to prove statements of the form 'for all positive n, (np is true'. The concept of mathematical induction, the base step and induction step, and provides an example of an induction proof. It also discusses the importance of stating the induction hypothesis and the point in the proof where it is used.

Typology: Papers

Pre 2010

Uploaded on 08/19/2009

koofers-user-az1-1
koofers-user-az1-1 🇺🇸

10 documents

1 / 7

Toggle sidebar

Related documents


Partial preview of the text

Download Mathematical Induction Proofs and more Papers Computer Science in PDF only on Docsity! CMPS 101 Abstract Data Types Spring 2003 Induction Proofs Let )(nP be a propositional function of an integer n, i.e. P is a function whose domain is (some subset of) the set of integers and whose codomain is the set {true, false}. Informally this means )(nP is some assertion whose truth or falsity depends on the integer n. Mathematical Induction is a proof technique which can be used to prove statements of the form )(:1 nPn ≥∀ (“for all positive n, )(nP is true”). More generally we seek to prove for some integer 0n , that )(:0 nPnn ≥∀ . Such a proof consists of two steps: I. Base Step: Prove directly that the proposition )( 0nP is true. IIa. Induction Step: Prove ))1()((:0 +→≥∀ nPnPnn . Pick an arbitrary 0nn ≥ and assume that for this n, )(nP is true. Then show as a consequence that )1( +nP is true. The statement )(nP is often called the induction hypothesis, since it is what is assumed in the induction step. When I and II are complete we conclude that )(nP is true for all 0nn ≥ . Induction is sometimes explained in terms of a domino analogy. Consider an infinite set of dominos which are lined up and ready to fall. Let )(nP be the assertion: “the nth domino falls”. First prove )1(P , i.e. “the first domino falls”, then prove ))1()((: 1 +→≥∀ nPnPn which says “if any particular domino falls, then the next domino must also fall”. When this is done we may conclude )(:1 nPn ≥∀ , “all dominos fall”. There are a number of variations on the induction step. The first is just a reparametrization of IIa. IIb. Induction Step: Prove ))()1((:0 nPnPnn →−>∀ Let 0nn > , assume )1( −nP is true, then prove )(nP is true. Forms IIa and IIb are said to be based on the first principle of mathematical induction. The validity of this principle is proved in the appendix. Another important variation is called the second principle of mathematical induction, or strong induction. IIc. Induction Step: Prove ))1())( :((:0 +→≤∀≥∀ nPkPnknn Let 0nn ≥ , assume that for all k in the range nkn ≤≤0 , )(kP is true. Then prove as a consequence that )1( +nP is true. In this case the term induction hypothesis refers to the stronger assumption: )( : kPnk ≤∀ . The strong induction form is often reparameterized as in IIb: IId. Induction Step: Prove ))())(:((:0 nPkPnknn →<∀>∀ Let 0nn > , assume that for all k in the range nkn <≤0 , )(kP is true, then prove as a consequence that )(nP is true. In this case the induction hypothesis is )( : kPnk <∀ . Example 1 Prove that for all 1≥n : 6 )12)(1( 2 1 ++= = nnn i n i Proof: Let )(nP be the boxed equation above. We begin the induction at 10 =n . I. Base step Clearly 6 )112()11(1 1 1 1 2 +⋅⋅+⋅== =i i , showing that )1(P is true. IIa. Induction Step Let 1≥n and assume )(nP is true. That is, for this particular value of n, the boxed equation holds. Then 22 1 2 1 1 )1( ++=  = + = nii n i n i 2)1( 6 )12)(1( ++++= n nnn (by the induction hypothesis) 6 )1(6)12)(1( 2++++= nnnn [ ] [ ] 6 1)1(21)1()1( ++⋅++⋅+= nnn (by some algebra) showing that )1( +nP is true. We conclude that )(nP is true for all 1≥n . /// One should always state explicitly what is being assumed in the induction step (i.e. what is the induction hypothesis) One should also make note of the point in the proof at which the induction hypothesis is used. Example 2 Let Rx ∈ and 1≠x . Show that for all 0≥n : 1 1 1 1 − −= + =  x x x n i n i Proof: Again let )(nP be the boxed equation. We begin the induction at 00 =n . I. Base step 1 1 1 0 0 0 − −=== = x x xx i i , showing that )1(P is true. IIb. Induction Step Let 0>n and assume that )1( −nP is true, i.e. assume for this particular n that: 1 11 0 − −= − = x x x n i n i . Then Often the proposition to be proved is an inequality as in the next example. Example 5 Define )(nT for +∈ Zn by the recurrence  ( )  ≥+ = = 2 if12/ 1 if0 )( nnT n nT Prove that for all 5≥n , )lg(2)( nnT ≤ (which implies )(lg)( nOnT = .) Proof: Let )(nP be the boxed inequality above. I. Base Step One checks easily that )5lg(23)5( ⋅≤=T , using the recurrence and the fact that 258 ≤ , so )5(P holds. IId. Induction Step (Strong Induction) Let 5>n and assume for all k in the range nk <≤5 that )(kP is true, i.e. )lg(2)( kkT ≤ . In particular  ( )  ( )2/lg22/ nnT ≤ for  2/nk = . One shows easily that  ( ) )lg()2/1(lg xx +≤ for all )12/(1 −≥x . Since )12/(25 −≥>n we have )12/(12/ −≥n , and therefore  ( ) ( )( )2/lg)2/1(22/ nnT +≤ Now by the definition of )(nT :  ( ) 12/)( += nTnT ( )( ) 12/lg)2/1(2 ++≤ n (by the above inequality) )lg(2 n= , showing that )(nP is true. Therefore )lg(2)( nnT ≤ for all 5≥n as claimed. /// Induction Fallacies The next few examples illustrate some pitfalls in constructing induction proofs. The result in Example A below was proved correctly in Example 3. We give an invalid proof of the same fact which illustrates an argument some authors have called the “induction trap”. Example A Show that for all 1≥n , if T is a tree on n vertices then T has 1−n edges. Proof: (Invalid) Base Step: If 1=n then T has no edges, being acyclic. Induction Step: Let 1≥n and let T be a tree on n vertices. Assume that T has 1−n edges. Add a new vertex and join it to T with a new edge. The resulting graph has 1+n vertices and n edges (and is clearly a tree since connectedness is maintained and no cycles were created.) By the principle of mathematical induction, all trees on n vertices have 1−n edges. Let us first observe that this argument does not follow the induction paradigm. In this example )(nP is of the form )()( nBnA → where )(nA is the statement “T is a tree on n vertices”, and )(nB is “T has 1−n edges”. The induction step should therefore be to prove, for all 1≥n , )1()( +→ nPnP . That is ))1()1(())()(( +→+→→ nBnAnBnA . To prove this we should assume )()( nBnA → , then assume )1( +nA , then show as a consequence that )1( +nB is true. In other words we should: • Assume all trees on n vertices have 1−n edges • Assume T has 1+n vertices • Show as a consequence that T has n edges The above argument did not follow this format however. Instead the arguer does the following. • Assume T has n vertices • Assume T has 1−n edges • Construct a new tree from T having 1+n vertices and n edges Therefore the above argument was not a proof by induction. Some students would nevertheless hold that the above argument is still valid, even though it is not a true induction proof. The next example shows convincingly that it cannot be valid. First we introduce a few more definitions related to graphs. A graph G is called simple if it contains no loops (edges whose end vertices are identical) and no multiple edges (pairs of edges with the same end vertices). Example B For all 1≥n , if G is a simple graph on n vertices, then G has 1−n edges. We notice right away that the above statement is false since the graph below provides an elementary counter example. But consider the following “proof” in light of Example A. Proof: (Invalid) Base Step: If 1=n then G has no edges, being simple. Induction Step: Let 1≥n and let G be a simple graph on n vertices. Assume that G has 1−n edges. Add a new vertex and join it to G with a new edge. The resulting graph has 1+n vertices and n edges (and is clearly simple since no loops or multiple edges were created.) By the principle of mathematical induction, all simple graphs on n vertices have 1−n edges. Observe that Example B follows the format of Example A word for word. Thus if A is valid, so must B be valid. But the assertion “proved” in B is false! Therefore B cannot be a valid argument, and so neither is A. Another fallacy comes about by not proving the induction step for all 0nn ≥ . Example C Prove that all horses are of the same color. Proof: (Invalid) We prove that for all 1≥n : if S is a set of n horses, then all horses in S have the same color. The result follows on letting S be the set of all horses. Let )(nP be the boxed statement, and proceed by induction on n. Base Step: Let 1=n . Obviously if S is a set consisting of just one horse, then all horses in S must have the same color. Thus )1(P is true. Induction Step: Let 1>n and assume that in any set of n horses, all horses are of the same color. Let S be a set of 1+n horses, say { }1321 ,,,, += nhhhhS  . Then the sets }{},,,{ 1132 hShhhS n −==′ + and }{},,,{ 2131 hShhhS n −==′′ + each contain exactly n horses, and so by the induction hypothesis all horses in S ′ are of one color, and likewise for S ′′ . Observe that SSh ′′∩′∈3 and that 3h can have only one color. Therefore the color of the horses in S ′ is identical to that of the horses in S ′′ . (Note 31 2 1 ≥+≥> nnn , so there is in fact a third horse, and he can have only one color.) Since SSS ′′∪′= it follows that all horses in S are of the same color. Therefore )1()( +→ nPnP for all 1>n . The result now follows by induction Obviously the proposition being proved is false, so there is something wrong with the proof, but what? The base step is certainly correct, and the induction step, as stated, is also correct. The problem is that the induction step was not quantified properly. We should have proved )1()(:1 +→≥∀ nPnPn Instead we proved (correctly) that )1()(:1 +→>∀ nPnPn . Indeed it is true that )3()2( PP → for instance, but we never proved (and it is false that) )2()1( PP → . In terms of the domino analogy, it is as if the first domino falls; and if any domino indexed 2 or above were to fall, then the next domino would fall; but the first domino is not sufficient to topple the second domino, and hence no domino other than the first actually falls. Appendix: Proof of the first principle of mathematical induction. We prove for any propositional function )(nP defined on the positive integers +Z , that ( )[ ] )(:1)()1(:1)1( nPnnPnPnP ≥∀→→−>∀∧ is a tautology. The proof is based on the well ordering property of the positive integers: Any non-empty set of positive integers contains a least element. Proof: Assume that the statements )1(P and )()1(:1 nPnPn →−>∀ are true. Let }false is )(:{ nPZnS +∈= . It will be sufficient to show that ∅=S . Assume, to get a contradiction, that ∅≠S . Then S contains a least element m by the well ordering property. Since )1(P is true, S∉1 and so 1≠m . Therefore 11 ≥−m , and since m is the smallest element in S, Sm ∉−1 , whence )1( −mP is true. By setting mn = in the statement )()1(:1 nPnPn →−>∀ we conclude that )(mP must also be true . Thus Sm ∉ , contradicting the very definition of m as the smallest element in S. This contradiction shows that our assumption must be false, and therefore ∅=S as required. ///
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved