Library

Inclusion-exclusion

8 items in the Thuztra Learn library carry the topic inclusion-exclusion: 5 puzzles and 3 interview questions. They are gathered here so one idea can be met in every form it takes, which is usually the difference between recognising a term and being able to use it.

6 of them have pages of their own, linked below. Everything else is listed with the summary its author wrote. The 8 problems on this topic are set out under their own headings, and the longest are quoted in full.

Problems in full

Quoted exactly as the library sets them, so the topic is something you can try rather than something you have read about.

At least one six in three rolls

A fair six-sided die is rolled three times.

What is the probability that at least one of the three rolls shows a six?

Collecting coupons that do not arrive equally often

Four kinds of coupon arrive one at a time, independently, with probabilities p=(0.4, 0.3, 0.2, 0.1)p = (0.4,\, 0.3,\, 0.2,\, 0.1). Let TT be the number of draws until we hold all four kinds.

  1. Why does the usual coupon collector argument, adding up the wait for each new kind, fail here?
  2. Find E[T]\mathbb{E}[T] exactly.
  3. Compare it with the equal-probability case, and bracket it between two easy bounds.
  4. The closed form is a sum over all subsets. Is it a usable way to compute the answer for a large number of coupons?

Puzzles

At least one six in three rolls

A fair die is rolled three times and we are betting on a six appearing. Adding the chance up roll by roll gives a very tidy number, and a wrong one.

Collecting coupons that do not arrive equally often

Four coupons arriving at four different rates. Collecting the set takes noticeably longer than it would at equal rates, and the stage-by-stage trick that solves the equal case quietly stops working.

Nobody idle

Distinguishable tasks land on workers at random. Count the assignments that leave nobody idle. Subtracting the bad cases needs a correction, and then a correction to the correction.

The gaps between points dropped on an interval

Nine points land uniformly on an interval and cut it into ten gaps. The typical gap is easy. The largest gap is much wider than most people guess, and there is a one-line reason.

Identical units, labelled buckets

Ten identical units go into four labelled buckets. Count the allocations three ways: unconstrained, with nothing left empty, and with a ceiling on every bucket.

Interview questions

At least one ace, and the count that arrives first

A five card hand holding at least one ace. Judge the one line count almost everyone writes first, say which way it is off, and account for every unit of the gap.

Two aces, and which ace we were told about

A thirteen card hand holds at least one ace. Does it hold two? Now suppose we are told instead that it holds the ace of spades. Same deck, different number, and one popular count exceeds certainty.

Two decks dealt side by side

Two shuffled decks dealt card against card. How many positions agree? The mean, the variance and the chance of a clean miss are all easier than the counting suggests.

Related topics

The ideas this one is most often carried alongside, ranked by how much of each collection the two share.

Also in the library