Proofs, Recursion & Automata

Proving Recursive Algorithms Correct

19:21

Plays from YouTube. Watch on YouTube

Why is it valid for a recursive function to assume that smaller calls are correct?

Meet Proving Recursive Algorithms Correct: a rigorous animated lesson on algorithm correctness.

We start with recursive contracts, factorial's base case and a strictly decreasing measure.

From there, we prove list summation and binary-tree size using structural and numerical induction.

Then we discuss mutually recursive calls, overflow and why a self-call cannot justify itself.

The big idea: correctness requires a stated contract, a preserved invariant or recursive hypothesis, and guaranteed progress.

Algorithms and mathematical proofs explained visually, one concept at a time.