15-150: Principles of Functional Programming
Lecture 3: Recursion and Induction
Today we wrote some recursive functions for integers.
We proved correctness of two implementations of the power
function. We used standard/mathematical induction for one
implementation and strong/complete induction for a different
implementation of that same function.
Key Concepts
- Recursive functions
- Proofs of correctness
- Standard (mathematical) induction ---
Mathematical induction can be useful when an integer
variable is reduced by 1 in the recursive part of a function.
- Strong induction --- Strong induction can be useful when an integer
variable is reduced by more than 1.
Lecture Slides
Lecture Slides with every build, use "slideshow" option in your pdf viewer.
Lecture Slides compact.