Mathematical Induction Recursive Definitions - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Mathematical Induction Recursive Definitions

Description:

It is a standard part of an inductive definition of a set but often ignored ... the inductive step in the definition of a n and. the induction hypothesis and ... – PowerPoint PPT presentation

Number of Views:329
Avg rating:3.0/5.0
Slides: 37
Provided by: isabellebi
Category:

less

Transcript and Presenter's Notes

Title: Mathematical Induction Recursive Definitions


1
Mathematical InductionRecursive Definitions
2
Learning Objectives
  • What is mathematical induction.
  • Examples of mathematical induction.
  • The second principle of mathematical induction.
  • What is a recursive definition of a set.
  • What is the recursive definition of a function.
  • Examples.

3
Mathematical Induction
  • A very special rule of inference!
  • Definition A set S is well ordered if every
    subset has a least element.
  • Note 0, 1 is not well ordered since (0,1
    does not have a least element.
  • Examples
  • N is well ordered (under the ? relation)
  • Any countably infinite set can be well ordered.
  • Z can be well ordered but it is not well ordered
    under the ? relation (Z has no smallest element).
  • The set of finite strings over an alphabet using
    lexicographic ordering is well ordered.

4
Mathematical Induction
  • Let P(x) be a predicate over a well ordered set
    S. The problem is to prove ? xP(x) .The rule of
    inference called
  • The (first) principle of Mathematical Induction
    can sometimes be used to establish the
    universally quantified assertion.
  • In the case that S N, the natural numbers, the
    principle has the following form.
  • P(0)
  • P(n) --gt P(n 1)
  • ? ?xP(x)

5
Mathematical Induction
  • The hypotheses are
  • H1 P(0) and
  • H2 P(n) --gt P(n 1) for n arbitrary.
  • H1 is called The Basis Step.
  • H2 is called The Induction (Inductive) Step
  • _____________________
  • We first prove that the predicate is true for
    the smallest element of the set S (0 if S N).
  • We then show that it is true for an element x (n
    if S N) implies it is true for the next
    element in the set (n 1 if S N).

6
Mathematical Induction
  • Then
  • knowing it is true for the first element means
    it must be true for the element following the
    first or the second element
  • knowing it is true for the second element
    implies it is true for the third
  • and so forth.
  • Therefore, induction is equivalent to modus
    ponens applied a countable number of times!!

7
Mathematical Induction
  • It is like a row of dominosIf the nth domino
    falls over the (n1)th, it must fall over, so
    pushing the first one down means all must fall
    down.
  • To prove H2 we normally use a Direct Proof .
  • Assuming P(n) to be true for arbitrary n is
    called the Induction (Inductive) Hypothesis.

8
Mathematical Induction
  • An Example Prove that the sum of integers from 1
    to N is N(N1) / 2
  • 1) Base case, try P(0), P(1).
  • 2) Induction case. Assume it holds for values
    up to n, and prove for n 1.
  • 3) Requires understanding how the hypothesis for
    n and n 1 are linked, and reducing the n 1case
    to the size n situation.
  • Assume that the sum of values from 1 to n is
    n(n1)/2.
  • Ask what is the sum of the values from 1 to n
    1.
  • But this can be written as (12 n) (n1).
  • Our induction hypothesis tell us that we can
    substitute n ( n 1)/2 to the first term n(n1)
    / 2 (n1) (n1) (n2) / 2

9
Mathematical Induction
  • Another ExampleProve that the sum of powers of 2
    is one less than the next higher power.
  • Verify P(0).
  • Suppose P(n) is true for all integers less than
    or equal to n.
  • P(n1)

10
Mathematical Induction
  • Example show that

11
Mathematical Induction
12
Mathematical Induction
13
Mathematical Induction
14
Mathematical Induction
15
(No Transcript)
16
Mathematical Induction
  • The Second Principle of Mathematical Induction
  • The rule of inference becomesThe two rules
    are equivalent but sometimes the second is easier
    to apply. See your text for the classic examples.

17
Recursive Definitions
  • Recursive or inductive definitions of sets and
    functions on recursively defined sets are
    similar.
  • 1. Basis step
  • For sets- State the basic building blocks
    (BBB's) of the set.
  • For functions- State the values of the function
    on the BBBs.
  • 2. Inductive or recursive step
  • For sets- Show how to build new things from
    old with some construction rules.
  • For functions- Show how to compute the value
    of a function on the new things that can be
    built knowing the value on the old things.

18
Recursive Definitions
  • 3. Extremal clause
  • For sets-If you can't build it with a finite
    number of applications of steps 1. and 2. then
    it isn't in the set.
  • For functions- A function defined on a
    recursively defined set does not require an
    extremal clause.

19
Recursive Definitions
  • Note Your author doesn't mention the extremal
    clause.
  • It is a standard part of an inductive definition
    of a set but often ignored (since everybody
    knows it is supposed to be there).
  • Also note
  • To prove something is in the set you must show
    how to construct it with a finite number of
    applications of the basis and inductive steps.
  • To prove something is not in the set is often
    more difficult.

20
Recursive Definitions
  • Example
  • A recursive definition of N
  • 1. Basis
  • 0 is in N (0 is the BBB).
  • 2. Induction
  • if n is in N then so is n 1 (how to build new
    objects from old add one to an old object to
    get a new one).
  • 3. Extremal clause
  • If you can't construct it with a finite number
    of applications of 1. and 2., it isn't in N.

21
Recursive Definitions
  • Now given the above recursive definition of N we
    can give recursive definitions of functions on N
  • 1. f(0) 1 (the initial condition or the value
    of the function on the BBBs).
  • 2. f(n 1) (n 1) f(n) (the recurrence
    equation, how to define f on the new objects
    based on its value on old objects)
  • f is the factorial function f(n) n!.
  • Note how it follows the recursive definition of
    N.

22
Recursive Definitions
  • Proof of assertions about inductively defined
    objects usually involves a Proof by induction.
  • Prove the assertion is true for the BBBs in the
    basis step.
  • Prove that if the assertion is true for the old
    objects, it must be true for the new objects you
    can build from the old objects.
  • Conclude the assertion must be true for all
    objects.

23
Recursive Definitions
  • Example
  • We define an inductively where n is in N.
  • Basis a0 1
  • Induction a(n 1) an a
  • We want to prove the theorem

24
Recursive Definitions
  • Proof
  • Since the powers of a have been defined
    inductively we must use a proof by induction
    somewhere.
  • Get rid of the first quantifier on m by Universal
    Instantiation
  • Assume m is arbitrary.
  • Now prove the remaining quantified assertion by
    induction

25
Recursive Definitions
  • by induction
  • 1. Basis step Show it holds for n 0.
  • The left side becomes ama0 am(1) am
  • The right side becomes a m0 am
  • Hence, the two sides are equal to the same
    value.
  • 2. Induction step The Induction hypothesis
  • Assume the assertion is true for n aman am n.
  • Now show it is true for n 1.
  • The left side becomes ama n1 am(ana)
    (aman)a amn a

26
Recursive Definitions
  • which follows from
  • the inductive step in the definition of a n and
  • the induction hypothesis and
  • the associativity of multiplication. The right
    side becomes
  • a m(n1) a (mn)1 a mn awhich follows
    from
  • the inductive definition of the powers of a
  • the associativity of addition.

27
Recursive Definitions
  • Hence, we have shown by induction for an
    arbitrary m that
  • Since m was arbitrary, by Universal
    Generalization,
  • Q.E.D.

28
Recursive Definitions
  • Example A recursive definition of the Fibonacci
    sequence
  • 1. Basis
  • f(0) f(1) 1 (two initial conditions)
  • 2. Induction
  • f(n 1) f (n) f(n - 1)
  • (the recurrence equation).

29
Recursive Definitions
  • Example

30
Recursive Definitions
31
Recursive Definitions
32
Recursive Definitions
33
Recursive Definitions
  • Example
  • We give an inductive definition of the well
    formed parenthesis strings P
  • 1. Basis clause
  • ( ) is in P
  • 2. Induction clause
  • if w is in P then so are ( ) w, (w), and w( )
  • 3. Extremal clause

34
Recursive Definitions
  • Example
  • (( )( )) is in P.
  • Proof
  • 1. ( ) is in P by the basis clause
  • 2. ( )( ) must be in P by step 1. and the
    induction clause
  • 3. (( ) ( )) must be in P by step 2. and the
    induction clause.
  • Q. E. D.

35
Recursive Definitions
  • Note ))(( ) is not in P. Why? Can you prove it?
  • (Hint what can you say about the length of
    strings in P? How can you order the strings in P?)

36
Recursive Definitions
Write a Comment
User Comments (0)
About PowerShow.com