{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS 70 Lecture 03

CS 70 Lecture 03 - CS 70 Spring 2010 Induction Discrete...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 70 Discrete Mathematics and Probability Theory Spring 2010 Alistair Sinclair Note 3 Induction Induction is an extremely powerful tool in mathematics. It is a way of proving propositions that hold for all natural numbers: 1) k N , 0 + 1 + 2 + 3 + ··· + k = k ( k + 1 ) 2 2) k N , the sum of the first k odd numbers is a perfect square. 3) Any graph with k vertices and k edges contains a cycle. Each of these propositions is of the form k N P ( k ) . For example, in the first proposition, P ( k ) is the statement 0 + 1 + ··· + k = k ( k + 1 ) 2 , P ( 0 ) says 0 = 0 ( 0 + 1 ) 2 , P ( 1 ) says 0 + 1 = 1 ( 1 + 1 ) 2 , etc. The principle of induction asserts that you can prove P ( k ) is true k N , by following these three steps: Base Case: Prove that P ( 0 ) is true. Inductive Hypothesis: Assume that P ( k ) is true. Inductive Step: Prove that P ( k + 1 ) is true. The principle of induction formally says that if P ( 0 ) and n N ( P ( n ) = P ( n + 1 )) , then n N P ( n ) . Intuitively, the base case says that P ( 0 ) holds, while the inductive step says that P ( 0 ) = P ( 1 ) , and P ( 1 ) = P ( 2 ) , and so on. The fact that this “domino effect” eventually shows that n N P ( n ) is what the principle of induction (or the induction axiom) states. In fact, dominoes are a wonderful analogy: we have a domino for each proposition P ( k ) . The dominoes are lined up so that if the k th domino is knocked over, then it in turn knocks over the k + 1 st . Knocking over the k th domino corresponds to proving P ( k ) is true. So the induction step corresponds to the fact that the k th domino knocks over the k + 1 st domino. Now, if we knock over the first domino (the one numbered 0), then this sets off a chain reaction that knocks down all the dominoes. Let’s see some examples. Theorem: k N , k i = 0 i = k ( k + 1 ) 2 . Proof (by induction on k ): • Base Case: P ( 0 ) asserts: 0 i = 0 i = 0 ( 0 + 1 ) 2 . This clearly holds, since the left and right hand sides both equal 0. CS 70, Spring 2010, Note 3 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
• Inductive Hypothesis: Assume P ( k ) is true. That is, k i = 0 i = k ( k + 1 ) 2 . • Inductive Step: We must show P ( k + 1 ) . That is, k + 1 i = 0 i = ( k + 1 )( k + 2 ) 2 : k + 1 i = 0 i = ( k i = 0 i )+( k + 1 ) = k ( k + 1 ) 2 +( k + 1 ) (by the inductive hypothesis) = ( k + 1 )( k 2 + 1 ) = ( k + 1 )( k + 2 ) 2 . Hence, by the principle of induction, the theorem holds. Note the structure of the inductive step. You try to show P ( k + 1 ) under the assumption that P ( k ) is true. The idea is that P ( k + 1 ) by itself is a difficult proposition to prove. Many difficult problems in computer science are solved by breaking the problem into smaller, easier ones. This is precisely what we did in the inductive step: P ( k + 1 ) is difficult to prove, but we were able to recursively define it in terms of P ( k ) . We will now look at another proof by induction, but first we will introduce some notation and a definition for divisibility. We say that integer a divides b (or b is divisible by a ), written as a | b , if and only if for some integer q , b = aq .
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}