MATH 302 Lecture 13

From Notes
Jump to navigation Jump to search

« previous | Wednesday, October 12, 2011 | next »


Strong Induction (cont'd)

"Once you see one you've seen them all."

Well-ordering Principle

Every non-empty subset S+ or S has a smallest element.


Division Algorithm

Take an integer b and a positive integer a, then we have for some q,r with 0r<a, that b=aq+r

For example: 10=3(3)+1

With these conditions, q and r are unique.


Given a set S={bat|t and bat0}, then

b a t b − at
10 3 0 10
    1 7
    -1 13
    2 4
    3 1

We can show that

  1. S is non-empty
  2. Let r be the minimal element in S. Then r=baq for q and 0r<a


Structural Induction and Recursion

Define n! for n+ recursively and uniquely for all positive integers:

Basis step. 0!=1

Recursive step. n!=n(n1)! for n1

Exercises

fa :: Integer -> Integer fa n

 | n < 0     = fail "n must be positive"
 | n == 0    = 1
 | otherwise = 3 * fa (n-1)

fb :: Integer -> Integer fb n

 | n < 0     = fail "n must be positive"
 | n == 0    = 1
 | otherwise = 3 * fb (n-1) + 2

fc :: Integer -> Integer fc n

 | n < 0     = fail "n must be positive"
 | n == 0    = 1
 | otherwise = 2^(fc (n-1))

Fibonacci Numbers

Basis step. f0=0, and f1=1

Recursive step. fn=fn1+fn2


We want to show that αn2<fn<αn for n2, where α=1+52

Proof by strong induction.

Basis step. for n=2,3, we have:

  • 2: 1<1<α2. True.
  • 3: α<2<α3. True.

Inductive step. For some k3, we assume that all preceding values are true. Then by the recursive relation, we have

fk+1=fk+fk1
αk2fkαk

Thus the general result follows by the principle of strong mathematical induction.

Structural definition of sets

  • Σ: alphabet (set of acceptable chars)
  • Σ*: words in the alphabet

Basis step. The empty word: λ ∈ Σ*

Recursive step. if w ∈ Σ* and x ∈ Σ, then wx ∈ Σ*.

Definition of Concatenation

Basis step. For w ∈ Σ and λ ∈ Σ*, we have = w

Recursive step. For w ∈ Σ, v ∈ Σ and x ∈ σ*, if wv is defined, then w(vx) = (wv)x.