Inductive Proofs - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Inductive Proofs

Description:

If prime, let s=1, p1=n 1. Else n 1=ab, where 1 a n and 1 b n. Then a=p1p2...pt and b=q1q2...qu. Then n 1= p1p2...pt q1q2...qu, a product of s=t u primes. 12 ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 17
Provided by: Michael1798
Learn more at: https://www.cs.gsu.edu
Category:

less

Transcript and Presenter's Notes

Title: Inductive Proofs


1
Inductive Proofs
  • Rosen 6th ed., 4.1-4.4

2
Mathematical Induction
  • A powerful, rigorous technique for proving that a
    predicate P(n) is true for every natural number
    n, no matter how large.
  • Based on a predicate-logic inference rule
  • P(0)?n?0 (P(n)?P(n1))??n?0 P(n)

3
Outline of an Inductive Proof
  • Want to prove ?n P(n)
  • Base case (or basis step) Prove P(0).
  • Inductive step Prove ?n P(n)?P(n1).
  • e.g. use a direct proof
  • Let n?N, assume P(n). (inductive hypothesis)
  • Under this assumption, prove P(n1).
  • Inductive inference rule then gives ?n P(n).

4
Induction Example
  • Prove that

5
Another Induction Example
  • Prove that ? , nlt2n. Let P(n)(nlt2n)
  • Base case P(0)(0lt20)(0lt1)T.
  • Inductive step For prove P(n)?P(n1).
  • Assuming nlt2n, prove n1 lt 2n1.
  • Note n 1 lt 2n 1 (by inductive hypothesis)
    lt 2n 2n (because 1lt22?20?2?2n-1 2n)
    2n1
  • So n 1 lt 2n1, and were done.

6
Validity of Induction
  • Prove if ?n?0 (P(n)?P(n1)), then ?k?0
    P(k)
  • (a) Given any k?0, ?n?0 (P(n)?P(n1)) implies
  • (P(0)?P(1)) ? (P(1)?P(2)) ? ?
    (P(k?1)?P(k))
  • (b) Using hypothetical syllogism k-1 times we
    have
  • P(0)?P(k)
  • (c) P(0) and modus ponens gives P(k).
  • Thus ?k?0 P(k).

7
Generalizing Induction
  • Can also be used to prove ?n?c P(n) for a given
    constant c?Z, where maybe c?0, then
  • Base case prove P(c) rather than P(0)
  • The inductive step is to prove
  • ?n?c (P(n)?P(n1)).

8
Induction Example
  • Prove that the sum of the first n odd positive
    integers is n2. That is, prove
  • Proof by induction.
  • Base case Let n1. The sum of the first 1 odd
    positive integer is 1 which equals 12.(Cont)

P(n)
9
Example cont.
  • Inductive step Prove ?n?1 P(n)?P(n1).
  • Let n?1, assume P(n), and prove P(n1).

By inductivehypothesis P(n)
10
Strong Induction
  • Characterized by another inference
    ruleP(0)?n?0 (?0?k?n P(k)) ? P(n1)??n?0
    P(n)
  • Difference with previous version is that the
    inductive step uses the fact that P(k) is true
    for all smaller , not just for kn.

P is true in all previous cases
11
Example 1
  • Show that every ngt1 can be written as a product
    p1p2ps of some series of s prime numbers. Let
    P(n)n has that property
  • Base case n2, let s1, p12.
  • Inductive step Let n?2. Assume ?2?k?n P(k).
    Consider n1. If prime, let s1, p1n1.Else
    n1ab, where 1lta?n and 1ltb?n.Then ap1p2pt and
    bq1q2qu. Then n1 p1p2pt q1q2qu, a product
    of stu primes.

12
Example 2
  • Prove that every amount of postage of 12 cents or
    more can be formed using just 4-cent and 5-cent
    stamps.
  • Base case 123(4), 132(4)1(5), 141(4)2(5),
    153(5), so ?12?n?15, P(n).
  • Inductive step Let n?15, assume ?12?k?n P(k).
    Note 12?n?3?n, so P(n?3), so add a 4-cent stamp
    to get postage for n1.

13
Recursive Definitions
  • Recursion defining an object (or function,
    algorithm, etc.) in terms of itself
  • Recursion can be used to define sequences
  • Previously sequences were defined using a
    specific formula, e.g., an 2n for n 0,1,2,...
  • This sequence can also be defined by giving the
    first term of the sequence, namely a0 1, and a
    rule for finding a term of the sequence for the
    previous one, namely, an1 2an for n
    0,1,2,...

14
Recursive Definitions
  • When defining a set recursively, we
  • (1) specify the initial elements in a basis step
    and
  • (2) provide a rule for constructing new elements
    from those we already have in the recursive step
  • Examples

15
Recursive Algorithms
  • Sometimes we can reduce the solution to the
    problem with a particular set of input to the
    solution of the same problem with smaller input
    values
  • When such a reduction can be done, the solution
    to the original problem can be found with a
    sequence of reductions, until the problem has
    been reduced to the initial case for which the
    solution is known

16
Recursive Algorithms
  • An algorithm is called recursive if it solves a
    problem by reducing it to an instance of the same
    problem with smaller input
  • Examples ..
Write a Comment
User Comments (0)
About PowerShow.com