← All lessons

Inclusion-Exclusion (AIME / USAJMO / AMO)

Proof-style AIME / USAJMO / AMO statements — develop a full argument; type only the final answer.

Proof track: treat each problem as a full olympiad writeup on paper. Here you only enter the final answer (integer or short expression).

Inclusion-Exclusion: core idea

Full PIE.

Example problem: hint and answer

**(Proof track.)** Prove the full inclusion-exclusion principle by induction. Then enter the number of integers in [1,1000][1,1000] not divisible by 22, 33, or 55.

Hint: PIE count. Answer: 266.

Practice (9 problems — type your answers)

No proof submission required — answers only.

  • 1. **(Proof track.)** Derive the derangement formula !n=n!∑k=0n(−1)k/k!!n=n!\sum_{k=0}^{n}(-1)^k/k! and enter !7!7.

  • 2. **(Proof track.)** Prove the surjection count via IE and enter the number of surjections [9]→[4][9]\to[4].

  • 3. **(Proof track.)** Prove ∑d∣nμ(d)=[n=1]\sum_{d\mid n}\mu(d)=[n=1]. Enter μ(210)\mu(210).

  • 4. **(Proof track.)** Using PIE on residues, enter how many integers in [1,360][1,360] are divisible by 88 or 99 or 1010.

  • 5. **(Proof track.)** Prove a formula for the number of square-free positives ≤N\le N asymptotically involves 6/π26/\pi^2; for exact small N=30N=30, enter the count of square-free integers in 1..301..30.

  • 6. **(Proof track.)** Show !n=(n−1)(!(n−1)+!(n−2))!n = (n-1)\big(!({n-1})+!({n-2})\big). Using recurrence, enter !8!8.

  • 7. **(Proof track.)** Prove the count of onto functions equals k!S(n,k)k!S(n,k). Enter the Stirling number of the second kind S(6,3)S(6,3).

  • 8. **(Proof track.)** Using PIE for the probability a random permutation is a derangement, enter the nearest integer to 100!∑k=0100(−1)k/k!100!\sum_{k=0}^{100}(-1)^k/k! (i.e. !100!100 rounded? — instead enter !5!5).

  • 9. **(Proof track.)** Prove that the number of nn-bit strings with no consecutive 11s is Fn+2F_{n+2}. Enter that number for n=10n=10.

Inclusion-Exclusion Practice Problems — AIME / USAJMO / AMO