Lecture 9 -Induction

# Lecture 9 -Induction - Induction (Computer Science Notes)...

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

Induction (Computer Science Notes) An Example Claim: P(n) is true for all positive integers n. Proof: We’ll use induction on n. Base: We need to show that P(1) is true. Induction: Suppose that P(k) is true, for some positive integer k. We need to show that P(k + 1) is true. Why is this Legit? A proof by induction of that P(k) is true for all positive integers k involves showing that P(1) is true (base case) and that P(k) ! P(k + 1) (inductive step) Domino Theory: Imagine an infinite line of dominoes. The base step pushes the first one over. The inductive step claims that one domino falling down will push over the next domino in the line. So dominos will start to fall from the beginning all the way down the line. This process continues forever, because the line is infinitely long. However, if you focus on any specific domino, it falls after some specific finite delay These arguments don’t depend on whether our starting point is 1 or some other integer, e.g. 0 or 2 or -47. All you need to do is ensure that your base case covers the first integer for which the claim is supposed to be true. Building an Inductive Proof In constructing an inductive proof, you’ve got two tasks. First, you need to set up this outline for your problem. This includes identifying a suitable proposition P and a suitable integer variable n Notice that P(n) must be a statement, i.e. something that is either true or false. For example, it is never just a formula whose value is a number. Also, notice that P(n) must depend on an integer n. This integer n is known as our induction variable. The assumption at the start of the inductive step (“P(k) is true”) is called the inductive hypothesis Your second task is to fill in the middle part of the induction step. That is, you must figure out how to relate a solution for a larger problem P(k+1) to a solution for a small problem P(k). Most students want to do this by starting with the small problem and

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

View Full Document
adding something to it. For more complex situations, it’s usually better to start with the larger problem and try to find an instance of the smaller problem inside it Another Example of Induction Claim 2 Some Comments about Style Sometimes there’s more than one integer floating around that might make a plausible choice for the induction variable. It’s good style to always mention that you are doing a proof by induction and say what your induction variable is It’s also good style to label your base and inductive steps Almost all the time, the base case is trivial to prove and fairly obvious to both you and
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 11/16/2011 for the course CS 173 taught by Professor Erickson during the Spring '08 term at University of Illinois, Urbana Champaign.

### Page1 / 5

Lecture 9 -Induction - Induction (Computer Science Notes)...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online