Independent study companion · CMU 15-451/651 topics
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.
Start with one idea
Three modules to open first
Following 15-451?
The Fall 2025 schedule, lecture by lecture
The modules follow the topics of the public Fall 2025 schedule of CMU 15-451/651, in the same order. Every lesson, example and exercise here is original. 17 of 25 topics have a module so far.
| 15-451 lecture (Fall 2025) | SciMigo module |
|---|---|
| 1 Introduction, algorithm analysis, linear-time selection | 1. Selection in Linear Time |
| 2 Concrete models and lower bounds | 2. Lower Bounds and Adversaries |
| 3 Integer models and integer sorting | 3. Integer Sorting |
| 4 Hashing: universal and perfect hashing | 4. Universal and Perfect Hashing |
| 5 Fingerprinting | 5. Fingerprinting and String Matching |
| 6 Range query data structures | 6. Range Queries and Segment Trees |
| 7 Amortized analysis | 7. Amortized Analysis |
| 8 Union-find | 8. Union-Find |
| 9 Dynamic programming I | 9. Dynamic Programming I |
| 10 Dynamic programming II | 10. Dynamic Programming II |
| 11 Network flows I: flows, cuts and matchings | 11. Network Flow and Matchings |
| 12 Network flows II: polynomial-time algorithms | 12. Polynomial-Time Max Flow |
| 13 Network flows III: minimum-cost flows | 13. Minimum-Cost Flow |
| 14 Game theory | 14. Zero-Sum Games |
| 15 Linear programming | 15. Linear Programming |
| 16 Linear programming II: duality | 16. LP Duality |
| 17 Linear programming III: integrality and polytopes | 17. Polytopes and Integrality |
| 18 Approximation algorithms | In development |
| 19 Online algorithms | In development |
| 20 Streaming algorithms | In development |
| 21 Computational geometry I: fundamentals and the convex hull | In development |
| 22 Computational geometry II: randomized incremental algorithms | In development |
| 23 Splay trees | In development |
| 24 The algorithmic magic of polynomials | In development |
| 25 The fast Fourier transform | In development |
Source: 15-451/651 Fall 2025 schedule, read 2026-09-24. Topic names are listed only to show what each module covers.
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 schedule of CMU 15-451/651 Algorithm Design and Analysis (Fall 2025). 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 2025 schedule of CMU 15-451/651, and the map near the top of this page shows which lecture each module goes with. 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