# TAOCP Mathematical Preliminaries Redux

> Study guide to TAOCP Mathematical Preliminaries Redux. An unnumbered probability tutorial that opens the volume (cited as MPR). It reviews probability…

Updated October 20, 2026.

## Summary {#summary}

TAOCP Mathematical Preliminaries Redux: An unnumbered probability tutorial that opens the volume (cited as MPR). Budget about 8 hours; do exercises 13, 17 and 6.

It reviews probability spaces, k-wise independence and conditional probability, then makes conditional expectation E(X|Y) precise as a random variable. Next come inequalities: Markov, Chebyshev, Jensen, the first and second moment principles, Ross's conditional expectation inequality and the FKG inequality. Then martingales (Pólya's urn, optional stopping, Kolmogorov's maximal inequality, the Hoeffding-Azuma tail bound), Doob martingales and the method of bounded differences, applied to a hashing example. It ends with 'almost sure' versus 'quite sure' (superpolynomially unlikely to fail) statements.

## Key facts {#key-facts}

- Week 134 of 145 on the cracked.guide path, in [TAOCP Vol 4B: Combinatorial Algorithms, Part 2](https://cracked.guide/taocp/volume-4b).
- Time budget: about 8 hours.
- 147 exercises in the section, rated 10 to HM34; the guide picks 10.
- Picked exercises with Knuth's triangle for recommended: 17, 6, 22, 35, 48, 54, 66, 97 and 88.
- Before you start: 1.2 Mathematical Preliminaries and probability: expectation, variance.

## Week 134 goals {#objectives}

By the end of week 134 you can:

- Use Markov's and Chebyshev's inequalities to bound tail probabilities.
- Explain why E(X|Y) is a random variable and E X = E(E(X|Y)).
- Recognize pairwise independence that is not full independence.

## This week's steps {#steps}

- Read §Mathematical Preliminaries Redux: Make a one-page sheet of each inequality with a tiny example.
- Work the exercises (10 picked): Start with Ex 13, Ex 17, Ex 6; log what you solve below.
- Write down one thing you'd explain to someone: A few sentences in your own words in Your notes: the idea, why it works, an example. 30 words ticks this.

## Exercises {#exercises}

MPR has 147 exercises, rated 10 to HM34, and Knuth marks 50 with the triangle for recommended. They follow the text in order: roughly 1 to 39 cover independence, conditional probability and conditional expectation; 40 to 62 the inequalities (moment principles, Jensen, FKG); 63 to 97 martingales, Hoeffding-Azuma and q.s. bounds; and 98 to 147 a long tail of extras (coupling, minwise permutations, heavy tails, classical moment inequalities). Do the first three blocks properly. Dip into the tail only for topics you care about.

Worth your time:

- 13 (rated 15): Decide whether 'B makes A likelier, and C makes B likelier' means C makes A likelier. It doesn't always, and that surprises people.
- 17 (rated 15, recommended): A conditional probability in the playing-card example. A warm-up for the notation.
- 6 (rated M22, recommended): Build random bit vectors that are pairwise independent but not 3-wise independent.
- 22 (rated M20, recommended): Derive the union bound from the indicator-variable identity for expectations.
- 35 (rated M22, recommended): Two true-or-false identities about nested conditional expectations. Tests whether you understand E(X|Y) as a random variable.
- 48 (rated M20, recommended): Show that the second moment principle gives a one-sided bound slightly better than Chebyshev's.
- 54 (rated M22, recommended): Bound the probability that a random graph has a triangle, using the first and second moment principles.
- 66 (rated M22, recommended): Classify every martingale whose nth value is always plus or minus n.
- 97 (rated HM21, recommended): Hashing slightly more than n items into n bins: show that every bin's load is quite surely within a factor of 2 of the average.
- 88 (rated HM30, recommended): The stretch: the probability that Pólya's urn ever has more than half red balls (ln 2), and the generalization.

## Why it matters {#why}

Tail bounds are how you reason about randomized algorithms, load balancing and hashing guarantees. This is advanced but very useful math.

## Before you start {#before}

- 1.2 Mathematical Preliminaries
- Probability: expectation, variance

## How to approach it {#approach}

Make a one-page sheet of each inequality with a tiny example. Simulate one in code (e.g. flips of a coin) and compare the actual tail to the bound.

## Common traps {#traps}

- Applying an inequality whose conditions (independence, bounded differences) do not hold.
- Reading E(X|Y) as a number. In MPR it is a random variable, a function of Y; that is what makes E X = E(E(X|Y)) work.
- Treating pairwise independence as full independence. Exercise 6 builds a counterexample.

## Links {#links}

- [Knuth's TAOCP page (editions, errata, MIX/MMIX)](https://www-cs-faculty.stanford.edu/~knuth/taocp.html)
- [Vol 4B errata (plain text, from Knuth)](https://www-cs-faculty.stanford.edu/~knuth/err4b.textxt)
- [Wikipedia: Concentration inequality](https://en.wikipedia.org/wiki/Concentration_inequality)
- [Wikipedia: Martingale (probability theory)](https://en.wikipedia.org/wiki/Martingale_(probability_theory))
- [Hacker News: Probability 101, the intuition behind martingales](https://news.ycombinator.com/item?id=34909196)

---

Source: https://cracked.guide/guide/knuth-w116-0
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
