Inclusion–Exclusion, the Pigeonhole Principle and Double Counting: Examples and Counterexamples
About this page
How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
✓ 10 results · all verified · 1 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full by a delegated reviewing agent on the owner's instruction; the judge is an additional, independent cross-model AI review of the proofs. The 9 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.
1 · Prerequisites
Combinatorics
Real Analysis
2 · Logical flowchart
3 · Items
Example
The sieve run in full on three explicit finite sets and then on four, with every nonempty intersection listed
Example
The surjections from a five-element set onto a three-element set counted by the sieve formula and by direct subtraction
Example
All nine derangements of a four-element set listed, and the count checked against the formula and both recurrences
Example
The ratio ι(Dₙ)/ι(n!) computed for small n as a quotient of two counts, with no probability space claimed
Example
In a finite set with a symmetric irreflexive relation and at least two elements, two elements have equally many neighbours
Example
For a finite symmetric irreflexive relation the sum of the neighbour counts is twice the number of unordered related pairs
Example
Distributing a finite set over a finite set of boxes, with the ceiling bound computed and attained
Counterexample
A three-set count that drops the triple intersection and returns the wrong answer
Counterexample
A list of six distinct reals with no strictly increasing sublist of length four and no strictly decreasing sublist of length three
Counterexample
A relation whose row fibres all differ from the average size, so the averaging principle gives a bound that no fibre meets exactly
Sources
- Inclusion-exclusion principle (Wikipedia)
- Cardinality (Wikipedia)
- Guichard, The Inclusion-Exclusion Formula (LibreTexts)
- Surjective function (Wikipedia)
- Twelvefold way (Wikipedia)
- Algebraic Combinatorics Blueprint: Surjections
- Derangement (Wikipedia)
- Rencontres numbers (Wikipedia)
- Principle of Inclusion and Exclusion (Open Math Books)
- Derangements (OpenText at the University of Lethbridge)
- Pigeonhole principle (Wikipedia)
- Handshaking lemma (Wikipedia)
- Graph Theory, Chapter 1 (King Saud University notes)
- Double counting (proof technique) (Wikipedia)
- Floor and ceiling functions (Wikipedia)
- Sylvestre, Pigeonhole Principle (LibreTexts)
- Erdos-Szekeres theorem (Wikipedia)
- Longest increasing subsequence (Wikipedia)
- Mathematics for Computer Science (MIT OpenCourseWare)