Plays from YouTube. Watch on YouTube
How do we prove Euclid's algorithm, merge sort and fast exponentiation correct?
Meet Recursive Correctness: Worked Proofs: a rigorous animated lesson on algorithm correctness.
We start with each algorithm's contract, legal recursive subproblems and base cases.
From there, we derive the gcd identity, the sorted-merge lemma and even-odd exponent equations.
Then we inspect zero inputs, uneven splits, stable merging and exact-arithmetic assumptions.
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.