17.pdf - COMPSCI 250 Introduction to Computation Lecture#17...

Info icon This preview shows pages 1–9. Sign up to view the full content.

COMPSCI 250: Introduction to Computation Lecture #17: Proof by Induction for Naturals David Mix Barrington 13 October 2017
Image of page 1

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

Proof by Induction for Naturals Induction as a Proof Rule Example: Sum of First k Odd Numbers is k 2 Common Features of Inductive Proofs Example: 2 n Binary Strings of Length n Example: 2 n Subsets of an n-Element Set Why is Induction Valid? Some Counterintuitive Aspects of Induction
Image of page 2
Induction As a Proof Rule Formally, the Law of Mathematical Induction is just a rule that if we have proved certain statements, we are allowed to claim certain additional statements. To use ordinary induction (our topic today), we need a predicate P(x) that has one free variable of type natural . If we prove both “P(0)” and “ x: P(x) P(x+1)”, Then we may conclude “ x: P(x)”.
Image of page 3

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

Example: Sum of Odd Numbers Let’s look at a simple example. The first odd number is 1 = 2 × 1 - 1, the second is 3 = 2 × 2 - 1, the third 5 = 2 × 3 - 1, and in general the k’th odd number is 2k - 1. (We should actually prove this by induction, but there’s a technicality because we can’t start at 0.) We can see that 1 = 1 2 , 1 + 3 = 2 2 , 1 + 3 + 5 = 3 2 , 1 + 3 + 5 + 7 = 4 2 , and so on. We’ll let P(k) be the statement “the sum of the first k odd numbers is k 2 ”.
Image of page 4
Sum of Odd Numbers Proving P(0) is easy -- it says “the sum of the first 0 odd numbers is 0 2 ”, which is true because any empty sum is 0. Now we let x be arbitrary and assume that P(x) is true. So the sum of the first x odd numbers is x 2 . The sum of the first x+1 odd numbers is the sum of the first x, plus the x+1’st odd number which is 2(x+1) - 1 = 2x + 1.
Image of page 5

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

Sum of Odd Numbers The sum of the first x+1 odd numbers is the sum of the first x, plus the x+1’st odd number which is 2(x+1) - 1 = 2x + 1. So (still assuming that P(x) is true), we get that the sum of the first x+1 odd numbers is x 2 + (2x + 1) = (x+1) 2 . Because we proved P(x) P(x+1) for arbitrary x, we are done.
Image of page 6
Features of Inductive Proofs We first proved a base case -- the statement P(0) that we got by substituting 0 for x in the statement P(x). Base cases are usually easy to prove. We then began the inductive step , which is the proof of P(x) P(x+1) for arbitrary x. We assume the truth of P(x), which is called the inductive hypothesis , and use it to prove the inductive goal P(n+1).
Image of page 7

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

Features of Inductive Proofs Proving the inductive step usually relies on the fact that P(x) and P(x+1) are related statements.
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern