Independent study companion · CMU 15‑451/651 · follows the Fall 2026 public schedule
See the algorithm. Find the invariant. Defend the proof.
A visual, proof-first companion to an upper-level algorithms course. Watch algorithms change state step by step, write the code yourself, and finish with problems that do not tell you which technique to use.
Independent project. Not affiliated with or endorsed by Carnegie Mellon University.
How it works
After lecture, don't just reread the notes.
See it
Your own code draws its state as it runs, so you can watch the invariant hold, one frame at a time.
Prove it
Turn the picture into a correctness argument and a running-time bound, in the right model.
Transfer it
Solve a new problem that does not name the technique it needs.
The lab stops telling you which algorithm you are practising.
Every module ends with a mastery challenge: a short story that never names its technique. You choose the plan, say why it is correct and how fast it is, and then write it.
See it
The algorithm must be able to undo itself
Pushing flow path by path gets stuck at 8 on this network. The fix is a reverse residual arc: not an original pipe, but the right to cancel flow sent earlier. Step through it.
Open the network-flow moduleThese frames are the network-flow lesson's own figures, drawn with straightedge, the library your lab code draws with. In the lab, your code records frames like these as it runs.
Start with one idea
Three modules to open first
Following 15-451?
The Fall 2026 schedule, lecture by lecture
The modules follow the topics of the public Fall 2026 schedule of CMU 15-451/651, in the same order, with the date each lecture takes a topic up. Every lesson, example and exercise here is original. Every lecture has a module.
| 15-451 lecture (Fall 2026) | SciMigo module |
|---|---|
| 1 Introduction, Algorithm Analysis, Linear-time SelectionTue 25 Aug | 1. Selection in Linear Time |
| 2 Concrete Models and Lower BoundsThu 27 Aug | 2. Lower Bounds and Adversaries |
| 3 Integer Models and Integer SortingTue 1 Sep | 3. Integer Sorting |
| 4 Hashing: Universal and Perfect HashingThu 3 Sep | 4. Universal and Perfect Hashing |
| 5 FingerprintingTue 8 Sep | 5. Fingerprinting and String Matching |
| 6 Range Query Data StructuresThu 10 Sep | 6. Range Queries and Segment Trees |
| 7 Amortized AnalysisTue 15 Sep | 7. Amortized Analysis |
| 8 Splay TreesThu 17 Sep | 8. Splay Trees |
| 9 Union-FindTue 22 Sep | 9. Union-Find |
| 10 Dynamic Programming IThu 24 Sep | 10. Dynamic Programming I |
| 11 Dynamic Programming IITue 29 Sep | 11. Dynamic Programming II |
| 12 Network Flows I: Flows, Cuts, and MatchingsThu 1 Oct | 12. Network Flow and Matchings |
| 13 Network Flows II: Polynomial-time AlgorithmsTue 6 Oct | 13. Polynomial-Time Max Flow |
| 14 Network Flows III: Minimum-cost FlowsThu 8 Oct | 14. Minimum-Cost Flow |
| 15 Game TheoryTue 20 Oct | 15. Zero-Sum Games |
| 16 Linear ProgrammingThu 22 Oct | 16. Linear Programming |
| 17 Linear Programming II: DualityTue 27 Oct | 17. LP Duality |
| 18 Linear Programming III: Integrality and PolytopesThu 29 Oct | 18. Polytopes and Integrality |
| 19 General MatchingsThu 5 Nov | 19. General Matchings |
| 20 Approximation AlgorithmsTue 10 Nov | 20. Approximation Algorithms |
| 21 Online AlgorithmsThu 12 Nov | 21. Online Algorithms |
| 22 Multiplicative Weights AlgorithmTue 17 Nov | 22. Multiplicative Weights |
| 23 The Fast Fourier Transform AlgorithmThu 19 Nov | 23. The Fast Fourier Transform |
| 24 Convolutions and their ApplicationsTue 24 Nov | 24. Convolutions and Their Applications |
| 25 The Algorithmic Magic of PolynomialsTue 1 Dec | 25. Polynomials in Algorithm Design |
Source: 15-451/651 Fall 2026 schedule, read 2026-09-27. Topic names are listed only to show what each module covers.
Found a technical error in a lesson or lab? Report a correction. Corrections are tracked in public.
Your Learning Path
Each module builds on the last. Open any published lesson or lab and continue at your own pace.
Built for
Who this course helps
- Students taking (or about to take) an upper-level algorithms class who want it to click
- People who have done LeetCode and want to know why the tricks actually work
- Self-taught programmers ready for the proof-and-analysis side of algorithms
What you leave with
A shelf of algorithms you wrote, watched, measured and can defend
- Identify the invariant or inductive claim that drives a correctness proof
- Analyze running time in the right model, and recognize when a lower bound makes it optimal
- Solve problems that do not tell you which technique they need
Your own code draws its state as it runs, so an invariant stops being a word in a proof and becomes something you can watch hold, one frame at a time.
About This Course
You have probably met sorting, hashing and binary search before. This course is the next step: instead of memorising which trick goes with which problem, you learn to invent an algorithm, prove it correct, pin down exactly how fast it is, and say when nothing can do better.
Every module has two halves. First a lesson you read: one story, a picture of the algorithm at work, the one idea (the invariant) that makes it correct, and the argument for its speed. Then a lab that runs in your browser, where your own code draws what it is doing, frame by frame, so you can scrub back to the exact step where it went wrong. Checks tell you when it works, and hints are there when you are stuck.
Each lab ends with a mastery challenge: a little story (a warehouse robot, two chess clubs, a pile of badge logs) that never tells you which technique to use. Working that out is the point. New modules arrive as they are finished; the 15-451 map near the top of this page shows which topics are covered so far.
Topic list modeled on the public schedules of CMU 15-451/651 Algorithm Design and Analysis (Fall 2025 and Fall 2026). All lessons, examples, code and exercises are original to SciMigo; no CMU course materials are reproduced. This course is independent and not affiliated with or endorsed by Carnegie Mellon University.
Prerequisites
- A first data-structures course: lists, hash maps, trees, BFS
- Comfort with proofs by induction (you will write plenty of them)
- Basic Python: functions, lists, dictionaries, loops
What You Will Learn
- Identify the invariant or inductive claim that drives a correctness proof, and write the proof
- Analyze running time in the right model of computation, and recognize when a lower bound shows it is optimal
- Build selection, hashing, segment trees, union-find, dynamic programs, flows and linear programs from scratch
- Measure your own code and check that the numbers match the proof
- Crack problems that do not tell you which technique they need
Algorithm Design and Analysis: frequently asked questions
What do I need to know before starting?
A first data-structures course (lists, hash maps, trees, BFS) and a bit of practice with proofs by induction. Basic Python is enough for the labs: no libraries, nothing fancy.
Is it free?
Yes. Every lesson and every lab is free, with no account needed. New modules are added as they are finished.
How long does a module take?
About two hours: half an hour or so to read the lesson, then the lab. Nobody has to do every module, so pick the ones you are here for.
What is a mastery challenge?
The last exercise in every lab. It is a short story (a warehouse robot, two chess clubs, a stack of badge logs) that never names the technique it needs. You pick the plan, say why it works and how fast it is, then write it.
What if I get stuck?
Every exercise has hints you can open one at a time, checks that say exactly what went wrong, and a worked example you can swap in (and swap back out).
Is it like a university algorithms class?
Its topics follow the public Fall 2026 schedule of CMU 15-451/651, and the map near the top of this page shows which lecture each module goes with and when that lecture is. Everything you read and solve here is original to SciMigo. It is an independent project, not affiliated with Carnegie Mellon University.
Will it help with my 15-451 homework?
It teaches the same kind of reasoning on original problems: finding the invariant, proving the bound, choosing a technique nobody names for you. It does not solve your course's homework, and your course's collaboration policy still applies.
Start now
Module 1: Selection in Linear Time
Find the median without sorting: with a guarantee, then with coins. About 120 minutes. Runs in your browser. Nothing to install, no account needed.
Start module 1 — free