SUNY Geneseo Department of Computer Science


Introduction to Induction

{Date}

CSci 141, Spring 2005
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture


Misc

CSci learning center

Questions?

Section 7.1.1

Induction

A kind of reasoning that generalizes individual observations to universal rules

Base case - proves theorem for smallest numbers

Induction step - shows that if statement holds for smaller numbers, it must hold for larger numbers

Induction hypotheses - assuming theorem is true

Structure of induction proofs

Induction Examples

Prove that the sum of the first n even integers is n(n+1), i.e.,

[Proof that Sum of First n Even Numbers is n(n+1)]

What does this have to do with computer science?

    sumUp( n )
        if n = 1
            return 2
        else
            return sumUp( n-1 ) + 2 * n

Connection to Algorithms

Next

Proofs about recursive algorithms

Read Section 7.1.2


Next Lecture