This action might not be possible to undo. Are you sure you want to continue?

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

If we want to prove that P n holds for for all natural numbers n, we can do the following twostep rocket called mathematical induction: 1. Prove that P 0 holds 2. Prove that if P n holds, then P n1 holds. Ie prove ∀ n∈ℕ: P n⇒ P n1 Step 1 is called the base case, step 2 is called the inductive step. In step 2, the assumption that P n holds is called the inductive hypothesis.

Example

Prove that for all n∈ℕ , nn 2 is an even number. Base case: prove that 002 is an even number 002 =0 , which is obviously even. Inductive step: assuming that nn 2 is even, prove that n1n12 is even. Since we know that nn 2 is even, we define nn 2=2m . This yields: n1 n12 =n1 n22n1 =n2 n2n2 =2m2n2 =2 mn1 ...which is obviously an even number, since it's a multiple of two.

2009 Johannes Åman Pohjola

1/6

Dept. of Information Technology

A slight generalization If we want to prove P n for all n≥n 0 . ∑ i−3≥ 4 i=0 Base case: show that n ∑ i−3≥ i=0 12 122 4 ∑ i −3 i =0 12 =−3−2−1−0123456789 =39 ≤36 12 2 = 4 Inductive step: show that if ∑ i−3≥ i=0 n n2 and n≥12 . of Information Technology . then 4 n1 i=0 ∑ i−3≥ n12 4 ∑ i −3 i=0 n n1 =∑ i−3n1−3 n n−2 4 n24n−8 = n−2 4 n22n12n−9 = 4 2 n 2n12n−9 = 4 2 n1 2n−9 = 4 2 n1 ≥ 4 ≥ i =0 2 2009 Johannes Åman Pohjola 2/6 Dept. Example n2 Show that for all n≥12 . we can use P n 0 rather than P n as the base case.

Notice the similarity in structure between this style of definition and inductive proofs. We prove this by induction. then so is A . It's no coincidence. Clearly. of Information Technology . then so is ∣A1 A2∣ . the natural numbers is far from the only structure which can be defined as such: sky's the limit! Linked lists and binary trees are examples of well-known data structures that can be inductively defined (the definitions are left as an exercise for the reader). then so is ∣A1− A2∣ . lline A rline is odd. then n+1 is a natural number. 2009 Johannes Åman Pohjola 3/6 Dept. the proof will follow the same structure. However. A1 – A 2 . Inductive step (i): if ∣A1∣ and ∣A2∣ are odd. then we should be able to prove properties about those structures with induction. Base case(s): a number or variable has an odd number of symbols A variable or number is by definition a symbol: we have one symbol. binary operators and parentheses are symbols. If A is an arithmetic expression. variables. Let ∣A∣=2n1 . We let ∣A1∣=2n1 and ∣A2∣=2m1 . we have: ∣A1 A2∣=∣A1∣∣A2∣1=2n12m11=2mn11 Inductive step (ii): if ∣A1∣ and ∣A2∣ are odd. if other structures can be inductively defined just as the natural numbers. Numbers. can be inductively defined as follows: • • • All numbers and variables are arithmetic expressions If A1 and A2 are arithmetic expressions. Induction proofs exploit the property that the natural numbers are an inductivelydefined structure. ie ∣1 x∣=3 and ∣135∗7∣=7 . and one is odd. A1∗A2 . involving only parentheses and binary operators. like we do for the natural numbers. A 1 A 2 . Since there are several (as opposed to just one) ”inductive steps” in the definition of our structure. Example Simple arithmetic expressions. We have ∣ A∣=2∣A∣=22n1=2 n11 . Thus. Let ∣A∣ denote the number of symbols in an arithmetic expression A . then so is and A1 / A2 . Theorem: for all A.A larger generalization: structural induction The set ℕ of natural numbers can be inductively defined as follows: • • 0 is in a natural number If n is a natural number. Proof analogous to (i). … Inductive step (v): if ∣A∣ is odd. then so is ∣ A∣ .

Let H ={h1. then so do all horses in sets of size n+1. Vacuously true. hn1 } denote any size n+1 set of horses. spider-sense would indicate that something is not right here: the result we just obtained is widely held to be false. that for every set of horses. there is some error in our proof. h3. then by the induction hypothesis. we know that all horses in H 1 and H 2 have the same colour. Base case: all horses in the empty set have the same colour. Now consider the sets H 1={h2. However.1: Counterexample Clearly. … . h2. all horses in H must have the same colour. hn1 } and H 2={h 1. In fact. Since H 1 and H 2 overlaps. Inductive step: if all horses in horse sets of size n have the same colour. Can you find it? 2009 Johannes Åman Pohjola 4/6 Dept. or equivalently. We use induction over the size of the horse sets. of Information Technology . … .Cargo cult induction We wish to show that all horses have the same colour. we can provide a counterexample: Figure 1. This completes our ”proof”. hn . all its members have the same colour. h2. hn −1 . Since H 1 and H 2 each have n elements. hn . hn } . … .

as long as you're convinced that your guess is correct. c 2=5 and n 0=2 . Hence. not to find the ”best” such constants. go for the constants which simplify your proof the most.ie. It doesn't matter. You can arrive at your guesses with more or less sophistication: plot graphs. prove 0≤c 1⋅n . I use forbidden arcane magical lore to guess c 1=1 . In this example. fiddle around algebraically or apply astrology according to taste. c 2 and n 0 . as long as they satisfy the inequality. the best choice is the most convenient choice for you: when in doubt. I then need to prove: • • • 2 0≤1⋅n for all n≥2 2 2 1⋅n ≤5n −3n−6 for all n≥2 2 2 5n −3n−6≤5⋅n for all n≥2 Proving the above inequalities is straightforward – feel free to do it as an exercise. our task is to find positive constants c 1 . • Note that it doesn't matter which values you pick for the constants. of Information Technology . c 1⋅n 2≤5n 2−3n−6 and 5n 2−3n−6≤c 2⋅n2 for all n≥n 0 .Asymptotic notation: an example We wish to prove that 5n 2−3n−6=n 2 . Your task is to show that such constants exists. 2009 Johannes Åman Pohjola 5/6 Dept. c 2 and n 0 such that for all n≥n 0 we have 0≤c 1⋅n ≤5n −3n−6≤c 2⋅n 2 2 2 (*) One general strategy is the following two-step rocket: • Guess values of c 1 . 2 Prove that the values you guessed actually satisfy (*) . Unfolding the definition of -notation.

of Information Technology . n n n n Inductive hypothesis: if T ⌊ ⌋≤c⋅⌊ ⌋⋅lg ⌊ ⌋⌊ ⌋ . where n denotes the number of elements we are sorting. Substition • • Guess a solution. since there are Olg n levels. The sum of all per-level costs gives the total cost. From here.Methods for solving recurrence equations Recursion trees • • • Each node represents the cost of one subproblem. you should be witnessing a nice recursion tree being drawn on the blackboard! Basically. T 1=1 n T n=2⋅T ⌊ ⌋c⋅n 2 If you are at the tutorial session right now. Constants and lower-order terms have been somewhat simplified: we want to illustrate an idea here. and go with induction from there: Base case: T 1≤c⋅1⋅lg 11 Simplifies to 1≤1 . not do something incredibly hairy. it is trivial to show that T n=O n⋅lg n . Verify the correctness of the solution using induction. then T n≤c⋅n⋅lg nn 2 2 2 2 T n n =2⋅T ⌊ ⌋c⋅n 2 n n n ≤2⋅c⋅⌊ ⌋⋅lg ⌊ ⌋⌊ ⌋c⋅n 2 2 2 n n n ≤2⋅c⋅ ⋅lg c⋅n 2 2 2 =c⋅n⋅lg n−1nc⋅n =c⋅n⋅lg nn Notice how we use the fact that we're working with inequalities to our advantage. 2009 Johannes Åman Pohjola 6/6 Dept. which represent the cost of the base cases. Example: merge sort The following recurrence describes the runtime of merge sort. the cost of the entire tree is O n⋅lg n ! We can also show this with the substitution method. The sum of all node costs within a level gives the total cost of that level. We begin by guessing that T n≤c⋅n⋅lg nn (which is what the recursion tree would indicate). with the cost of each level being O n . all the way down until the leafs.

- Himpunan Fuzzy Dan Operasi Dasar (Versi 2)
- Theorems in Computational Complexity Theory
- The Maximum Number of Disjoint Pairs in a Family of Subsets
- Boolean Algebra
- Pigeon Hole
- 1
- Big O notation - Wikipedia, the free encyclopedia
- MELJUN CORTES Automata Lecture Review of Important Concepts 1
- math140a_note3
- Decimal Expansions
- CCandRCP
- SMARANDACHE FRIENDLY CUBE NUMBERS
- Important Infinite Sums
- What's a Compound Inequality
- How to Teach Math Using Shichida’s 65 Day Program
- pell-2
- MC0063(a) Blockinto Fi
- Counting P&C
- Chapter 04_Division and Factorization
- Ch 1
- Graph Theory Presentation
- Counterwts.tanya
- ch6_exercises.pdf
- quality management software free.docx
- 7QC
- Qctools-REV for MGMT 512R-BW
- Significant Figures
- 7_QC_TOOLS
- quality management examples.docx
- system quality management.docx

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd