DOC PREVIEW
UW-Madison CS 240 - Lecture 6 - Induction Draft

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS/Math 240: Introduction to Discrete Mathematics 2/8/2011Lecture 6 : InductionInstructor: Dieter van Melkebeek Scribe: Dalibor Zelen´yDRAFTLast time we began di sc uss i ng proofs. We mentioned some proof paradigms that ar e generallyapplicable. For implications, we saw how to write a direct pr oof and an indirect proof. We sawhow to prove equivalences by proving two implications and by constructing a chain of equival e nce s.We also saw two techniques applicable to proofs of any statements, namely proof by contradictionand proof by cases. However, you should not feel limited to using only those methods when youwrite proofs. Any sequence of logical deductions starting from a set of axioms and ending with theproposition you want to prove is acceptable.Today we focus on a proof paradigm called induction. Induc ti on is an important proof techniquein the realm of discrete mathematics and in computer science. Today we discuss some applicationsof this proof technique. We will see different forms of induction in the next lecture, and we will seesome of i t s applications in computer science in the lecture after that.6.1 InductionConsider the set of natural numbers. Suppose we know the following two facts about these numbers:1. Number 0 is happy.2. If number n is happy, this makes number n + 1 happy as well.We conclude that every natural number is happy. Why? We know that 0 is happy. Then by thesecond fact with n = 0, we know that 0 + 1 = 1 is happy as well. To show that 2 i s happy, use thefact that 1 is happy (which we just proved) and the second fact with n = 1. We can continue inthis fashion to prove that every natural number is happy.The example above demonstr at es the key idea behind induction. We use induction to provestatements of the form (∀n ∈ N)P (n) where P is some predicate mapping natural numbers topropositions. We do so by pr oving two statements:1. The base ca s e: P (0)2. The induction step: (∀n ∈ N) P (n) ⇒ P (n + 1)Proving the base case and the induction step shows that P (n) holds for all n. Formally, the inferencerule isP (0)(∀n ∈ N) P (n) ⇒ P (n + 1)(∀n ∈ N) P (n)(6.1)In the example above, P (n) was “number n is happy”. Note that the two antecedents in theinference rule correspond directly to the two statements about the happiness of natural nu mbe r swe made at the beginning of this section.1Lecture 6: Induction 6.2. Examples6.2 ExamplesLet’s see some examples of pr oofs by induction. We start with a simple example that highlightsthe technique. Then we show that some predicates P (n) are not suitable for induction, but aslight rewording of P (n), usuall y a generalization, may be sufficient to make an inductive proofgo through. We also give an incorrect inductive proof to highlight a common mistake. Our lastexample shows we can modify the inference rule (6.1) to get a proof in cases where we are onlyinterested in some subset of N as opposed to all of N.Before we start with our first example, let’s give an overvi e w of an inductive argument in steps.Step 1: Say that we give a proof by induction. Here it is also good to say what “variable” (say n) isused in the proof.Step 2: Define a predicate P in terms of our “variable” n, and state the base case and the inductivestep.Step 3: Prove the base case P (0) using a proof technique of your choice.Step 4: Prove the inductive step P (n) ⇒ P (n + 1) us i ng a pr oof technique of your choice. In thispart of the proof, we refe r to P (n) as the induction hypothesis.Step 5: Conclude that we have proved our statement by i n duc ti on for all n.We label these steps in the proofs that follow. The labels are only for didactic r e asons , and arenot used in mathematical writin g.6.2.1 A Straightforward ExampleAs our first example of a proof by induction, we prove a statement about the sum of the first npositive integers.Theorem 6.1. ( ∀n ∈ N) 1 + 2 + · · · + n =n(n+1)2Note that the statement of Theor e m 6.1 has the form of the conclusion of the i nfe r e nc e rule(6.1), so it is reasonable to think that an inductive proof could work.Proof of Theorem 6.1.Step 1We give a proof by in duc ti on on n.Step 2We prove th e statement (∀n ∈ N) P (n) where P (n) says that1 + 2 + · · · + n =n(n + 1)2. (6.2)Step 3We first argue the base case P (0). Note that in P (0), the left-hand side of (6.2) is the emptysum 0, and the right-hand side is 0(0 + 1)/2 = 0, so the base case holds.Step 4Now we argue that the inductive step is valid . We to prove the implication P (n) ⇒ P (n + 1)for an ar bi t rar y n using a direct proof.Let n ∈ N and assume that P (n) holds, th at is, assume that 1 + 2 + · · · + n = n(n + 1)/2.Consider the sum1 + 2 + · · · + n + (n + 1). (6.3)2Lecture 6: Induction 6.2. ExamplesThe sum of the first n terms in (6.3) is n(n + 1)/2 by the induction hypothesis, and we can re wri t ethe last term in (6.3) as n + 1 = 2(n + 1)/2, so we have1 + 2 + · · · + n + (n + 1) = (1 + 2 + · · · + n) + (n + 1) =n(n + 1)2+2(n + 1)2=(n + 2)(n + 1)2.This says that1 + 2 + · · · + n + (n + 1) =(n + 1)(n + 2)2,which is P (n + 1).This completes the proof of the inductive step.Step 5It follows by induction that for all n ∈ N, 1 + 2 + · · · + n =n(n+1)2.6.2.2 Proving a More General ResultIn a proof by induction, we need to pay extra attention to the definition of the statement P (n). Insome cases, our first attempt at an expression for P (n) won’t make our proof go through; however,it may be possible to tweak P (n) to obtain another predicate P′(n) and prove the statement(∀n)P′(n) instead of (∀n) P (n). This doesn’t look use ful if our goal is to prove (∀n)P (n), but P′(n)is often a stronger statement that implies P (n). In that case, we use the following inference afterproving (∀n)P′(n):(∀n ∈ N) P′(n)(∀n ∈ N) P′(n) ⇒ P (n)(∀n ∈ N) P(n)This completes the proof that P (n) holds for all n.We now give an example of this situation.Consider a 2n× 2nsquare gri d. We would like to tile it with L-shaped pieces (see Figure 6.1b),which we call L-shapes. Our tiling should satisf y the following conditions:1. No two L-shapes overlap.2. All squares except for one of the four squares in the center of the grid are covered by someL-shape.We show …


View Full Document

UW-Madison CS 240 - Lecture 6 - Induction Draft

Download Lecture 6 - Induction Draft
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 6 - Induction Draft and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 6 - Induction Draft 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?