CS285 · Annotated SlidesChapter 5 — Induction and Recursion (Handout)
Chapter 5 · Annotated slides

Induction and Recursion (Handout)

Worked handout: the ladder and domino intuition, the basis step and inductive step, solved induction proofs for sums, divisibility and inequalities, and recursively defined functions.

Slide text Study notes Highlight: key words Tips, tricks & traps Seen again elsewhere How it can come up
Slide 1: Mathematical Induction 5.1 & 5.3
Exam weight Low

    1. We can reach the first rung of the ladder. 2. If we can reach a particular rung of the ladder, then we can reach the next rung.

    The principle of Mathematic induction: 1. Show we can reach the first step

    1. Show that if we can reach step k, then we can reach step k+1 if we establish these 2 things, we know we can reach all the steps of the ladder. This example motivates proof by mathematical induction.

    Principle of Mathematical Induction (MI)

    2
    Exam weight Low
    1. Ladder: you can reach rung 1, and from rung k you can reach rung k + 1 ⇒ you can reach every rung.

    Principle of Mathematical Induction: To prove that P(n) is true for all positive integers n, where P(n) is a propositional function,

    we complete these steps:

    1.

    Basis Step: Show that P() is true.

    2.

    Inductive Step: Show that P(k) P(k + ) is true for all positive

    integers k.

    →

    Mathematical induction can be expressed as the rule of inference

    (P () k (P (k) P (k + )))

    n

    P (n ), where the domain is the set of positive integers.

    1 ∧ ∀

    →

    → ∀

    Proofs by mathematical induction do not always start at the integer. In such a case, the basis step begins at a starting point b where b is an integer. We will see examples of this soon.

    Remembering How Mathematical

    3
    Exam weight Low
      Slide 4: Induction Works - Domino Effect
      Exam weight Low
      1. Dominoes: first falls + each one knocks the next ⇒ all fall.
      Slide 5: Slide 5
      Exam weight Low
        Slide 6: Slide 6
        Exam weight Low
          Slide 7: Mathematical Induction
          Exam weight High
          1. Basis step: prove P(1) (or the first value). Inductive step: assume P(k) (the inductive hypothesis) and prove P(k + 1).
          Exam trapIn the inductive step you must USE P(k); just proving P(k + 1) from scratch is not induction.
          Slide 8: Slide 8
          Exam weight Low
            Slide 9: Slide 9
            Exam weight Low

              Mathematical Induction

              Slide 10
              10
              Exam weight Low
                Slide 11: Slide 11
                Exam weight Low
                  Slide 12: Slide 12
                  Exam weight Low
                    Slide 13: Slide 13
                    Exam weight Low
                      Slide 14: Slide 14
                      Exam weight Low
                        Slide 15: Slide 15
                        Exam weight Low
                          Slide 16: Slide 16
                          Exam weight Low
                            Slide 17: Slide 17
                            Exam weight Low

                              18
                              Exam weight Low
                                Slide 19: Slide 19
                                Exam weight Low
                                  Slide 20: k k
                                  Exam weight Low
                                    Slide 21: Slide 21
                                    Exam weight Low
                                      Slide 22: Slide 22
                                      Exam weight Low
                                        Slide 23: Slide 23
                                        Exam weight Low
                                          Slide 24: Slide 24
                                          Exam weight Low
                                            Slide 25: Slide 25
                                            Exam weight Low

                                              Recursively Defined Functions

                                              Definition: A recursive or inductive definition

                                              of a function consists of two steps.

                                              1.

                                              BASIS STEP: Specify the value of the function at

                                              zero.

                                              RECURSIVE STEP: Give a rule for finding its value at

                                              2.

                                              an integer from its values at smaller integers.

                                              Recursively Defined Functions Example1

                                              : Suppose f is defined by:

                                              26
                                              Exam weight Low
                                              1. Recursive definition: give f(0), then f(n + 1) in terms of f(n).
                                              Slide 27: Slide 27
                                              Exam weight Low
                                                Slide 28: Slide 28
                                                Exam weight Low
                                                  Slide 29: Slide 29
                                                  Exam weight Low
                                                    Slide 30: Slide 30
                                                    Exam weight Low
                                                      Slide 31: Slide 31
                                                      Exam weight Low
                                                        Slide 32: Slide 32
                                                        Exam weight Low
                                                          Slide 33: Slide 33
                                                          Exam weight Low
                                                            Slide 34: Slide 34
                                                            Exam weight Low