Tracks
One course, four ways through it. Each part's page has the same buttons, so you can switch level chapter by chapter.
Degree · Graduate · Research · Industry
Degree track
The undergraduate computer-science degree: the ideas, the machine, the algorithms, the proofs.
For a student who can program and knows school mathematics. In each part watch the chapters marked Degree, run the lab, and do the first problems of the set.
61 parts · about 19 hours of film.
| Part | What you take from it | Chapters to watch | Time |
|---|---|---|---|
| 1 | What Is a Computation?Trace a Turing machine from its table, step by step, and draw its space-time diagram. | Pebbles; Algorithms before machines; The engines; Hilbert's question; Turing's machine; Programming with a table; The universal machine; More problems than programs; The halting problem and 1 more | 32 min |
| 2 | Proof and CountingProve a statement by induction, by contrapositive and by contradiction, and say which fits. | Fourteen, fifteen; The grammar of truth; Ways to prove; Induction; Induction on structures; Invariants; Sets, relations, functions; Counting; Pigeons and 4 more | 41 min |
| 3 | Logic from SwitchesTranslate between a truth table, a Boolean expression and a circuit of gates. | A thesis about switches; Boole's algebra; Circuits are expressions; The transistor; CMOS gates; One gate is enough; Normal forms and maps; Choosing with gates; Gates take time and 1 more | 30 min |
| 4 | ArithmeticConvert between decimal, binary and two's complement, and detect signed and unsigned overflow. | Numbers that run out; Bits as numbers; Integers on a clock; Adding, one bit at a time; Multiplication; Pebble's ALU; Fixed point; Floating point; Rounding error | 27 min |
| 5 | Memory and TimeTrace an SR latch, a D latch and a master-slave flip-flop through a waveform. | A circuit that remembers; Feedback; Latches, flip-flops and the clock; How fast can the clock go?; Finite-state machines; Counters and shift registers; Pebble's register file; Static memory; Dynamic memory and 1 more | 25 min |
| 6 | The Stored-Program ComputerEncode and decode a Pebble-32 instruction field by field, and trace fetch, decode and execute. | A machine that reads its own instructions; Cables, then memory; Instructions are data; Designing an instruction set; The datapath, one instruction at a time; The control unit; The assembler; First programs, gate by gate; What a program costs | 29 min |
| 7 | PipelinesCompute a program's run time from the iron law, and explain why MIPS alone can rank two programs the wrong way round. | Twelve times slower; The iron law; Pipelining, like laundry; Pebble's five stages; Structural hazards; Data hazards and forwarding; Control hazards; Predicting branches; Amdahl's law | 15 min |
| 8 | Out of OrderDraw the dataflow graph of a short instruction sequence, find its span, and schedule it with W starts a cycle. | Waiting in line; The dataflow limit; False dependences, and renaming; Speculation; Spectre; RISC and CISC | 17 min |
| 9 | The Memory HierarchySplit an address into tag, index and offset for a given cache, and trace hits and misses in a small direct-mapped or set-associative cache. | A second for every cycle; The memory wall; Locality; A direct-mapped cache; Associativity and replacement; Average memory access time; Programming for caches | 17 min |
| 10 | Parallel MachinesExplain with the dynamic power formula why two cores at 80% of the clock can replace one at full speed, and what that assumes. | The clock stops; The power wall; Four cores, one Job; Cache coherence; Work, span and Brent's theorem; Amdahl and Gustafson | 20 min |
| 11 | The Running ProgramLay out a struct with its padding, compute an array element's address, and read a word's bytes in little-endian order. | From text to a running process; A program's life; Data in memory; Control flow in machine code; The call stack; Recursion, depth and tail calls; The heap; Smashing the stack | 19 min |
| 12 | Languages and AutomataWrite a regular expression and a DFA for a simple language, and convert an NFA to a DFA by the subset construction. | Reading text, and a regex that took down websites; Languages as sets of strings; Regular expressions and automata; Thompson's construction; The subset construction and minimization; What regular languages cannot do; Lexing the Pebble language; Context-free grammars; Stacks and the Chomsky hierarchy | 25 min |
| 13 | The CompilerSplit three-address code into basic blocks, draw the control-flow graph and compute its dominator tree. | A program that writes programs; FORTRAN, and the shape of a compiler; Names, scopes and types; Three-address code and the control-flow graph; Register allocation | 14 min |
| 14 | Lambda and TypesReduce a lambda term by hand with capture-avoiding substitution, and say whether it has a normal form. | A language made of functions; Terms, variables and substitution; Reduction and normal forms; Programming with nothing; Simple types | 15 min |
| 15 | RuntimesTrace eval and apply on a small expression, and show what a closure captures under lexical scope and what dynamic scope would do instead. | A program needs a place to live; Interpreters: eval and apply; Environments and closures; A bytecode virtual machine; Why collect, and counting references; Tracing: mark–sweep and mark–compact | 15 min |
| 16 | Counting StepsState and use O, Omega and Theta, and rank functions by their order of growth. | Can thinking beat silicon?; Orders of growth; Insertion sort and its invariant; Merge sort and the recursion tree; The master theorem; The comparison lower bound; Heapsort; Quicksort, and 2n ln n | 21 min |
| 17 | Data StructuresEstimate when the first collision arrives with the birthday bound, and compute expected chain lengths at a given load. | Can counting be constant-time?; The dictionary, and the birthday bound; Chaining and universal hashing; Open addressing; Binary search trees; Balanced trees: AVL and red-black; Union-find | 19 min |
| 18 | GraphsDecide whether a multigraph has an Euler circuit and construct one with Hierholzer's algorithm. | Seven bridges; Euler's bridges, and how to store a graph; Breadth-first search; Depth-first search; Topological sort; Dijkstra's algorithm; Negative edges; Minimum spanning trees | 18 min |
| 19 | The Great ParadigmsProve a greedy rule correct by an exchange argument, and give a counterexample to a rule that only looks plausible. | A million digits; Greedy, and the exchange argument; Three products instead of four; The FFT, I: values instead of coefficients; Dynamic programming; Edit distance; Knapsack, and pseudo-polynomial time; Backtracking and Dancing Links; One problem, four paradigms | 22 min |
| 20 | Randomness as a ResourceTell a Las Vegas algorithm from a Monte Carlo one, and compute how many independent rounds bring a one-sided error below a target. | The top words in kilobytes; Las Vegas and Monte Carlo; Checking a product with a coin; A minimum cut by contraction; Probable primes and primality tests; Balls into bins, and the power of two choices; Bloom filters | 20 min |
| 21 | StringsCompute the border table of a pattern and trace Knuth-Morris-Pratt on a text without moving backwards in it. | Queequeg, four ways; Matching, the obvious way; Rolling hashes; Knuth, Morris and Pratt: never look back; Compression, I: Lempel and Ziv; Myers' diff | 15 min |
| 22 | GeometryCompute an orientation test as a signed area and use it to run Graham's scan by hand. | Left, right, or on the line?; The one primitive; Convex hulls; The sweep line; Guarding an art gallery; Range searching | 17 min |
| 23 | OptimizationModel a small planning problem as a linear program and solve it by pivoting a simplex tableau. | The best point of a polytope; Linear programs; The simplex method; Duality; Approximation: covers; Online: deciding without the future | 17 min |
| 24 | Algorithms in PracticeAnswer range-sum queries with prefix sums and apply range updates with a difference array. | Same big-O, different worlds; Prefix sums; Fenwick trees; Two pointers and monotonic stacks; Searching for the answer; Problem solving as a craft | 14 min |
| 25 | UndecidableTell a decider from a recognizer, and place K, its complement and TOT in the picture of recognizable and co-recognizable sets. | Three questions, three connections; Decidable and recognizable; Mapping reductions; Rice's theorem; Tiling the plane | 7 min |
| 26 | P versus NPDefine P and NP with a verifier and a certificate, and show that a given problem is in NP. | Finding against checking; What counts as efficient; NP: problems with checkable answers; Reductions and completeness; The web of reductions; Five possible worlds | 14 min |
| 27 | Proofs and RandomnessDefine RP, ZPP and BPP, and compute how many independent runs push a one-third error below a target. | Checking without reading; Randomized classes; Interactive proofs; Zero knowledge | 8 min |
| 28 | Error-Correcting CodesCompute the Hamming distance of a code and say how many errors it detects and corrects. | A scratched message; Noise and repetition; Hamming distance; Hamming(7,4) | 9 min |
| 29 | SecretsBreak a Caesar or Vigenere cipher by frequency counts and the index of coincidence. | Two thousand years of secrets; Substitution and frequency analysis; Vigenère and the index of coincidence; Enigma; Perfect secrecy | 14 min |
| 30 | Public KeysCarry out a Diffie-Hellman exchange by hand with a small prime, and explain what the eavesdropper would have to compute. | Two strangers, one secret; Key distribution and Merkle's puzzles; The toolkit: modular arithmetic; Groups and the discrete logarithm; Diffie-Hellman; RSA | 17 min |
| 31 | The KernelTrace a system call through the trap, the kernel's dispatch and the return, and say what the mode bit, the bounds check and the timer each protect. | One machine, many programs; From batch to time-sharing; Protection: the mode bit; Traps and the system call; The process; The context switch; fork, exec and wait; Scheduling: FCFS, SJF, SRTF; Round robin and the multi-level feedback queue and 1 more | 28 min |
| 32 | Virtual MemorySplit a virtual address into table indices and offset, walk a two-level page table by hand, and say which PTE bit stops which access. | Two programs, one address; Protection and relocation; Base and bounds, and segments; Paging; Multi-level page tables; The TLB; Page faults; Which page to evict; Copy-on-write, zero pages and mmap and 1 more | 24 min |
| 33 | ConcurrencyList the interleavings of two short threads, find the ones that lose an update, and repair the race with a lock or an atomic instruction. | Two threads, one counter; Why concurrency; The race; Mutual exclusion from reads and writes; Semaphores; Monitors and condition variables; Deadlock; PebbleOS gains threads and CAS | 20 min |
| 34 | StorageCompute the time of a random and of a sequential disk read from seek, rotation and transfer, and explain why flash cannot overwrite in place. | One append, three writes; Persistence; Disks; Flash; Files and directories; A simple file system; Crash consistency; Journaling; RAID and 1 more | 28 min |
| 35 | DatabasesWrite a query in relational algebra and in SQL, and evaluate it by hand on small tables. | One line of SQL; Ask for what, not how; Relational algebra; Dependencies and normal forms; How a query runs; Indexes; Transactions; Two-phase locking; Our database runs the Job | 22 min |
| 36 | Networks I: Moving BitsTrace a datagram through the five layers, naming each header and which addresses change at every hop. | One datagram; Circuits and packets; Layers and the end-to-end argument; Frames; Sharing a channel; Bridges and switches; IP; Distance vector; Link state | 25 min |
| 37 | Networks II: Reliable ConversationTrace stop-and-wait, Go-Back-N and Selective Repeat through a loss, and compute their utilization. | Thirty novels from Frankfurt; The transport problem; Reliability from scratch; Sliding windows; TCP; Congestion collapse; AIMD; Names | 23 min |
| 38 | Distributed Systems I: AgreementExplain why the two generals cannot agree, and why a timeout cannot tell a crash from a delay. | Five Pebbles, one log; Partial failure; Time without a clock; Snapshots; Raft | 15 min |
| 39 | Distributed Systems II: ScaleDecide from N, R and W whether a read can miss an acknowledged write, and explain why. | Sixteen Pebbles, one crash; The datacenter, and replication; Quorums and consistency; Partitioning; MapReduce | 18 min |
| 40 | Software EngineeringName the decision each module of a design hides, and predict which modules a given change touches. | The software crisis, and this repository; Complexity, and Parnas' rule; Abstraction and contracts; Design, in the large and the small; Testing, and tests that lie; The profession | 20 min |
| 41 | Version Control, Builds and DependenciesCompute a git object id by hand from its header and content, and say which objects one edit renames. | Ten days in 2005, and our own git; Git's objects; Merging and bisecting; Build systems | 19 min |
| 42 | The Browser and the WebTrace a page load from the URL to pixels, naming the parser, the cascade, layout, paint and the event loop. | What happens when you type a URL; Thirty years of the web; Parsing HTML; The cascade; Layout; The event loop | 21 min |
| 43 | APIs and ServicesEncode an integer as a varint and a signed integer with zigzag, and decode a short protobuf message by hand. | Eight fallacies, and the Job in three pieces; Calls across a network; Bytes on the wire; API styles; At most, at least, exactly once | 17 min |
| 44 | People and ProductsCompute a target's index of difficulty and its predicted movement time from Fitts's law. | The mother of all demos; Pointing is a channel; Choosing, and predicting a task's time; Perception and its thresholds; Colour; The A/B test | 20 min |
| 45 | The CloudName the layers from region to container and say what fails together at each. | Computing as a utility; The warehouse-scale computer; Containers; Orchestration and reconciliation; Scheduling as bin packing | 17 min |
| 46 | Logs, Streams and WarehousesExplain how keys, partitions and offsets give order per key and let each consumer read at its own pace. | The log; The partitioned log; Changes as events; Event time and processing time; The warehouse; Columnar files | 20 min |
| 47 | Search EnginesBuild an inverted index for a few documents by hand and answer an AND query by merging postings. | Ten pages among billions; Words, stems and Zipf; The inverted index; Merging postings; Is the ranking good?; Links and the random surfer | 19 min |
| 48 | System Design I: Building BlocksEstimate a service's requests a second, storage and bandwidth from its daily users, a peak factor and an object size. | The napkin; How a design is made; Load balancing; Queues and asynchrony; Unique IDs | 16 min |
| 49 | System Design II: Case StudiesCompute how many base-62 characters N links need, and convert a number to its code by repeated division. | Eight systems everyone uses; A URL shortener; A news feed: fan-out; A chat service; A payment ledger | 17 min |
| 50 | Keeping It RunningConvert an availability into nines and into minutes of downtime a year, a month and a week. | Three post-mortems; Availability arithmetic; SLOs and error budgets; Redundancy; Metrics, and why averages lie | 15 min |
| 51 | Light and PixelsCompose translations and rotations as 4 x 4 matrices and predict the effect of their order. | A picture is samples of light; Transforms and rotations; Perspective projection; Rasterization and the z-buffer; Shading; Curves, surfaces and fonts | 19 min |
| 52 | Computing with Real NumbersCompute the relative condition number of a function and say how many digits it costs. | Ten algorithms of the century; Conditioning and stability; Gaussian elimination; Roots and Newton's fractal; Quadrature | 15 min |
| 53 | Quantum ComputationWrite a qubit as two amplitudes, apply the Born rule, and place the state on the Bloch sphere. | Feynman's question; The cost of forgetting; The qubit; Gates, tensor products and entanglement; Interference as a resource; Grover's search | 21 min |
| 54 | Proving Programs CorrectWrite a precondition, a postcondition and a loop invariant for a short program, and check the invariant on a run. | The cost of bugs; Specifications, and the first program proof; Floyd-Hoare logic; Binary search, proved; Model checking; Testing as science | 18 min |
| 55 | Trusting TrustWrite a threat model for a small system: the assets, the trust boundary, the adversary and the attack surface. | Every layer leaks; Threat models and principles; Memory corruption, and return-oriented programming; Who are you? Authentication; Reflections on trusting trust; The tower, end to end | 19 min |
| 56 | Spectral Graphs and ExpandersWrite the Laplacian of a small graph and evaluate its quadratic form as a sum over edges. | What eigenvalues know about a graph; The Laplacian | 6 min |
| 57 | Learning TheoryState what probably approximately correct means, with its epsilon and its delta. | When is learning possible?; Probably approximately correct | 6 min |
| 58 | SemanticsEvaluate a small program by the small-step rules, naming the search or reduction rule used at each step. | What does a program mean?; Meaning as steps; Meaning as mathematics | 11 min |
| 59 | Distributed Computing TheoryRun one round of Cole and Vishkin's rule on a short ring by hand, and explain why neighbours still differ afterwards. | What n processes can compute; Models and faults; Locality: colouring a ring | 11 min |
| 60 | Domain-Specific HardwareCompute a kernel's arithmetic intensity from its flops and its compulsory bytes, and place it under a roofline. | Hardware that does one thing; The end of general-purpose scaling; The roofline model; A systolic array | 16 min |
| 61 | Doing ResearchExplain why one timing of a program is not a result, and report repeated runs with a median and an interval. | Where results come from; What research is; Measuring rigorously; Reading and reviewing; The pebble, the last time | 20 min |
Graduate track
The full lecture: every derivation, model and measurement, at first-year graduate depth.
The whole course: every numbered chapter, every lab with its three extensions, and the problem set.
61 parts · about 41 hours of film.
| Part | What you take from it | Chapters to watch | Time |
|---|---|---|---|
| 1 | What Is a Computation?Prove that Euclid's algorithm is correct by an invariant and terminates by a decreasing quantity. | Pebbles; Algorithms before machines; The engines; Hilbert's question; Turing's machine; Programming with a table; More tapes, same power; The universal machine; Other machines, same power and 6 more | 45 min |
| 2 | Proof and CountingProve Erdős-Szekeres by labelling each term with its longest increasing and decreasing runs. | Fourteen, fifteen; The grammar of truth; Ways to prove; Induction; Induction on structures; Invariants; Sets, relations, functions; Sizes of infinity; Counting and 6 more | 46 min |
| 3 | Logic from SwitchesApply Post's five closed classes to decide whether a set of gates is complete. | A thesis about switches; Boole's algebra; Circuits are expressions; The transistor; CMOS gates; One gate is enough; Normal forms and maps; Choosing with gates; Decision diagrams and 6 more | 46 min |
| 4 | ArithmeticDerive the carry operator, prove it associative and compare the prefix networks' depth, size and fan-out. | Numbers that run out; Bits as numbers; Integers on a clock; Adding, one bit at a time; Carries in parallel; The adders, raced; Multiplication; Division, and a famous bug; Pebble's ALU and 6 more | 46 min |
| 5 | Memory and TimeLinearize the cross-coupled inverters at the saddle and derive the resolution time. | A circuit that remembers; Feedback; Two wells and a saddle; Latches, flip-flops and the clock; How fast can the clock go?; Metastability; Finite-state machines; Machines and languages; Counters and shift registers and 6 more | 43 min |
| 6 | The Stored-Program ComputerDerive a control word from an instruction's needs and compare the table and minimized control units. | A machine that reads its own instructions; Cables, then memory; Instructions are data; Designing an instruction set; The datapath, one instruction at a time; The control unit; The assembler; First programs, gate by gate; What a program costs and 6 more | 45 min |
| 7 | PipelinesDerive the pipelined speedup (t + o)/(t/k + o), its limit 1 + t/o, and the depth that minimizes time per instruction when a fraction b of instructions loses k - 1 cycles. | Twelve times slower; The iron law; Pipelining, like laundry; Pebble's five stages; Structural hazards; Data hazards and forwarding; Control hazards; Predicting branches; Correlation, and a perceptron and 6 more | 27 min |
| 8 | Out of OrderRun the textbook example through a scoreboard and through Tomasulo's algorithm, cycle by cycle, and say where each one waits. | Waiting in line; The dataflow limit; False dependences, and renaming; The scoreboard; Tomasulo's algorithm; The reorder buffer; Wider, and the ILP wall; Speculation; Loads, stores, and their order and 6 more | 43 min |
| 9 | The Memory HierarchyCompute reuse (stack) distances for a trace, and read the miss ratio of every LRU capacity from them. | A second for every cycle; The memory wall; Locality; A direct-mapped cache; Associativity and replacement; Three kinds of miss; Average memory access time; This machine's staircase; Programming for caches and 6 more | 38 min |
| 10 | Parallel MachinesProve Brent's theorem by counting complete and incomplete steps, and prove the 0-1 principle. | The clock stops; The power wall; Four cores, one Job; Cache coherence; False sharing; Memory consistency; Atomic instructions; SIMD and vectors; GPUs in one chapter and 6 more | 47 min |
| 11 | The Running ProgramImplement first fit with splitting and coalescing, and compare allocation policies on a trace by peak heap over peak live bytes. | From text to a running process; A program's life; Data in memory; Control flow in machine code; The call stack; Recursion, depth and tail calls; The heap; Five allocators, one real trace; Knuth's rule and Robson's bound and 7 more | 42 min |
| 12 | Languages and AutomataBuild Thompson's NFA for an expression, simulate it on sets of states, and minimize the resulting DFA. | Reading text, and a regex that took down websites; Languages as sets of strings; Regular expressions and automata; Thompson's construction; The subset construction and minimization; Kleene's theorem; What regular languages cannot do; Backtracking engines; Lexing the Pebble language and 6 more | 43 min |
| 13 | The CompilerCompute dominance frontiers, place pruned phi-functions and rename along the dominator tree. | A program that writes programs; FORTRAN, and the shape of a compiler; Names, scopes and types; Three-address code and the control-flow graph; Dominators; Static single assignment; Dataflow analysis and fixed points; Optimizations on SSA; Loops and 6 more | 44 min |
| 14 | Lambda and TypesProve progress and preservation for the simply typed calculus, naming the canonical-forms and substitution lemmas. | A language made of functions; Terms, variables and substitution; Reduction and normal forms; Programming with nothing; Recursion without names; Evaluation strategies; Church–Rosser, and de Bruijn; Simple types; Well-typed programs cannot go wrong and 6 more | 45 min |
| 15 | RuntimesRun Cheney's algorithm on a small heap, with forwarding addresses and the scan and free pointers, and derive the cost L / (S - L). | A program needs a place to live; Interpreters: eval and apply; Environments and closures; Continuations and tail calls; A bytecode virtual machine; The VM, on Pebble; Why collect, and counting references; Tracing: mark–sweep and mark–compact; Cheney's copying collector, and what it costs and 6 more | 37 min |
| 16 | Counting StepsDerive quicksort's expected 2(n + 1)H_n - 4n comparisons from the probability 2/(j - i + 1) that two keys are compared. | Can thinking beat silicon?; What counts as a step; Orders of growth; Insertion sort and its invariant; Merge sort and the recursion tree; The master theorem; The comparison lower bound; Heapsort; Quicksort, and 2n ln n and 7 more | 40 min |
| 17 | Data StructuresProve that ((ax + b) mod p) mod m is a universal family and say what the proof assumes about the keys. | Can counting be constant-time?; The dictionary, and the birthday bound; Chaining and universal hashing; Open addressing; Cuckoo hashing and perfect hashing; Binary search trees; Balanced trees: AVL and red-black; Treaps and skip lists; Splay trees and 7 more | 41 min |
| 18 | GraphsProve the max-flow min-cut theorem from the residual graph, and read a minimum cut off a maximum flow. | Seven bridges; Euler's bridges, and how to store a graph; Breadth-first search; Depth-first search; Topological sort; Strongly connected components; Dijkstra's algorithm; Negative edges; All pairs and 7 more | 39 min |
| 19 | The Great ParadigmsDerive Karatsuba's and Strassen's recurrences and solve them, counting the additions as well as the products. | A million digits; Greedy, and the exchange argument; When greedy is right: matroids; Three products instead of four; Seven products instead of eight; The FFT, I: values instead of coefficients; The FFT, II: butterflies; What the FFT multiplies; The closest pair and 7 more | 39 min |
| 20 | Randomness as a ResourceProve Freivalds' bound by deferred decisions and the Schwartz-Zippel lemma by induction on the number of variables. | The top words in kilobytes; Las Vegas and Monte Carlo; Checking a product with a coin; Is this polynomial zero?; A minimum cut by contraction; Probable primes and primality tests; Random walks that solve SAT; Balls into bins, and the power of two choices; Bloom filters and 7 more | 46 min |
| 21 | StringsProve the 2n comparison bound of KMP by the amortized argument, and the (m - 1)/p collision bound of a rolling hash with a random base. | Queequeg, four ways; Matching, the obvious way; Rolling hashes; Knuth, Morris and Pratt: never look back; Boyer and Moore: skip ahead; Many patterns at once; Suffix trees; Suffix arrays; The Burrows-Wheeler transform and 7 more | 45 min |
| 22 | GeometryProve the n log n lower bound for convex hulls by lifting numbers to a parabola, and state what Chan's algorithm gains when the hull is small. | Left, right, or on the line?; The one primitive; Convex hulls; The sweep line; Guarding an art gallery; Voronoi diagrams; Delaunay triangulations; The lifting map; Random order and backwards analysis and 6 more | 41 min |
| 23 | OptimizationProve weak duality, state strong duality and Farkas' lemma, and read shadow prices and complementary slackness off an optimal tableau. | The best point of a polytope; Linear programs; The simplex method; Duality; Exponential in theory, fast in practice; Polynomial time: ellipsoids and the central path; When the vertices are integers; Integer programming; Approximation: covers and 5 more | 39 min |
| 24 | Algorithms in PracticeBuild a segment tree for an associative operation with a small record per node, such as the four numbers of the maximum subarray, and add lazy range updates. | Same big-O, different worlds; Prefix sums; Fenwick trees; Segment trees; Range minimum and lowest common ancestors; Two pointers and monotonic stacks; Searching for the answer; Bits and the Four Russians; Meet in the middle and square roots and 6 more | 34 min |
| 25 | UndecidableProve Rice's theorem, and write a quine by the head, data and tail construction. | Three questions, three connections; Decidable and recognizable; Mapping reductions; Rice's theorem; Programs that know their own code; Post's correspondence problem; Tiling the plane; Hilbert's tenth problem; Gödel, through halting and 4 more | 29 min |
| 26 | P versus NPProve the time hierarchy theorem by diagonalization and Savitch's theorem by midpoint recursion. | Finding against checking; What counts as efficient; More time, more problems; NP: problems with checkable answers; Reductions and completeness; Cook–Levin: SAT is NP-complete; The web of reductions; NP-completeness everywhere; Strong and weak hardness and 5 more | 33 min |
| 27 | Proofs and RandomnessRun sum-check by hand on a small formula over a prime field and bound a cheating prover's success by nd / p. | Checking without reading; Randomized classes; Circuit lower bounds; Communication complexity; Interactive proofs; Sum-check and IP = PSPACE; Zero knowledge; The PCP theorem; Hardness of approximation and 4 more | 31 min |
| 28 | Error-Correcting CodesProve the Hamming and Singleton bounds, and show that Reed-Solomon codes meet the Singleton bound by counting roots. | A scratched message; Noise and repetition; Hamming distance; Hamming(7,4); How good can a code be?; Finite fields; Reed–Solomon; Our QR code; Cyclic codes and CRCs and 5 more | 37 min |
| 29 | SecretsDefine IND-CPA security as a game, and explain why a secure cipher must be randomized. | Two thousand years of secrets; Substitution and frequency analysis; Vigenère and the index of coincidence; Enigma; Perfect secrecy; What secure means; Pseudorandom generators; Pseudorandom functions and permutations; AES and 7 more | 47 min |
| 30 | Public KeysProve RSA correct by Euler's theorem and the CRT, and explain why textbook RSA needs OAEP. | Two strangers, one secret; Key distribution and Merkle's puzzles; The toolkit: modular arithmetic; Groups and the discrete logarithm; Diffie-Hellman; RSA; Bleichenbacher's oracle; Factoring; Discrete logarithms and 7 more | 45 min |
| 31 | The KernelProve by an exchange argument that shortest-job-first minimizes mean turnaround, and state the rules of the multi-level feedback queue and the rule that stops gaming. | One machine, many programs; From batch to time-sharing; Protection: the mode bit; Traps and the system call; The process; The context switch; fork, exec and wait; Scheduling: FCFS, SJF, SRTF; Round robin and the multi-level feedback queue and 6 more | 44 min |
| 32 | Virtual MemoryProve that OPT is optimal by an exchange argument and that LRU has the stack property, and compute a whole LRU miss curve from stack distances. | Two programs, one address; Protection and relocation; Base and bounds, and segments; Paging; Multi-level page tables; The TLB; Page faults; Which page to evict; Working sets and thrashing and 6 more | 41 min |
| 33 | ConcurrencyProve Peterson's lock safe by an invariant, and show the schedule that breaks it under TSO and the fence that repairs it. | Two threads, one counter; Why concurrency; The race; Mutual exclusion from reads and writes; Peterson meets the store buffer; Hardware locks; Semaphores; Monitors and condition variables; Deadlock and 7 more | 44 min |
| 34 | StorageCompare writeback, ordered and data journaling by what each crash state can contain, and explain why the commit needs a flush or a checksum. | One append, three writes; Persistence; Disks; Flash; Files and directories; A simple file system; Locality; Crash consistency; Journaling and 7 more | 45 min |
| 35 | DatabasesDerive the page I/O of block nested loops, sort-merge and Grace hash joins, and choose among them for a given amount of memory. | One line of SQL; Ask for what, not how; Relational algebra; Dependencies and normal forms; How a query runs; Joins, page by page; The optimizer; Guessing sizes; Indexes and 7 more | 44 min |
| 36 | Networks I: Moving BitsCompute a channel's Shannon capacity and the gap between a QAM constellation and the limit. | One datagram; Circuits and packets; Layers and the end-to-end argument; Bits on a wire; Frames; Sharing a channel; Bridges and switches; IP; Forwarding and 6 more | 41 min |
| 37 | Networks II: Reliable ConversationProve that Go-Back-N needs a window below the sequence space and Selective Repeat at most half of it. | Thirty novels from Frankfurt; The transport problem; Reliability from scratch; Sliding windows; TCP; Timers that learn; Congestion collapse; AIMD; The Mathis formula and 7 more | 48 min |
| 38 | Distributed Systems I: AgreementProve that vector clocks characterize happened-before, and that a Chandy-Lamport snapshot is a consistent cut. | Five Pebbles, one log; Partial failure; Time without a clock; Snapshots; Models and consensus; FLP; Paxos; Raft; Our Raft, attacked and 2 more | 41 min |
| 39 | Distributed Systems II: ScaleProve that replicas whose merge is commutative, associative and idempotent converge, and build a G-counter and an OR-set. | Sixteen Pebbles, one crash; The datacenter, and replication; Quorums and consistency; CRDTs; Partitioning; Transactions across machines; MapReduce; The tail at scale; Failure at scale | 39 min |
| 40 | Software EngineeringCompute afferent and efferent coupling and instability on an import graph, and find its cycles. | The software crisis, and this repository; Complexity, and Parnas' rule; Abstraction and contracts; Coupling, measured; Design, in the large and the small; Testing, and tests that lie; Testing the tests; Changing code that works; Review and process and 3 more | 40 min |
| 41 | Version Control, Builds and DependenciesClassify a build system by its scheduler and its rebuilder, and bound a parallel build by its work and span. | Ten days in 2005, and our own git; Git's objects; Merging and bisecting; Storing history; Build systems; Dependencies; Continuous integration; Continuous delivery | 39 min |
| 42 | The Browser and the WebImplement Knuth-Plass line breaking by dynamic programming and prove it optimal for an additive cost. | What happens when you type a URL; Thirty years of the web; Parsing HTML; The cascade; Layout; Paint, layers and the frame; The event loop; JavaScript engines; UI frameworks and 5 more | 47 min |
| 43 | APIs and ServicesProve in a model that retrying until acknowledged plus deduplication by id applies every operation exactly once. | Eight fallacies, and the Job in three pieces; Calls across a network; Bytes on the wire; Schemas that evolve; API styles; At most, at least, exactly once; Designing and versioning APIs; Queues and pub/sub; Backpressure and 5 more | 47 min |
| 44 | People and ProductsDerive the sample size per arm for a given lift, significance level and power. | The mother of all demos; Pointing is a channel; Choosing, and predicting a task's time; Perception and its thresholds; Colour; Text on screens; Accessibility; Evaluating usability; The A/B test and 4 more | 46 min |
| 45 | The CloudProve that next fit uses at most 2 OPT - 1 bins, and show by reduction from partition that bin packing is NP-hard. | Computing as a utility; The warehouse-scale computer; Virtual machines, shrunk; Containers; Orchestration and reconciliation; Scheduling as bin packing; Autoscaling as control; Serverless; Object storage and eleven nines and 4 more | 47 min |
| 46 | Logs, Streams and WarehousesTrade completeness against latency with a watermark's lag, and use allowed lateness and refinements to escape the trade. | The log; The partitioned log; Moving a gigabyte a second; Changes as events; Event time and processing time; Exactly-once state; Streaming algorithms in production; The warehouse; Columnar files and 5 more | 47 min |
| 47 | Search EnginesDerive the lengths of Elias gamma codes and the Golomb parameter for geometric gaps, and compare a list's size with the bound log2 C(N, f). | Ten pages among billions; Words, stems and Zipf; The inverted index; Merging postings; Compressing postings; From tf-idf to BM25; Is the ranking good?; Top k, fast; Links and the random surfer and 6 more | 48 min |
| 48 | System Design I: Building BlocksDerive Che's approximation and find the characteristic time by bisection. | The napkin; How a design is made; Load balancing; Caching: where, and what to keep; Caching: staleness and stampedes; Rate limiting; Queues and asynchrony; Choosing storage; Sharding and 6 more | 48 min |
| 49 | System Design II: Case StudiesDerive the daily cost of fan-out on write, on read and of the hybrid over a power-law follower graph, and show that their ratio is reads over posts. | Eight systems everyone uses; A URL shortener; A news feed: fan-out; A news feed: ranking and reading; A chat service; A web crawler; Ride-hailing dispatch; A video platform; A payment ledger and 4 more | 46 min |
| 50 | Keeping It RunningDerive the burn-rate threshold b = f x 720 h / w and choose the windows of a multiwindow alert. | Three post-mortems; Availability arithmetic; SLOs and error budgets; How systems fail: gray, cascading, metastable; Timeouts, retries, backoff and jitter; Breakers, bulkheads and load shedding; Redundancy; Metrics, and why averages lie; Logs and traces and 6 more | 48 min |
| 51 | Light and PixelsDerive perspective-correct interpolation and show that u/w and 1/w are affine on the screen. | A picture is samples of light; Transforms and rotations; Perspective projection; Rasterization and the z-buffer; Shading; Textures and sampling; The GPU pipeline; Ray tracing; Acceleration structures and 5 more | 48 min |
| 52 | Computing with Real NumbersDerive forward error <= kappa x backward error and compute a solve's backward error from its residual. | Ten algorithms of the century; Conditioning and stability; Backward error analysis; Gaussian elimination; Least squares and QR; The SVD; Eigenvalues: the QR algorithm; Conjugate gradients; Sparse matrices and 6 more | 47 min |
| 53 | Quantum ComputationDerive the quantum Fourier transform's circuit from its product formula and count its gates. | Feynman's question; The cost of forgetting; The qubit; Gates, tensor products and entanglement; Circuits and universality; Interference as a resource; Bernstein-Vazirani and Simon; The quantum Fourier transform; Phase estimation and 3 more | 43 min |
| 54 | Proving Programs CorrectCompute weakest preconditions and the five verification conditions of a loop with an invariant and a variant. | The cost of bugs; Specifications, and the first program proof; Floyd-Hoare logic; Binary search, proved; Weakest preconditions, checked by SAT; Separation logic; Model checking; Symbolic and bounded model checking; Abstract interpretation and 6 more | 47 min |
| 55 | Trusting TrustCompute the success probability and the expected number of tries against k bits of ASLR, with and without re-randomization. | Every layer leaks; Threat models and principles; Memory corruption, and return-oriented programming; Memory safety; When the hardware leaks; Who are you? Authentication; Access control; Isolation; The web and 5 more | 49 min |
| 56 | Spectral Graphs and ExpandersCompute the conductance of a cut, and find a sweep cut from the Fiedler vector. | What eigenvalues know about a graph; The Laplacian; Expanders at work | 10 min |
| 57 | Learning TheoryFind the VC dimension of a simple class by exhibiting a shattered set and proving that no larger set is shattered. | When is learning possible?; Probably approximately correct; Boosting; Bandits | 16 min |
| 58 | SemanticsProve that small-step evaluation is deterministic, by induction on derivations. | What does a program mean?; Meaning as steps; Meaning as mathematics; Effects and monads | 16 min |
| 59 | Distributed Computing TheoryProve that b-bit colours shrink to 1 + ceil(log2 b) bits in a round, and bound the rounds by log* n plus a constant. | What n processes can compute; Models and faults; Locality: colouring a ring; Failure detectors; The cost of agreement | 21 min |
| 60 | Domain-Specific HardwareDerive the roofline bound from T >= F/P and T >= Q/beta, and find the ridge point. | Hardware that does one thing; The end of general-purpose scaling; The roofline model; A systolic array; The TPU, and fewer bits; GPUs revisited; Spatial machines: dataflow, CGRAs and FPGAs; How hardware is designed; The Job in hardware | 36 min |
| 61 | Doing ResearchCompute a percentile bootstrap interval for a mean time, and predict how its width changes with four times the runs. | Where results come from; What research is; Measurement bias; Measuring rigorously; Benchmarks and reproducibility; Reading and reviewing; Writing; The pebble, the last time | 34 min |
Research track
Each part's Frontier chapter and research tier: limits computed, open problems stated.
On top of the graduate track: each part's Frontier chapter, the research-tier parts of Act XI, and the research problems.
61 parts · about 47 hours of film.
| Part | What you take from it | Chapters of this track | Time |
|---|---|---|---|
| 1 | What Is a Computation?Prove that S(n) eventually exceeds every computable function. | Frontier: the edge of the knowable | 50 min |
| 2 | Proof and CountingProve R(3,3) = 6 and the bounds between the square root of 2 to the k and 4 to the k for R(k). | Frontier: order in chaos | 50 min |
| 3 | Logic from SwitchesExplain gate elimination and why it has only produced linear lower bounds for explicit functions. | Frontier: the smallest circuit | 50 min |
| 4 | ArithmeticState the known upper and lower bounds on integer multiplication and what the n log n algorithm leaves open. | Frontier: arithmetic's open questions | 50 min |
| 5 | Memory and TimeBound the failure probability of a probabilistic Rowhammer defence with a union bound over windows. | Frontier: defending memory | 49 min |
| 6 | The Stored-Program ComputerEstimate how many random programs are needed to catch a bug of a given rate, and name the bugs they miss. | Frontier: is the processor right? | 49 min |
| 7 | PipelinesExplain why hindsight majority, an unlimited PPM predictor and a perceptron's failure on XOR are not prediction limits, and say what each does establish. | Frontier: the limits of prediction | 31 min |
| 8 | Out of OrderSay what an oracle limit study assumes (future paths, memory addresses, unlimited resources) and why its instructions per cycle is not a hardware target. | Frontier: past the dataflow limit, safely | 46 min |
| 9 | The Memory HierarchyState the ideal-cache and external-memory models, and say which assumptions (tall cache, optimal replacement, no recomputation) each bound depends on. | Frontier: learning to replace | 40 min |
| 10 | Parallel MachinesExplain why out-of-thin-air values are hard to forbid in a language memory model without forbidding compiler reorderings. | Frontier: thin air, stealing, dark silicon | 49 min |
| 11 | The Running ProgramState Robson's model (online, nonmoving, bounded live storage) and explain why one adversarial replay is not a proof against every allocator. | Frontier: bounds, semantics, capabilities | 45 min |
| 12 | Languages and AutomataState the conditional lower bounds for regular-expression matching and context-free recognition with their exact input models and hypotheses. | Frontier: how fast can we parse? | 47 min |
| 13 | The CompilerState what the halting argument does and does not rule out for an optimizer, and what a superoptimizer's validated candidate proves under its word model. | Frontier: searching for the best program | 49 min |
| 14 | Lambda and TypesSketch Tait's proof of strong normalization by logical relations and say why adding fix ends it. | Frontier: the edges of type theory | 49 min |
| 15 | RuntimesState the first and second Futamura projections and what meta-tracing and partial evaluation of interpreters do and do not guarantee. | Frontier: the limits of runtimes | 41 min |
| 16 | Counting StepsState what smoothed analysis measures and what a word-RAM integer-sorting bound assumes about word width and randomness. | Frontier: beyond the worst case | 43 min |
| 17 | Data StructuresState the dynamic optimality conjecture and what the known competitive bounds do and do not settle. | Frontier: how good can a data structure be? | 44 min |
| 18 | GraphsState the 2024 universal-optimality result for Dijkstra and the 2025 bound beyond the sorting barrier, each with its model: comparison-addition, real weights, distance-only output. | Research results: models and dates | 42 min |
| 19 | The Great ParadigmsState what a barrier for the laser method restricts and what it leaves open about the matrix multiplication exponent. | Frontier: how fast can we multiply? | 42 min |
| 20 | Randomness as a ResourceState the hardness premise under which P equals BPP, and explain why a deterministic identity test would imply circuit lower bounds. | Frontier: does randomness help? | 49 min |
| 21 | StringsState what an index of size proportional to the number of runs r of the transform supports, and how r relates to the Lempel-Ziv phrase count z. | Frontier: indexes as small as the information | 49 min |
| 22 | GeometryState the 3SUM conjecture with its computational model, and reduce 3SUM to finding three collinear points. | Frontier: exactness, 3SUM and nearest neighbours | 45 min |
| 23 | OptimizationState what smoothed analysis proves about a simplex method and what it does not say about Dantzig's rule on a perturbed cube. | Frontier: faster LPs, the Hirsch question, the UGC | 43 min |
| 24 | Algorithms in PracticeState what a learned index certifies about a lookup and what its model can cost in the worst case. | Frontier: learned indexes and predictions | 38 min |
| 25 | UndecidableClassify FIN and TOT in the arithmetic hierarchy and state what the Friedberg-Muchnik theorem settles. | Oracles and the arithmetic hierarchy; Chaitin's Omega; Frontier: Hilbert's tenth over other rings | 37 min |
| 26 | P versus NPState the relativization, natural-proofs and algebrization barriers and what each rules out. | Time in square-root space; Why it is hard; Frontier: complexity about complexity | 42 min |
| 27 | Proofs and RandomnessState the Nisan-Wigderson and Impagliazzo-Wigderson implications from circuit lower bounds to derandomization. | Hardness against randomness; The Unique Games Conjecture; Frontier: MIP* = RE and proofs in practice | 39 min |
| 28 | Error-Correcting CodesState what it means for Reed-Muller codes to achieve capacity and what list decoding buys beyond half the distance. | Frontier: capacity and locality | 41 min |
| 29 | SecretsState what is known about basing one-way functions on the hardness of Kolmogorov complexity (Liu-Pass). | Frontier: proofs, quanta and lightweight ciphers | 49 min |
| 30 | Public KeysState the LWE problem and what its worst-case to average-case reduction claims, and what is not known about the quantum hardness of lattice problems. | Frontier: post-quantum and beyond | 47 min |
| 31 | The KernelExplain what the proofs of seL4, CertiKOS and Hyperkernel establish and what they assume. | Frontier: verified kernels and microsecond scheduling | 48 min |
| 32 | Virtual MemoryExplain why translation reach has fallen behind memory size, and compare direct segments, range TLBs, transparent huge pages and Midgard as answers. | Frontier: translation reach and memory tiers | 45 min |
| 33 | ConcurrencyState Herlihy's hierarchy and the universality of consensus, and what the Burns-Lynch bound says about mutual exclusion from registers. | Frontier: checking concurrent programs | 46 min |
| 34 | StorageExplain what FSCQ and Yggdrasil prove about a file system and how CrashMonkey tests one, given that k unflushed writes leave 2^k crash states. | Frontier: storage that can be trusted | 48 min |
| 35 | DatabasesState the AGM bound for the triangle query and explain why a generic join meets it where every plan of binary joins does not. | Frontier: joins, guesses, guarantees | 48 min |
| 36 | Networks I: Moving BitsState the stable paths problem, show that BAD GADGET has no stable solution, and say what Gao-Rexford policies guarantee. | Frontier: programmable, verified, convergent | 44 min |
| 37 | Networks II: Reliable ConversationState the starvation theorem for delay-convergent congestion control and explain the role of non-congestive delay. | Frontier: can congestion control be fair? | 49 min |
| 38 | Distributed Systems I: AgreementState the lower bounds on agreement (f + 1 rounds, FLP, 3f + 1, Dolev-Reischuk's quadratic messages) and which protocols meet them. | Frontier: proving and breaking | 44 min |
| 39 | Distributed Systems II: ScaleState the CALM theorem and use invariant confluence to decide which invariants of an application need coordination. | Frontier: how little coordination? | 43 min |
| 40 | Software EngineeringExplain the oracle problem for machine-written patches, and why passing tests is an incomplete criterion. | Frontier: evidence, and machines that code | 43 min |
| 41 | Version Control, Builds and DependenciesState what structured merge, build minimality and complete version solving each leave unsolved. | Frontier: merging and building, correctly | 42 min |
| 42 | The Browser and the WebExplain why nested intrinsic sizing costs 2^(d+1) - 1 layouts without a cache, and state the open problem of relayout bounded by the size of a change. | Frontier: layout, engines and proofs | 49 min |
| 43 | APIs and ServicesExplain how a multiparty session type projects a global protocol onto each service and what it guarantees. | Frontier: services you can prove | 49 min |
| 44 | People and ProductsExplain why interference breaks the A/B estimate in a marketplace, and compare cluster and switchback designs that repair it. | Frontier: measuring people, carefully | 49 min |
| 45 | The CloudCompute how correlated rack failures change an erasure code's durability, and say which independence assumption fails. | Frontier: scheduling, isolation and energy | 49 min |
| 46 | Logs, Streams and WarehousesExplain what incremental view maintenance by differential dataflow and DBSP computes, and at what cost in state. | Frontier: streams, tables and their limits | 49 min |
| 47 | Search EnginesExplain why graph-based nearest-neighbour search has no worst-case recall guarantee, and what locality-sensitive hashing guarantees in its place. | Frontier: retrieval and its limits | 50 min |
| 48 | System Design I: Building BlocksBuild a learned index with a bounded error and compare its size and comparisons with a B+ tree's inner nodes. | Frontier: design as a science | 49 min |
| 49 | System Design II: Case StudiesExplain why the count of operations gives the hybrid feed no interior optimum, and name what must be priced for a finite threshold to appear. | Frontier: how designs fail, and what is unknown | 48 min |
| 50 | Keeping It RunningDefine gray failure by differential observability and say how a client can judge health from real requests. | Frontier: gray failure and metastability | 49 min |
| 51 | Light and PixelsExplain what a denoiser trades for its lower error, and why a guarantee for it is an open problem. | Frontier: real time, and neural rendering | 50 min |
| 52 | Computing with Real NumbersExplain why a randomized SVD with a few extra columns matches the best rank-k error, and what power steps add. | Frontier: randomized and low-precision numerics | 49 min |
| 53 | Quantum ComputationPlace BQP between BPP and PSPACE, and state what the oracle separations do and do not show about NP. | What quantum computers cannot do; Frontier: keys, chemistry and the hardware | 49 min |
| 54 | Proving Programs CorrectProve that widening reaches a post-fixpoint in at most 2n strict steps per loop head and that narrowing stays above the least fixpoint. | Frontier: proofs at scale | 49 min |
| 55 | Trusting TrustSketch the reduction from the halting problem that makes the HRU safety question undecidable. | Frontier: the open problems of the series | 49 min |
| 56 | Spectral Graphs and ExpandersProve both sides of Cheeger's inequality, the hard side by a random threshold cut. | Rayleigh quotients and the Fiedler vector; Cheeger's inequality; Random walks and mixing; Expanders; Explicit expanders: the zig-zag product; Graphs as electrical networks; Laplacian solvers and sparsifiers; From electrical flows to max-flow; Frontier: high-dimensional expanders | 51 min |
| 57 | Learning TheoryProve the Sauer-Shelah lemma, and Hedge's regret bound with Hoeffding's lemma. | VC dimension; Margins and Rademacher complexity; Learning online; What cannot be learned; More parameters than data; Learning is compression; Frontier: compression schemes and in-context learning | 47 min |
| 58 | SemanticsProve adequacy for a language with fix by a logical relation, handling fix through the Kleene chain and admissibility. | Domains and fixed points; Adequacy and full abstraction; When are two programs the same?; Theorems for free; Hoare logic, proved sound; Dependent types; Processes and channels; Frontier: semantics of real languages | 49 min |
| 59 | Distributed Computing TheoryProve Linial's speed-up lemma on neighbourhood graphs and derive the bound t >= (log* n)/2 - 1. | Linial's lower bound; Synchronous agreement and its bounds; Asynchrony: FLP and randomness; Shared memory and the consensus hierarchy; Topology: why k-set agreement is impossible; Population protocols; Frontier: the complexity of locality | 50 min |
| 60 | Domain-Specific HardwareState Hong and Kung's red-blue pebble game and what an I/O lower bound for a grid of cells with local memories would have to show. | Which number stays put; Computing near memory; Sparsity and approximation; Frontier: accelerators for language models | 50 min |
| 61 | Doing ResearchDesign a noise-only control for a measured effect, and state what a spread inside the noise does and does not show. | Proof as research; Finding problems; The open-problems map; Where the series meet | 50 min |
Industry track
Where the idea lives in production: the systems, the trade-offs, the incidents, the interview questions.
For engineers and interview preparation: the degree core of each part, then how industry uses it and what it costs when it fails, and the labs, which run the series' own machine and tools.
60 parts · about 27 hours of film.
| Part | What you take from it | Chapters of this track | Time |
|---|---|---|---|
| 1 | What Is a Computation?Recognize interpreters, emulators and virtual machines as universal machines in software. | What we will build | 34 min |
| 3 | Logic from SwitchesDescribe a circuit as a netlist, simulate it bit-parallel and verify it on every input. | Our hardware layer | 33 min |
| 4 | ArithmeticChoose between integers, fixed point, decimal and floating point for money, counters and measurements. | Division, and a famous bug; Beyond IEEE | 33 min |
| 5 | Memory and TimeCompute a synchronizer's MTBF and explain why a single-bit synchronizer does not make a bus coherent. | When memory leaks | 28 min |
| 6 | The Stored-Program ComputerCompare Pebble-32 with RV32I and explain the design rules of a regular instruction set. | The Job, version 0; The whole machine, counted | 36 min |
| 7 | PipelinesMeasure before tuning: read cycles, instructions and branch misses from hardware counters and turn them into a CPI breakdown. | Deeper, and the end of the race; The puzzle, solved | 17 min |
| 8 | Out of OrderRead a core's published numbers with care: which stage a width refers to, and whether a reorder buffer counts instructions, micro-operations or fused groups. | Simultaneous multithreading; Modern cores in numbers | 22 min |
| 9 | The Memory HierarchyMeasure a machine's dependent-load latency and its sequential throughput, and say what a bend in the staircase does and does not prove. | This machine's staircase; Prefetching; Inside DRAM | 25 min |
| 10 | Parallel MachinesFind and remove false sharing: pad or separate per-thread data, and confirm with a cache-to-cache profile. | False sharing; SIMD and vectors; GPUs in one chapter | 27 min |
| 11 | The Running ProgramDiagnose undefined references, duplicate symbols and archive-order errors from the linker's messages, and read a backtrace. | Dynamic linking; Undefined behaviour | 25 min |
| 12 | Languages and AutomataRecognize a pattern with nested or overlapping repetition, and choose between an automaton engine and a backtracking one by features, guarantees and limits. | Backtracking engines | 29 min |
| 13 | The CompilerChoose optimization levels for a build, read the generated assembly, and measure instructions, cycles and time as separate quantities. | The Job, compiled; Is the compiler right? | 20 min |
| 14 | Lambda and TypesExplain why TypeScript accepts a covariant array write that fails at run time, and what a sound gradual type system would charge for it. | Data, subtyping and gradual types | 18 min |
| 15 | RuntimesSize a heap from the live data and a pause or throughput target, and read a collector's log. | Just-in-time compilers; Dynamic dispatch and exceptions; WebAssembly, and other machines | 23 min |
| 16 | Counting StepsChoose a library sort for given data (presorted runs, small integer keys, stability, data larger than memory) and justify the choice by counts. | Sorting in practice; The Job, sorted | 26 min |
| 17 | Data StructuresChoose between a hash map and an ordered map for a workload, and check the hash function's defence against flooding by untrusted keys. | B-trees; Persistence, and the memory hierarchy; Hash tables in practice; The Job, hashed | 28 min |
| 18 | GraphsChoose between Dijkstra, bidirectional search, A*, landmarks and contraction hierarchies for a routing service, counting preprocessing and per-query work separately. | Exact routes with less search; PageRank | 23 min |
| 19 | The Great ParadigmsCertify a floating-point FFT product with an independent exact check instead of trusting the distance to the nearest integer. | What the FFT multiplies | 25 min |
| 20 | Randomness as a ResourceChoose between an exact table, Misra-Gries, Count-Min and HyperLogLog for a stream, stating the guarantee each one actually has for the implementation's hashes. | The Job in kilobytes: ledger row 9; Near-duplicates: MinHash and LSH | 27 min |
| 21 | StringsChoose between fixed blocks, a rolling checksum and content-defined chunks for synchronizing or deduplicating files, and predict what an insertion does to each. | Rolling hashes at scale: rsync and chunking | 17 min |
| 22 | GeometryChoose between a kd-tree, an exact scan and an approximate graph index from the dimension and the data, and report recall with the number of distance evaluations. | High dimensions; Moving a robot | 23 min |
| 23 | OptimizationSolve an integer program by branch and bound with exact bounds, and explain why a nearly integral relaxation is not a feasible answer. | Integer programming | 20 min |
| 24 | Algorithms in PracticeChoose a search layout, a hash table or a sort for a hot path from measurements, and say which mechanism the measurement does not isolate. | Algorithm engineering I: layouts; Algorithm engineering II: SIMD and hashing; Sorting in practice; Benchmarking honestly; The Job, engineered | 25 min |
| 25 | UndecidableExplain why a static analyzer or a virus scanner must miss cases or raise false alarms, and how restricting the language buys decidability. | Undecidability in the wild | 9 min |
| 26 | P versus NPRecognize scheduling, packing and dependency resolution as NP-hard models, and choose between a SAT or ILP solver, an approximation and a heuristic. | NP-completeness everywhere; SAT in practice | 19 min |
| 27 | Proofs and RandomnessUse a conditional lower bound from SETH or 3SUM to decide when to stop looking for a faster algorithm. | Fine-grained complexity; Parameterized complexity | 12 min |
| 28 | Error-Correcting CodesChoose an error level for a QR code, and explain why erasures cost half of what errors cost. | Our QR code; Cyclic codes and CRCs; Codes for storage | 18 min |
| 29 | SecretsChoose a mode and a MAC: authenticated encryption, verified before decrypting, with a nonce that never repeats under a key. | Modes of operation; Hashes at work; Side channels and bad randomness | 23 min |
| 30 | Public KeysRead a TLS 1.3 handshake: key share, certificate chain, CertificateVerify, Finished, and where forward secrecy comes from. | Bleichenbacher's oracle; Certificates and trust; TLS 1.3 | 23 min |
| 31 | The KernelRead a system's cost in system calls and context switches with strace-style counts, and choose a buffer size from the measured cost per call. | Kernel designs | 31 min |
| 32 | Virtual MemoryChoose between a virtual machine and a container for isolation, naming what each shares with the host and the attacks that crossed each boundary. | Containers | 27 min |
| 33 | ConcurrencyChoose between a mutex, an atomic, a channel and a lock-free structure for a shared object, from contention and measured cost per handoff. | Transactional memory, channels and actors; Concurrency bugs in the wild | 24 min |
| 34 | StorageReplace a file safely with write, fsync and rename, and name the bugs of in-place updates and of delayed allocation. | Disks in the field; fsync, and what applications must do | 34 min |
| 35 | DatabasesRead a query plan from EXPLAIN, and decide whether an index, a covering index or fresh statistics will change it. | Isolation levels; Column stores | 27 min |
| 36 | Networks I: Moving BitsPlan addresses with CIDR, and diagnose a path with ping, traceroute and a packet capture. | BGP; Software-defined networks | 30 min |
| 37 | Networks II: Reliable ConversationSize socket buffers to a bandwidth-delay product, and choose between CUBIC and BBR on a lossy long path. | Queues; Modern congestion control; The web's transport; Caches at the edge | 36 min |
| 38 | Distributed Systems I: AgreementChoose the number of voters and the election timeouts of an etcd or ZooKeeper cluster, and explain why four voters tolerate no more than three. | Our Raft, attacked | 20 min |
| 39 | Distributed Systems II: ScaleChoose a consistency level as a product decision, naming the anomalies a user may see. | The tail at scale; Failure at scale | 29 min |
| 40 | Software EngineeringWrite a design document, keep changes small enough to review, and fix flaky tests rather than retry them. | Changing code that works; Review and process; Teams; Estimates | 33 min |
| 41 | Version Control, Builds and DependenciesMake a build hermetic and cached, commit lockfiles, and verify what a dependency update brings in. | Continuous integration; Continuous delivery | 28 min |
| 42 | The Browser and the WebFind the long task behind a dropped frame and split it into chunks that fit the frame budget. | Caches, offline and local-first; Web performance; Accessibility and mobile | 31 min |
| 43 | APIs and ServicesDesign an endpoint that is safe to retry, with an idempotency key recorded atomically with its effect. | Designing and versioning APIs; Queues and pub/sub; Monoliths and microservices; Finding, routing and trusting services; Time in APIs | 33 min |
| 44 | People and ProductsPlan an experiment: the metric, the guardrails, the sample size and the stopping rule, fixed before the first look. | Accessibility; Evaluating usability; Pitfalls at scale; Bandits and metrics | 35 min |
| 45 | The CloudChoose between functions and servers from a request rate, and find the break-even rate. | Serverless; Cloud networking; Infrastructure as code; Neighbours, regions and failure domains; Cost, carbon, and the Job's bill | 36 min |
| 46 | Logs, Streams and WarehousesChoose between a broadcast and a shuffle join from the table sizes, and repair a skewed key by salting. | Moving a gigabyte a second; Tables on object storage; Data you can trust | 30 min |
| 47 | Search EnginesChoose between document- and term-partitioned indexes, and use hedged requests against the tail of a fan-out. | Crawling the web; Serving at scale; Learning to rank; A search engine for the novels | 31 min |
| 48 | System Design I: Building BlocksSize a worker pool with Little's law and a target utilization, and say why the queue's age is the signal to scale on. | Choosing storage; Sharding; Replication in practice; Blobs and the edge; Real-time blocks; The Job as a service | 35 min |
| 49 | System Design II: Case StudiesSize a crawler, a chat service or a metrics pipeline on a napkin: rates, connections, storage, machines. | A news feed: ranking and reading; A web crawler; Ride-hailing dispatch; A video platform; A Dynamo-style key-value store; A metrics pipeline; The Job at a million books a day | 42 min |
| 50 | Keeping It RunningDetect coordinated omission in a load test and measure latency from intended send times instead. | Logs and traces; Coordinated omission; Profiling and flame graphs; Performance method and capacity; Incidents and post-mortems; Chaos engineering; The Job service under faults | 36 min |
| 51 | Light and PixelsChoose near and far planes and a depth format so that two surfaces a given gap apart do not z-fight. | The GPU pipeline; Acceleration structures; Our path tracer, and denoising | 29 min |
| 52 | Computing with Real NumbersChoose a fill-reducing ordering for a sparse factorization and measure the factor's nonzeros. | Sparse matrices; Speed: BLAS, LAPACK and mixed precision | 22 min |
| 53 | Quantum ComputationSimulate a circuit as a state vector, and say what a real device returns in place of the amplitudes. | Circuits and universality; Quantum error correction | 29 min |
| 54 | Proving Programs CorrectSpecify a protocol as a state machine, model-check it at a small scope and read the shortest counterexample. | Verified systems; Specifying systems: TLA+; Fuzzing and validating our compiler | 28 min |
| 55 | Trusting TrustChoose defences against memory corruption, injection and request forgery, and say what each one leaves open. | Memory safety; Isolation; The web; Networks under attack; Supply chains | 37 min |
| 56 | Spectral Graphs and ExpandersPartition a graph by spectral clustering, and read a sweep curve to choose the cut. | Expanders at work | 10 min |
| 57 | Learning TheoryChoose a stopping round for boosting from training and test curves when labels are noisy. | Boosting; Bandits | 16 min |
| 58 | SemanticsTest two implementations of a language against each other on random terminating programs, and say what agreement does and does not show. | Effects and monads | 16 min |
| 59 | Distributed Computing TheoryRead a consensus library's fault assumptions (crash or Byzantine, n > 2f or n > 3f, timing) and say which theorem each one answers. | Failure detectors; The cost of agreement | 21 min |
| 60 | Domain-Specific HardwareRead an accelerator paper's headline number (cells times operations times clock) and say whether its workloads are compute-bound or memory-bound. | The TPU, and fewer bits; GPUs revisited; Spatial machines: dataflow, CGRAs and FPGAs; How hardware is designed; The Job in hardware | 36 min |
| 61 | Doing ResearchRun a performance comparison with interleaved runs, randomized setup and a stated number of runs, and report the totals for a fixed workload. | Measurement bias; Benchmarks and reproducibility; Writing | 34 min |