Concept

Inclusion exclusion

Counting a union by adding the parts, subtracting the overlaps, adding back the triple overlaps, and continuing. It is exact and has one term per subset, so every practical use of it is a truncation — and truncating alternates between over- and under-counting.

Named by 7 essays across 4 fields — each of them below, with the objects they name alongside it.

The share of arrangements that fix nothing, up to 8 objects. A bar per number of objects, giving the proportion of its arrangements that leave nothing in place, against the horizontal line at 1/e.

The constant that counts what does not happen

Nothing grows in a shuffled pack of cards, and nothing grows in a factorial. Yet e sits in the middle of both — as the chance that a shuffle leaves nothing in place, and as the base that makes n! nearly a power.

analysis · The exponential
Two sums of reciprocals: 2.89 and climbing against 1.71 and level. Two curves against the logarithm of the bound: the sum of reciprocals of all primes, rising steadily, and the sum over the twin primes, flattening towards a limit.

The sieve that cannot finish

Sifting out the composites is the oldest method in the subject and it has a ceiling nobody has raised. The reciprocals of the twin primes add to a finite number, so no argument that measures thickness can reach them — and the inclusion–exclusion every sieve truncates goes wildly wrong before it goes right.

number · Infinitude of primes
How many of 8 people get their own hat, against the Poisson with mean 1. Paired bars for each number of people getting their own hat: the exact share of arrangements and the Poisson probability with mean one, nearly equal at every count.

How many get their own hat

The chance that nobody gets their own hat settles on 1/e. The chance that exactly one person does settles on 1/e too, exactly two on 1/(2e), exactly three on 1/(6e) — the Poisson distribution with mean 1. The reason is a set of averages that come out exactly 1 at every size, and the counts reach the limit so fast that eight hats are within six ten-thousandths of it.

probability · Inclusion exclusion
Waiting for all 6 when they are not equally likely. One bar per kind giving the expected wait for that kind on its own, with the rarest much the tallest, and the expected wait for the whole collection printed above them.

The one that hardly ever comes up

Make the kinds unequally likely and the tidy decomposition into stages fails, because a stage's rate now depends on which kinds turned up rather than on how many. What replaces it is an alternating sum over every subset — and the rarest kind turns out to be nearly the whole answer.

probability · Expectation
Permutations that avoid 8 forbidden cells. A 5 by 5 grid with 8 forbidden cells shaded and one permutation that avoids them marked, beside the numbers of ways to place non-attacking rooks on the forbidden cells and the count of avoiding permutations they give.

The cells a permutation must miss

A derangement is a permutation that misses the diagonal of a square grid. Forbid any other set of cells instead and inclusion–exclusion still counts what is left — driven entirely by one list of numbers, the ways to place non-attacking rooks on the forbidden cells. Boards that look nothing alike can share that list, and rooks on a staircase turn out to count the ways to split a set.

probability · Inclusion exclusion
5 couples seated so that no one sits beside a partner. A round table with 10 seats alternating women and men, labelled by couple, arranged so that no man sits next to his partner, with the number of such arrangements.

A round table with no couple together

Seat n couples round a table, men and women alternating, so that nobody sits beside their partner. Once the women are placed the men face a board of forbidden cells that bends round a corner — and that corner is the whole difficulty. The forbidden cells form a cycle, a count of non-adjacent points on a cycle finishes the problem, and the chance of a good seating creeps towards e^(−2) far more slowly than the hat problem reaches 1/e.

probability · Inclusion exclusion
Counting overlapping targets from sensor counts alone, by integrating against χ. A 36 by 32 grid of sensor counts from 7 overlapping discs; the sum of the Euler characteristics of the level sets is 7.

Counting targets by their holes

The Euler characteristic adds up like an area: glue two shapes together and it is the sum of theirs minus that of their overlap. So it can be used to measure, and measuring with it does something no area can. A field of sensors that each report only how many targets they detect — not which, not where — can have its readings added up, weighted by the Euler characteristics of the regions where the count is high, and the answer is exactly the number of targets.

topology · Euler characteristic

Named alongside it

The objects these essays reach for when they reach for this one.

Derangemente, the numberLimitPermutationApproximationCounting argumentCounting two waysRook polynomialConvergenceConvergence rateEuler characteristicExpectation

All concepts