4.9.2 · D4Probability Theory & Statistics

Exercises — Inclusion-exclusion principle

1,933 words9 min readBack to topic

The one identity every solution below leans on:

Read that as: ==odd-size intersections get , even-size get ==.


Level 1 — Recognition

Recall Solution

WHAT tool: two-set inclusion–exclusion, because we are asked for a union and we were handed the overlap. WHY subtract: the both-owners are inside the and inside the , so simple addition counts them twice. Answer: .

Recall Solution

is an intersection of sets. The sign is . WHY: three is odd, and odd-size intersections are added. Answer: (positive).


Level 2 — Application

Recall Solution

Let = multiples of , = multiples of .

  • = multiples of : WHY lcm not : a number divisible by both and must be divisible by their least common multiple, — not the product (else you'd miss ). Answer: .
Recall Solution

Step by step: singles ; subtract pairs ; add the triple . WHY : the all-three students were added times (once per single) and subtracted times (once per pair), netting — so they must be restored once. Answer: .


Level 3 — Analysis

Recall Solution

WHAT tool: count "at least one" by inclusion–exclusion, then subtract from the total — it is far easier than counting "none" directly. See the shaded region below.

Figure — Inclusion-exclusion principle

Let be multiples of .

  • Singles:
  • Pairs (use lcm):
  • Triple: Divisible by none: WHY the complement: "divisible by none" is the outside of the union; total minus union gives it in one line. Answer: .
Recall Solution

WHY a new formula: the union counts "one or more," but we want strictly one. An element in exactly one set should count once; in exactly two, zero times; in exactly three, zero times. The count of "exactly one" is WHY the coefficients : an element in exactly two sets appears in singles and pair, so . An element in all three appears in singles, pairs, triple: . Only "in exactly one" survives with coefficient . Answer: .


Level 4 — Synthesis

Recall Solution

WHAT tool: count the "bad" functions that miss at least one box by inclusion–exclusion, then subtract from all functions. Let = functions that avoid box .

  • Total functions:
  • = functions into the other boxes ; there are of them.
  • = functions into the remaining box ; there are .
  • = functions into boxes ; . Functions missing at least one box: Surjections WHY this matches the formula: surjections Answer: .
Recall Solution

WHAT tool: derangements , an inclusion–exclusion payoff (see parent example 3). Let = arrangements where letter is in its correct envelope, so , and a -fold intersection fixes letters: with choices. Compute the bracket: , and Answer: .


Level 5 — Mastery

Recall Solution

WHAT tool: Bonferroni Inequalities — truncating inclusion–exclusion after an odd number of terms over-estimates (upper bound); after an even number under-estimates (lower bound).

  • After term (odd → upper): (Trivially capped at .)
  • After terms (even → lower): So WHEN exact lower bound : equality holds precisely when the triple intersection is empty, , since the full formula adds to the lower bound. Answer: bounds ; exact iff .
Recall Solution

Strategy: fix one element that lies in exactly of the sets, and show it contributes to when and otherwise. Summing over all then gives the count.

Its contribution to . appears in a -fold intersection exactly when all chosen sets are among the containing it, so it contributes to (and if ).

Its contribution to . Substitute: Use the subset-of-a-subset identity (WHY: choosing from then from those equals choosing the final from then the remaining from the leftover ). Factor out : Let : WHY the binomial theorem here: collapses the alternating sum to .

  • If : → contributes . ✓
  • If : , and → contributes . ✓
  • If : the sum is empty → . ✓ Every element in exactly sets contributes , all others . Hence counts them exactly.

Connections

  • Inclusion-exclusion principle — the parent principle every exercise applies
  • Set Theory & Venn Diagrams — union/intersection regions behind L1–L3
  • Counting Principles & Combinatorics and lcm counting used throughout
  • Derangements & Permutations — L4·Q2's derangement payoff
  • Binomial Theorem — collapses the alternating sums in L5·Q2
  • Probability Axioms — L5·Q1's probabilistic form
  • Bonferroni Inequalities — the truncation bounds in L5·Q1