Proofs, Recursion & Automata

Partial vs. Total Correctness

19:31

Plays from YouTube. Watch on YouTube

Can an algorithm be right whenever it returns but still run forever?

Meet Partial vs. Total Correctness: a rigorous animated lesson on algorithm correctness.

We start with partial correctness, total correctness and Hoare-style specifications.

From there, we prove repeated-subtraction division with a conserved equation and a decreasing remainder.

Then we expose invalid ranking functions, missing preconditions and additional exit paths.

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.