TAOCP Vol 4B: Combinatorial Algorithms, Part 2 · Week 134

TAOCP Mathematical Preliminaries Redux

Updated

About 8 hours147 exercises, rated 10 to HM34

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.

Flashcards 16 cards for Anki and AnkiMobile · all decks

Anki deck.tsv

This week's steps

3 steps
  1. Read §Mathematical Preliminaries Redux

    Make a one-page sheet of each inequality with a tiny example.

  2. Work the exercises (10 picked)

    Start with Ex 13, Ex 17, Ex 6; log what you solve below.

  3. 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.

Sign in to track this: tick each step off and it counts toward your week.

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

  • Exercise 6M22▶ Recommended

    Build random bit vectors that are pairwise independent but not 3-wise independent.

    Discuss

  • Exercise 1315

    Decide whether 'B makes A likelier, and C makes B likelier' means C makes A likelier. It doesn't always, and that surprises people.

    Discuss

  • Exercise 1715▶ Recommended

    A conditional probability in the playing-card example. A warm-up for the notation.

    Discuss

  • Exercise 22M20▶ Recommended

    Derive the union bound from the indicator-variable identity for expectations.

    Discuss

  • Exercise 35M22▶ Recommended

    Two true-or-false identities about nested conditional expectations. Tests whether you understand E(X|Y) as a random variable.

    Discuss

  • Exercise 48M20▶ Recommended

    Show that the second moment principle gives a one-sided bound slightly better than Chebyshev's.

    Discuss

  • Exercise 54M22▶ Recommended

    Bound the probability that a random graph has a triangle, using the first and second moment principles.

    Discuss

  • Exercise 66M22▶ Recommended

    Classify every martingale whose nth value is always plus or minus n.

    Discuss

  • Exercise 88HM30▶ Recommended

    The stretch: the probability that Pólya's urn ever has more than half red balls (ln 2), and the generalization.

    Discuss

  • Exercise 97HM21▶ 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.

    Discuss

Your log

Sign in to log the exercises you work: number, rating, how far you got.

Your notes

Only you

Sign in to keep private notes on this guide, in Markdown. They stay yours: never on your profile, and you can export them all.

Discussion

0 posts

Questions about the reading go here; each exercise has its own thread below. Hints over answers.

No posts yet. Ask a question or share a tip.

Sign in to postAnyone can read. Posting needs an account with a confirmed email.

Exercise threads

One thread per exercise. Open one to ask for a nudge or check your thinking.

  • Exercise 6M22No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 1315No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 1715No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 22M20No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 35M22No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 48M20No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 54M22No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 66M22No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 88HM30No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 97HM21No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

Reference

Why it matters

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

Before you start
  • 1.2 Mathematical Preliminaries
  • Probability: expectation, variance
How to approach it

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
  • 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.

Spot a mistake? Report it

Back to week 134