AIME Inclusion-Exclusion: Count Overlaps Without Overcounting

Direct answer. AIME inclusion-exclusion is the technique for counting objects that satisfy at least one of several conditions when the conditions overlap. Adding the individual counts is wrong because an object satisfying two conditions is counted twice, and one satisfying three is counted three times. For three conditions A, B and C, the corrected count is |A ∪ B ∪ C| = |A| + |B| + |C| − (|A ∩ B| + |A ∩ C| + |B ∩ C|) + |A ∩ B ∩ C|. On the standard illustration of integers 1 to 100 divisible by 2, 3 or 5, this gives 50 + 33 + 20 − 16 − 10 − 6 + 3 = 74. MAA's published 2027 AIME description lists 15 integer-answer questions with answers 0–999, and regional administrations differ in timing and delivery, so confirm the format through your own registration channel rather than assuming the US/Canada arrangement applies to you.

Why adding the individual counts fails

Suppose a student writes down three sets: A = multiples of 2 up to 100, B = multiples of 3, C = multiples of 5. The individual counts are 50, 33 and 20. Adding them gives 103 — more than the 100 integers that exist in the range. A count larger than the population is always a defect, not a rounding issue. The cause is that 6 is in both A and B, so it was counted twice; 30 is in all three, so it was counted three times.

On a timed AIME this kind of error is expensive because it does not look wrong in the middle of a solution. The sum 103 looks like a plausible three-digit entry, and it only collapses when it is checked against the range. Building the check into the method, rather than saving it for the end, is what makes the technique reliable.

The sign ladder: add singles, subtract pairs, add the triple

The reason the formula has its particular shape is easy to verify region by region.

  • If an object satisfies exactly one condition, it is counted once in the singles, never in a pair, never in the triple: net contribution 1.
  • If it satisfies exactly two conditions, it is counted twice in the singles and once in a pair: net contribution 2 − 1 = 1.
  • If it satisfies all three, it is counted three times in the singles, three times across the pairs, and once in the triple: net contribution 3 − 3 + 1 = 1.

Every element therefore contributes exactly 1 to the expression, which is exactly what a union count requires. The same reasoning extends to four or more sets, where the signs alternate +, −, +, − at successive overlap levels.

Sign ladder for three sets (checked on integers 1–100 divisible by 2, 3 or 5)

Step-by-step teaching illustration (a teaching example, not an official contest problem)

Count the integers from 1 to 100 inclusive that are divisible by at least one of 2, 3 or 5. This is a deliberately transparent illustration of the mechanics; it is not a released AIME problem.

Step 1 — single counts. |A| = floor(100/2) = 50; |B| = floor(100/3) = 33; |C| = floor(100/5) = 20.

Step 2 — pairwise intersections. An integer lies in A ∩ B when it is divisible by both 2 and 3, that is, by lcm(2,3) = 6. So |A ∩ B| = floor(100/6) = 16. Similarly |A ∩ C| = floor(100/10) = 10 and |B ∩ C| = floor(100/15) = 6.

Step 3 — triple intersection. Divisibility by all three means divisibility by lcm(2,3,5) = 30, so |A ∩ B ∩ C| = floor(100/30) = 3.

Step 4 — apply the ladder.

Term Value How it was obtained
Singles 50 + 33 + 20 = 103 floor(100/2), floor(100/3), floor(100/5)
Pairs (subtracted) 16 + 10 + 6 = 32 floor(100/6), floor(100/10), floor(100/15)
Triple (added) 3 floor(100/30)
Union 103 − 32 + 3 = 74 Add singles, subtract pairs, add triple

The answer is 74. Notice that the intermediate 103 was never the answer; it was a staging value that the later subtractions corrected.

Reading the same diagram three ways

The same setup answers several different questions, which makes overlap structures a productive practice target.

  • At least one condition: 74, as computed above.
  • Exactly one condition: compute each exclusive region. Multiples of 2 only = 50 − 16 − 10 + 3 = 27; multiples of 3 only = 33 − 16 − 6 + 3 = 14; multiples of 5 only = 20 − 10 − 6 + 3 = 7. Total 27 + 14 + 7 = 48. The shortcut expression 103 − 2(32) + 3(3) = 103 − 64 + 9 = 48 confirms it.
  • At least two conditions: the pairwise sum 32 counts an element of exactly two conditions once and an element of all three conditions three times, so subtract two copies of the triple: 32 − 2(3) = 26. Note that this group of 26 includes the 3 elements that satisfy all three conditions. Therefore, the number of elements satisfying exactly two conditions is 26 − 3 = 23.
  • None of the conditions: 100 − 74 = 26.

These regions give a free correctness test. Using disjoint categories (exactly one, exactly two, all three, none): 48 + 23 + 3 + 26 = 100, covering every integer in the range exactly once.

A second illustration where the LCM choice decides the answer

Now count integers from 1 to 120 divisible by 4, 6 or 10. Singles: floor(120/4) = 30, floor(120/6) = 20, floor(120/10) = 12. Pairs use the least common multiples: lcm(4,6) = 12 gives 10; lcm(4,10) = 20 gives 6; lcm(6,10) = 30 gives 4. The triple uses lcm(4,6,10) = 60, giving 2. So the union is 30 + 20 + 12 − (10 + 6 + 4) + 2 = 62 − 20 + 2 = 44.

The instructive part is the pair lcm(4,6) = 12. Substituting 24, a common product rather than the least common multiple, would give floor(120/24) = 5 instead of 10. Because this term is subtracted, underestimating the intersection size leads to subtracting too little. The incorrect calculation would be 62 − (5 + 6 + 4) + 2 = 62 − 15 + 2 = 49. Thus, the error causes the final count to increase from 44 to 49. LCM errors do not announce themselves; they simply shift the result. Writing the lcm beside each intersection before doing any arithmetic is the cheapest defence.

'At least one' versus 'exactly one': the comparison that prevents lost points

Phrase in the question What it counts Correct treatment
At least one The union |A ∪ B ∪ C| Add singles, subtract pairs, add the triple (74 in the first illustration)
Exactly one Elements in one set and no other Build each exclusive region |A| − |A ∩ B| − |A ∩ C| + |A ∩ B ∩ C| and sum them (48 in the first illustration)
At least two Elements in two or three sets Add the pairwise intersections, then subtract twice the triple intersection (26 in the first illustration)

A common point of confusion arises when students compute the union correctly but submit it for an 'exactly one' question, or vice versa. The two numbers are different, and the gap between 74 and 48 is exactly the set of integers that satisfy two or three of the conditions. Distinguishing whether the question asks for the total coverage (union) or specific exclusive zones is critical for accuracy.

Venn diagrams as a twenty-second check

You will rarely have time to fill in every Venn region during the exam, but a rough three-circle sketch still pays. Label the pairwise and triple regions first, since those are where the sign errors occur, and leave the exclusive regions blank. If the question says 'exactly one', you should see immediately that three separate blank regions are being requested, not the whole outline.

Overcounting has other disguises as well. Rotational arrangements, for example, are overcounted by a symmetry factor rather than by an overlap level, and the correction is not the inclusion-exclusion ladder; that distinct trap is treated in our note on AIME Counting With Symmetry: When Dividing by the Number of Rotations Fails. Being able to name which kind of overcounting you face is half the diagnosis.

Diagnostic routine after you reach an answer

  • Population test: is the count no larger than the number of objects in the stated range? 74 out of 100 passes; 103 does not.
  • Sign test: did you add the triple back after subtracting the pairs? The pattern is +, −, +, never +, −, −.
  • Region-sum test: do the exclusive, exactly-two, triple and none regions add to the population? 48 + 23 + 3 + 26 = 100 leaves no integer unaccounted for.
  • Divisor test: is every intersection divisor a genuine least common multiple? Pair intersections use lcm of the two divisors; the triple uses lcm of all three.

Each check takes seconds and each one catches a different error class. Overlap counting rewards a student who finishes with two independent routes to the same integer, not one confident route.

Wording that signals overlap counting

Certain phrases should trigger the ladder almost automatically: 'divisible by', 'is a multiple of', 'contains at least one of', 'satisfies either … or …', and any request phrased as 'how many … have at least one property'. The complementary phrases 'exactly one' and 'none' should trigger the region-building variant instead. When overlap counting appears alongside residue conditions, it is worth reviewing the residue technique separately; our note on AIME Modular Arithmetic: Recover an Integer From Two Remainders covers the congruence side of such problems.

How to practise this before your sitting

Six to eight well-chosen overlap problems are worth more than forty undifferentiated counting exercises. Work in this order: two-set warm-ups until the subtraction is automatic; three-set divisibility problems until the triple term is never forgotten; then 'exactly one' and 'at least two' variants of the same setup, so that the different target phrases are felt as different questions. Time a small set at exam pace, and keep a written record of which region you miscounted, not just which problem you missed.

Hanlin's own course note for 2027 AIME preparation, 'Important Notice: Domestic AIME Arrangements Confirmed' (Hanlin Courses WeChat account, retrieved 26 October 2026), treats number theory and combinatorics as the usual weak modules for Chinese students targeting 8–10 points. That is a coaching judgment drawn from teaching experience, not an official MAA rule or a published statistic, and it should be read as a study-priority suggestion rather than a prediction about any individual. Students who want to close that gap tend to benefit from bringing one or two worked overlap attempts, including the wrong version, to any consultation so the error can be located at the region level.

For the wider context around structure, difficulty spread and preparation sequencing, see our AIME Competition Guide: Scoring Changes, Difficulty Breakdown, and Prep Strategies.

General event background is available at Event background.

Overlap-correction flow

Frequently Asked Questions

Is inclusion-exclusion always necessary for small ranges?

No. If the whole population is small enough that you can list every element and mark the conditions by hand, direct enumeration is often safer, because the listing itself is the check. The ladder becomes the better choice once the range or the number of conditions makes complete listing impractical, which is the normal situation on the AIME. Either way, keep the population test: any count above the size of the range is wrong.

How do I handle 'exactly one' conditions?

Do not submit the union count. Build each exclusive region separately using |A| − |A ∩ B| − |A ∩ C| + |A ∩ B ∩ C| and add the three regions; in the 1-to-100 illustration that is 27 + 14 + 7 = 48. The equivalent shortcut is 103 − 2(32) + 3(3) = 48. Use whichever form you can reproduce under time pressure.

Which errors should I guard against in these problems?

Two errors to guard against are an incorrect least common multiple for an intersection, such as using 24 instead of 12 for lcm(4,6), and forgetting to add the triple intersection back after subtracting the pairwise intersections. Check each intersection divisor explicitly, and treat the region-sum test as a consistency check only when the regions are built from the actual set memberships rather than from the same mistaken intersection figures.

Online Consultation
Online Consultation