Induction: Mathematical Proofs using the Principle of Mathematical Induction, Slides of Discrete Mathematics

An introduction to mathematical induction, a proof technique used to establish the truth of a statement for all natural numbers. Definitions, theorems, examples using tower of hanoi, merge sort, and fibonacci sequence, and exercises to practice the concept. Induction is a fundamental concept in computer science and mathematics, and this document serves as a useful resource for students and researchers.

Typology: Slides

2012/2013

Uploaded on 04/23/2013

sarangapani
sarangapani 🇮🇳

4.5

(10)

62 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 20 Lecture 12
Induction
1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Induction: Mathematical Proofs using the Principle of Mathematical Induction and more Slides Discrete Mathematics in PDF only on Docsity!

CSE 20 Lecture 12

Induction

Induction Outlines

-^

Introduction

-^

Theorem

-^

Examples: The complexity calculation^ –

Tower of Hanoi

Merge Sort

Fibonacci

Induction: Theorem

Let P(n) be an assertion defined on the integer n.1. Base case: P(n

) is true for an integer n 0

. 0 2. Assumption: We assume that for a k ≥ n

, P(n) is true for all n 0

with k≥n≥ n

. 0 3. Incremental case: We can show P(k+1) is true for any k ≥ n

0

using assumption in 2. Then P(n) is true for every n≥n

. 0

Proof: By contradiction. Suppose P(n) is false for some n ≥ n

. Let 0

m be the least such n. We thus have

-^

m>n

(from condition 1). 0

-^

P(m-1) is true (from assumption). From condition 3, we have P(m) to be true which contradicts the

assumption.

Induction: Example

The Tower of Hanoi: The sequence of the number of

moves: f

=1, f 1

=2fn

n-

+1, can be expressed as f

= 2n

n-1.

Proof: By induction.Base case: The base case is true because f

1

Assumption: We assume f

= 2n

n-1 for n in 1≤n≤k where

k≥1. Incremental: We show that f

k+

k+

-1 for any k≥1.

fk+

=2f

+1 (Complexity of recursion)k = 2×(

k-1)+1 (From assumption)

k+

-1 (Arithmetic operation)

Based on induction theorem f

= 2n

n-1 for all integer n≥

Induction: Example

Complexity in terms of the number of elements:Merge Sort Complexity: f

=0, f 0

=2fn

n-

n.

We can express f

=n2n

n^

for n≥0.

Note that we have m=

n^

elements to sort.

In other words, the complexity to sort m elements takes

mlog

m comparison operations. 2

Induction: Example

Fibonacci sequence: f

=0,f 0

=1, f 1

=fn

n-

+f

n-

, can be

expressed as f

= √5/5{[(1+√5)/2]n

n^

-[(1-√5)/2]

n}

Proof: By induction.Base case: f

0

=√5/5{[(1+√5)/2]

0

-[(1-√5)/2]

f^1

=√5/5{[(1+√5)/2] -[(1-√5)/2]}=1 (Why f

Assumption: The expression is correct for n in 1≤n≤k

where k≥1. Incremental: f

k+

=f

+fk

k-

=√5/5{[(1+√5)/2]

k^

-[(1-√5)/2]

k} +√5/5{[(1+√5)/2]

k-

-[(1-

√5)/2]

k-

} (From Assumption)

=√5/5{[(1+√5)/2]

k+

-[(1-√5)/2]

k+

} (Arithmetic operation)

Induction: Example

Exercise: Show that√5/5{[(1+√5)/2]

k^

-[(1-√5)/2]

k} +√5/5{[(1+√5)/2]

k-

-[(1-

√5)/2]

k-

} = √5/5{[(1+√5)/2]

k+

-[(1-√5)/2]

k+

Hint: Derive that

[(1+√5)/2]

k^

+[(1+√5)/2]

k-

= [(1+√5)/2]

k+

And

[(1-√5)/2]

k^

+[(1-√5)/2]

k-

= [(1-√5)/2]

k+

Induction: Example

Statement: All horses are the same color.Proof: By induction.Base case: A horse is the same color.Assumption: Assume that n horses are the same color

for all 1≤n≤k where k≥1. Incremental: We show that k+1 horses are the same

color. We separate the horses into two groups x andy with |x|≤k, |y|≤k, |x|+|y|=k+2. Thus x and yoverlap by one. From assumption, x are the same color, y are the same

color. Because x and y overlaps, x and y are the same color.

Induction: iClicker

From the proof that all horses are the samecolor, we can conclude the following: •^

A. The base case has flaws.

-^

B. The assumption has flaws.

-^

C. The incremental case cannot grow frombase case.

-^

D. The incremental case has flaws when wehave 3 or more horses.

-^

E. None of the above.