Every algorithm this unit has built so far — mergesort, quicksort, Dijkstra, Kruskal, Union-Find — is a specific instance of a small number of reusable design templates, and this topic names them explicitly: divide-and-conquer (already used, revisited here as a named pattern), greedy algorithms (with the exchange-argument proof technique generalised from Dijkstra's and Kruskal/Prim's correctness proofs), and dynamic programming (the recipe behind Floyd-Warshall, named and generalised as SRBOT). Recognising which paradigm a new problem fits is the single highest-leverage skill this whole unit has been building toward — most of algorithm design in practice is pattern-matching a new problem against this small toolkit, not inventing something genuinely new.
By the end of this topic you should be able to:
- recognise a divide-and-conquer structure and state its recurrence directly.
- state and apply the greedy-choice property and optimal-substructure, and construct exchange-argument correctness proofs.
- apply the SRBOT recipe (subproblem, recurrence, order, base cases, top-down/bottom-up) to derive a dynamic program from scratch.
- solve the classic DP family (LCS, matrix-chain multiplication, optimal BSTs) and recognise their structural kinship to option-pricing DP.
- choose the right paradigm for a new, unseen problem by reading its structure.
In this lesson
- Contents
- The big picture
The full lesson is for members.
Read the full lessonNew to SelfMadeQuant.com? See membership options or explore the curriculum.