Mathematical Induction Everybody – do the wave! The Wave ● ● If done properly, everyone will eventually end up joining in. Why is that? ● ● Someone (me!) started everyone off. Once the person before you did the wave, you did the wave. The principle of mathematical induction states that if for some property P(n), we have that P(0) is true and For any natural number n, P(n) → P(n + 1) Then For any natural number n, P(n) is true. The principle of mathematical induction states that if for some property P(n), we have that P(0) is true If it starts... and For any natural number n, P(n) → P(n + 1) Then For any natural number n, P(n) is true. The principle of mathematical induction states that if for some property P(n), we have that P(0) is true If it starts... and and it keeps going... For any natural number n, P(n) → P(n + 1) Then For any natural number n, P(n) is true. The principle of mathematical induction states that if for some property P(n), we have that P(0) is true If it starts... and and it keeps going... For any natural number n, P(n) → P(n + 1) ...then it's always true Then For any natural number n, P(n) is true. Another Example of Induction Human Dominoes ● ● Everyone (except that last guy) eventually fell over. Why is that? ● ● Someone fell over. Once someone fell over, the next person fell over as well. The principle of mathematical induction states that if for some property P(n), we have that P(0) is true and For any natural number n, P(n) → P(n + 1) Then For any natural number n, P(n) is true. Induction, Intuitively ● It's true for 0. ● Since it's true for 0, it's true for 1. ● Since it's true for 1, it's true for 2. ● Since it's true for 2, it's true for 3. ● Since it's true for 3, it's true for 4. ● Since it's true for 4, it's true for 5. ● Since it's true for 5, it's true for 6. ● … Proof by Induction ● ● Suppose that you want to prove that some property P(n) holds of all natural numbers. To do so: Prove that P(0) is true. ● ● ● This is called the basis or the base case. Prove that for any natural number n, if P(n) is true, then P(n + 1) is true as well. ● This is called the inductive step. ● P(n) is called the inductive hypothesis. Conclude by induction that P(n) holds for all n. Some Sums 0=0 0+1=1 0+1+2=3 0+1+2+3=6 0 + 1 + 2 + 3 + 4 = 10 0 + 1 + 2 + 3 + 4 + 5 = 15 1 + 2 + … + (n – 1) + n = n(n+1) / 2 n n+1 Some Sums 0=0 0+1=1 0+1+2=3 0+1+2+3=6 0 + 1 + 2 + 3 + 4 = 10 0 + 1 + 2 + 3 + 4 + 5 = 15 Some Sums 0 = 0 = 0(0 + 1) / 2 0 + 1 = 1 = 1(1 + 1) / 2 0 + 1 + 2 = 3 = 2(2 + 1) / 2 0 + 1 + 2 + 3 = 6 = 3(3 + 1) / 2 0 + 1 + 2 + 3 + 4 = 10 = 4(4 + 1) / 2 0 + 1 + 2 + 3 + 4 + 5 = 15 = 5(5 + 1) / 2 Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of theAlways first zeromention positive that natural numbers is 0 = 0(0 + 1)/2, P(0) is true. you're Forplanning the inductive step, assume that for some n, P(n) holds, so on doing the proof 1 + 2by+ … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, induction, just as you meaning that the sum of the first n + 1 natural numbers is by contradiction or of the first n + 1 positive natural (n +would 1)(n + 2)/2. Consider the sum numbers. contrapositive. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, Explicitly state property meaning that the sum of the first n +what 1 natural numbers is (n + 1)(n + 2)/2. Consider the sumto of the first for n + 1 positive natural you're trying show all numbers. This is the sum of the first n positive natural numbers, plus thehypothesis, natural this numbers. n + 1. By the inductive is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus what you're this trying to by prove for P(0), n + 1. By theState inductive hypothesis, is given then go and prove it. You can use any proof technique you'd like. Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus this step, we this need to prove n + 1. By the In inductive hypothesis, is given by “For any natural number n, P(n) → P(n + 1)” To prove this, we choose an arbitrary n, then P(n). Thus P(n + 1) holds whenassume P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by State what P(n + 1) means, then Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural try to prove it. numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by 1+...+n+n+1= n( n+1) n(n+1)+2(n+1) (n+1)(n+2) +n+1= = 2 2 2 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by 1+...+n+n+1= n( n+1) n(n+1)+2(n+1) (n+1)(n+2) +n+1= = 2 2 2 The inductive hypothesis is that P(n) is Thus P(n + 1) holds when P(n) is true, sowhy P(n)we is true natural true. It's can for use all the result for n numbers n. ■ to simplify this sum. Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by 1+...+n+n+1= n( n+1) n(n+1)+2(n+1) (n+1)(n+2) +n+1= = 2 2 2 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by 1+...+n+n+1= n( n+1) n(n+1)+2(n+1) (n+1)(n+2) +n+1= = 2 2 2 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Our First Proof By Induction Theorem: The sum of the first n positive natural numbers is n(n + 1)/2. Proof: By induction. Let P(n) be “the sum of the first n positive natural numbers is n(n + 1) / 2.” We show that P(n) is true for all natural numbers n. For our base case, we need to show P(0) is true, meaning that the sum of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true. For the inductive step, assume that for some n, P(n) holds, so 1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds, meaning that the sum of the first n + 1 natural numbers is (n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural numbers. This is the sum of the first n positive natural numbers, plus n + 1. By the inductive hypothesis, this is given by 1+...+n+n+1= n( n+1) n(n+1)+2(n+1) (n+1)(n+2) +n+1= = 2 2 2 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ Structuring a Proof by Induction ● State that you are attempting to prove something by induction. ● State what your choice of P(n) is. ● Prove the base case: ● ● ● State what P(0) is, then prove it. Prove the inductive step: ● State that you're assuming P(n) and what P(n) is. ● State what P(n + 1) is. (this is what you're trying to prove) ● Go prove P(n + 1) This is very rigorous, so as we gain more familiarity with induction we will start being less formal in our proofs. Notation: Summations ● Instead of writing 1 + 2 + 3 + … + n, we write n ∑i i=0 Notation: Summations ● Instead of writing 1 + 2 + 3 + … + n, we write Sum from i = 0 n ∑i i=0 Notation: Summations ● Instead of writing 1 + 2 + 3 + … + n, we write Sum from i = 0 to n n ∑i i=0 Notation: Summations ● Instead of writing 1 + 2 + 3 + … + n, we write Sum from i = 0 to n n ∑i i=0 of i Summation Examples 5 ∑ i=1+2+3+4+5=15 i=1 3 ∑ i =1 +2 +3 =1+4+9=14 2 2 2 2 i=1 2 ∑ (i −i)=(0 −0)+(1 −1)+(2 −2)=2 i=0 2 2 2 2 The Empty Sum ● A sum of no numbers is defined to be zero. ● Examples: 0 ∑ 2 =0 i=1 i 42 ∑ i =0 i=137 i −1 ∑ i=0 i=0 n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i=0= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i=0= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 n i=1 (n+1)(n+2) 2 Pro tip – When proving n(n+1) n(n+1)+2(n+1) (n+1)(n+2) properties of sums with = ∑ i=∑ i+( n+1)= 2 +n+1= i=1 i=1 induction,2 it often helps 2to “peel Thus P(n + 1) holds when P(n) is true, so P(n) off” is truethe for all natural last few numbers terms. n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, ∑ i= i=1 Proof: By induction. Let P(n) be n(n+1) 2 n n(n+1) P(n) ≡ ∑ i= 2 i=1 For our base case, we need to show P(0) is true, meaning that 0 0(0+1) ∑ i= 2 i=1 This is trivial, since the empty sum is defined to be zero. For the inductive step, assume that for some n, P(n) holds, so n ∑ i= i=1 n(n+1) 2 We need to show that P(n + 1) holds, meaning that n+1 ∑ i= To see this, note that n+1 i=1 (n+1)(n+2) 2 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 2 2 n +n+ +2n+2 n +3n+ 2 4 4 (n+3/ 2) = = = 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 2 2 n +n+ +2n+2 n +3n+ 2 4 4 (n+3/ 2) = = = 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 2 2 n +n+ +2n+2 n +3n+ 2 4 4 (n+3/ 2) = = = 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 2 2 n +n+ +2n+2 n +3n+ 2 4 4 (n+3/ 2) = = = 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 2 2 n +n+ +2n+2 n +3n+ 2 4 4 (n+3/ 2) = = = 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 3 2 2 n +n+ +2n+2 n +3n+ (n+ ) 4 4 2 = = = 2 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 3 2 2 n +n+ +2n+2 n +3n+ (n+ ) 4 4 2 = = = 2 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) 2 2 i=1 Now, assume that for some n, P(n) holds, so n 1 1 i= ( n+ ∑ 2 2) i=1 2 2 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 3 2 2 n +n+ +2n+2 n +3n+ (n+ ) 4 4 2 = = = 2 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 2 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) Where did we prove 2 2 i=1 Now, assume that for some n, P(n) holds, so the base case? n 2 1 1 i= ( n+ ∑ 2 2) i=1 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 3 2 2 n +n+ +2n+2 n +3n+ (n+ ) 4 4 2 = = = 2 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ An Incorrect Proof n 2 1 1 Theorem: For any natural number n, ∑ i= ( n+ ) 2 2 i=1 n 2 1 1 Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) . Where did we prove 2 2 i=1 Now, assume that for some n, P(n) holds, so the base case? n 2 1 1 i= ( n+ ∑ 2 2) i=1 We want to show that P(n + 1) is true, which means that we want to show n+1 2 2 ∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 ) i=1 To see this, note that 1 2 1 2 (n+ ) ( n+ ) +2( n+1) n+1 n 2 2(n+1) 1 1 2 2 i= i+n+1= (n+ ) +n+1= + = ∑ ∑ 2 2 2 2 2 i=1 i=1 1 9 2 2 n +n+ +2n+2 n +3n+ 2 4 4 (n+3/ 2) = = = 2 2 2 So P(n + 1) follows from P(n), completing the induction. ■ When proving P(n) is true for all n by induction, make sure to show the base case! Otherwise, your entire argument is invalid! Stopping the Juggernaut “Once he gets a momentum, nothing can stop him” - X Men 3 Stopping the Juggernaut “Once he gets a momentum, nothing can stop him” - X Men 3 P(n) → P(n + 1) is not enough! Sums of Powers of Two 20 = 1 = 1 20 + 2 1 = 1 + 2 = 3 2 0 + 2 1 + 22 = 1 + 2 + 4 = 7 20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15 Sums of Powers of Two 20 = 1 = 1 = 2 1 – 1 20 + 2 1 = 1 + 2 = 3 = 22 – 1 2 0 + 2 1 + 22 = 1 + 2 + 4 = 7 = 2 3 – 1 20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15 = 24 – 1 Sums of Powers of Two 20 = 1 = 1 = 2 1 – 1 20 + 2 1 = 1 + 2 = 3 = 22 – 1 2 0 + 2 1 + 22 = 1 + 2 + 4 = 7 = 2 3 – 1 20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15 = 24 – 1 n ∑ 2 =2 i=0 i n+1 −1 n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i =0 ∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i =0 ∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i =0 ∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i =0 ∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i =0 ∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i=0 ∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i=0 n+1 n+1 n+2 =2(2familiar? )−1=2 −1 ∑ 2i =∑ 2i+2 n+1=2 n+1−1+2Seem Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i=0 ∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i=0 ∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ n Theorem: For any natural number n, Proof: By induction. Let P(n) be ∑ 2i =2n+1−1 i=0 n P(n) ≡ ∑ 2i =2n+1−1 i=0 For our base case, we need to show P(0) is true, meaning that 0 ∑ 2i =21−1 i=0 Since 20 = 1 = 21 – 1, this is true. For the inductive step, assume that for some n, P(n) holds, so n ∑ 2 =2 i n+1 −1 i=0 We need to show that P(n + 1) holds, meaning that n+1 ∑ 2i =2n+2−1 i=0 To see this, note that n+1 n i=0 i=0 ∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1 Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■ The Counterfeit Coin Problem Problem Statement ● ● ● You are given a set of three seemingly identical coins, two of which are real and one of which is counterfeit. The counterfeit coin weighs more than the rest of the coins. You are given a balance. Using only one weighing on the balance, find the counterfeit coin. Finding the Counterfeit Coin 1 2 3 Finding the Counterfeit Coin 1 3 2 Finding the Counterfeit Coin 2 1 3 Finding the Counterfeit Coin 2 1 3 Finding the Counterfeit Coin 1 2 3 Finding the Counterfeit Coin 1 2 3 Finding the Counterfeit Coin 1 3 2 Finding the Counterfeit Coin 1 3 2 A Harder Problem ● ● ● You are given a set of nine seemingly identical coins, eight of which are real and one of which is counterfeit. The counterfeit coin weighs more than the rest of the coins. You are given a balance. Using only two weighings on the balance, find the counterfeit coin. Finding the Counterfeit Coin 1 2 3 4 5 6 7 8 9 Finding the Counterfeit Coin 1 7 8 9 2 3 4 5 6 Finding the Counterfeit Coin 4 7 8 9 1 2 3 5 6 Finding the Counterfeit Coin 4 7 8 9 1 2 3 5 6 Finding the Counterfeit Coin 4 7 8 9 1 2 3 Now we have one weighing to find the counterfeit out of these three 5 6 Finding the Counterfeit Coin 1 2 3 4 7 8 9 5 6 Finding the Counterfeit Coin 1 2 3 4 7 8 9 5 6 Finding the Counterfeit Coin 1 2 3 4 7 8 9 5 6 Now we have one weighing to find the counterfeit out of these three Finding the Counterfeit Coin 1 7 8 9 2 3 4 5 6 Finding the Counterfeit Coin 1 7 8 9 2 3 4 5 6 Finding the Counterfeit Coin 1 7 8 2 3 9 Now we have one weighing to find the counterfeit out of these three 4 5 6 If we have n weighings on the scale, how many coins can we have while still being able to find the duplicate? A Pattern ● If we have no weighings, how many coins can we have while still being able to find the counterfeit? ● ● ● One coin, since that coin has to be the counterfeit! If we have one weighing, we can find the counterfeit out of three coins. If we have two weighings, we can find the counterfeit out of nine coins. So far, we have 1, 3, 9 = 30, 31, 32 Does this pattern continue? Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, it is therefore possible to find which coin it is in n weighings. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, we can use n more weighings to find which of these 3n coins is counterfeit. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n+1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, we can use n more weighings to find which of these 3n coins is counterfeit. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit. Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n coins is counterfeit.” We prove that P(n) is true for all natural numbers n by induction. For the base case, we want to show that P(0) holds, which means that we need to be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this is trivial – if there is only one coin, it must be the counterfeit. For the inductive step, suppose that for some n, P(n) holds, so we can detect which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1) holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1 weighings. To do this, split the coins into three equal groups of size 3 n; call the groups A, B, and C. Now, put the coins in set A on one side of the scale and the coins in set B on the other side. There are three cases to consider: Case 1: If side A is heavier, then the counterfeit coin must be in group A. Case 2: If side B is heaver, then the counterfeit coin must be in group B. Case 3: If the scale is balanced, then the counterfeit coin must be in group C, since it isn't in groups A or B. In any case, we can use one weighing to find which group of 3 n coins the counterfeit coin is contained in. By the inductive hypothesis, we can use n more weighings to find which of these 3n coins is counterfeit. Combined with our original weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1 weighings, so P(n + 1) holds. ■ Midway Reminder: Problem Session ● ● ● Problem Session tonight, 7-8PM in Y2E2, room 111. Purely optional, but should be a lot of fun! We'll try to get it recorded and posted on SCPD in a few days. The MU Puzzle Gödel, Escher Bach: An Eternal Golden Braid ● ● ● Pulitzer-Prize winning book exploring recursion, computability, and consciousness. Written by Douglas Hofstadter, computer scientist at Indiana University. A great (but dense!) read. The MU Puzzle ● Begin with the string MI. ● Repeatedly apply one of the following operations: ● ● Double the contents of the string after the M: for example, MIIU becomes MIIUIIU or MI becomes MII. ● Replace III with U: MIIII becomes MUI or MIU ● Append U to the string if it ends in I: MI becomes MIU ● Remove any UU: MUUU becomes MU Question: How do you transform MI to MU? A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. MI A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. MI A MII A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. MI A MII A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. A MIIII MI A MII A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. A MIIII D MIIIIU MI A MII A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. A MIIII D MIIIIU B MUIU MI A MII A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. A MIIII D MIIIIU B MUIU A MUIUUIU MI A MII A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. A MIIII D MIIIIU B MUIU A MUIUUIU C MUIIU Try It! Starting with MI, apply these operations to make A) Double the contents of the string after M. B) Replace III with U. C) Remove UU D) Append U if the string ends in I. MU: Not a single person in this room was able to solve this puzzle. Are we even sure that there is a solution? Counting I's Counting I's MI MII MIIII MIIIIU MIIIIUIIIIU MIIIIUUIU MIIIIUUIUIIIIUUIU MUIUUIUIIIIUUIU Counting I's MI 1 MII 2 MIIII 4 MIIIIU 4 MIIIIUIIIIU 8 MIIIIUUIU 5 MIIIIUUIUIIIIUUIU 10 MUIUUIUIIIIUUIU 7 Counting I's MI 1 MII 2 MIIII 4 MIIIIU 4 MIIIIUIIIIU 8 MIIIIUUIU 5 MIIIIUUIUIIIIUUIU 10 MUIUUIUIIIIUUIU 7 None of these are multiples of three... The Key Insight ● ● ● Initially, the number of I's is not a multiple of three. To make MU, the number of I's must end up as a multiple of three. Can we ever make the number of I's a multiple of three? Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Lemma: After beginning with MI and applying any legal sequence of the specified rules, the number of I's never becomes a multiple of three. Proof: By induction. Let P(n) be “After making n legal moves after starting with MI, the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural numbers n. As a base case, to prove that P(0) is true, we need to show that after making no moves the number of I's is not a multiple of 3. MI has one I in it, which is not a multiple of 3. For the inductive step, assume that P(n) holds and that after any sequence of n operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that after n + 1 operations the number of I's is not a multiple of 3), we note by the inductive hypothesis that after the first n operations, the number of I's is not a multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or 3k + 2 for some k. Consider the (n + 1)st operation: - If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 = 3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3. - If it's “delete UU” or “append U,” the number of I's is unchanged. - If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from 3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3. Thus any sequence of n + 1 legal operations starting with MI ends with the number of I's not a multiple of three, so P(n + 1) holds. ■ Theorem: The MU puzzle has no solution. Proof: By contradiction; assume it has a solution. By our lemma, the number of I's in the final string must not be a multiple of 3. However, for the solution to be valid, the number of I's must be 0, which is a multiple of 3. We have reached a contradiction, so our assumption was wrong and the MU puzzle has no solution. ■ Algorithms and Loop Invariants ● The proof we just made had the form ● ● ● ● “If P is true before we perform an action, it is true after we perform an action.” We could therefore conclude that after any series of actions of any length, if P was true beforehand, it is true now. In algorithms and program analysis, this is sometimes called a loop invariant. Formal proofs of algorithms often use loop invariants to establish correctness. ● Take CS161 for more details! Slimming Down Induction Proofs Induction in Practice ● ● ● Typically, a proof by induction will not explicitly state P(n). Rather, the proof will describe P(n) implicitly and leave it to the reader to fill in the details. Provided that there is sufficient detail to determine ● what P(n) is, ● that P(0) is true, and that ● whenever P(n) is true, P(n + 1) is true, the proof is usually valid. n Theorem: For any natural number n, ∑ i= i=1 n(n+1) 2 Proof: By induction on n. For our base case, if n = 0, note that 0 0(0+1) ∑ i= 2 =0 i=1 and the theorem is true for 0. For the inductive step, assume that for some n the theorem is true. Then we have that n+1 n n(n+1) n(n+1)+2(n+1) (n+1)(n+2) = ∑ i=∑ i+( n+1)= 2 +n+1= 2 2 i=1 i=1 so the theorem is true for n + 1, completing the induction. ■ A Variant of Induction n versus 2 2 n ● 02 = 0 ● 20 = 1 ● 12 = 1 ● 21 = 2 ● 22 = 4 ● 22 = 4 ● 32 = 9 ● 23 = 8 ● 42 = 16 ● 24 = 16 ● 52 = 25 ● 25 = 32 ● 62 = 36 ● 26 = 64 ● 72 = 49 ● 27 = 128 ● 82 = 64 ● 28 = 256 ● 92 = 81 ● 29 = 512 ● 102 = 100 ● 210 = 1024 n versus 2 2 n ● 02 = 0 < ● 20 = 1 ● 12 = 1 < ● 21 = 2 ● 22 = 4 = ● 22 = 4 ● 32 = 9 > ● 23 = 8 ● 42 = 16 = ● 24 = 16 ● 52 = 25 < ● 25 = 32 ● 62 = 36 < ● 26 = 64 ● 72 = 49 < ● 27 = 128 ● 82 = 64 < ● 28 = 256 ● 92 = 81 < ● 29 = 512 ● 102 = 100 < ● 210 = 1024 n versus 2 2 n ● 02 = 0 < ● 20 = 1 ● 12 = 1 < ● 21 = 2 ● 22 = 4 = ● 22 = 4 ● 3 =9 > ● 2 =8 ● 42 = 16 = ● 24 = 16 ● 52 = 25 < ● 25 = 32 ● 62 = 36 < ● 26 = 64 ● 72 = 49 < ● 27 = 128 ● 82 = 64 < ● 28 = 256 ● 92 = 81 < ● 29 = 512 ● 102 = 100 < ● 210 = 1024 2 3 2n is much bigger here. Does the trend continue? Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. (since 1 < 5 ≤ n) (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Theorem: For any natural number n ≥ 5, n2 < 2n. Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so the claim holds. For the inductive step, assume that for some n ≥ 5, n2 < 2n. Then we have that (n + 1)2 = n2 + 2n + 1 Since n ≥ 5, (n + 1)2 = n2 + 2n + 1 < n2 + 2n + n = n2 + 3n < n2 + n 2 = 2n2. Why Why isis this this (since 1 < 5 ≤ n) allowed? allowed? (since 3n < 5n ≤ n2) By the inductive hypothesis, n2 < 2n, so (n + 1)2 < 2n2 < 2(2n) = 2n + 1 Completing the proof by induction. ■ Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● ● ● ● ● P(3) is trivially true, so P(2) → P(3) Remember: A → B means P(4) is trivially true, so P(3) → P(4) “whenever A is true, B is true.” We explicitly proved P(5), so P(4) → P(5) If5, B alwaysproved true,that A P(n) → B→isP(n + 1). For any n ≥ weisexplicitly true for → any Thus P(0) and for any n, P(n) P(nA. + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) for is anyautomatically n, P(n) → P(n +true 1), so by induction Again, A and → B P(n) is true for all natural numbers n. if B is always true. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Why is this Legal? ● Let P(n) be “Either n < 5 or n2 < 2n.” ● P(0) is trivially true. ● P(1) is trivially true, so P(0) → P(1) ● P(2) is trivially true, so P(1) → P(2) ● P(3) is trivially true, so P(2) → P(3) ● P(4) is trivially true, so P(3) → P(4) ● We explicitly proved P(5), so P(4) → P(5) ● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1). ● Thus P(0) and for any n, P(n) → P(n + 1), so by induction P(n) is true for all natural numbers n. Induction Starting at k ● To prove that P(n) is true for all natural numbers greater than or equal to k: ● Show that P(k) is true. ● Show that for any n ≥ k, that P(n) → P(n + 1). ● Conclude P(k) holds for all natural numbers greater than or equal to k. One More Induction... Rube Goldberg Machines ● Every device eventually trigges. ● Why? ● ● The first device is triggered manually. ● Every device then triggers the next device. (This machine was built by Purdue university and unveiled last weekend at the 2012 Rube Goldberg Machine Contest. It won second place.) Next Time ● Strong Induction ● Stronger than normal induction! ● … or is it?
© Copyright 2026 Paperzz