AIME Combinatorics: Build a State Table Before Writing a Recurrence

For 2027 AIME combinatorics preparation, build the state table before writing a recurrence. Name the ending classes that control the next legal move, list their transitions, hand-check small cases, and only then trust the algebra. This matters when a counting condition depends on the last symbol, the last two symbols, or an asymmetric restriction rather than on a single total.

Why the state table comes before the recurrence

A recurrence is a compressed description of transitions between states. If the state is wrong, the recurrence can look neat and still count the wrong objects. A common failure is to assume every valid string of length n has the same number of legal extensions. That is true only when the restriction is symmetric with respect to the next symbol. Many AIME-style counting conditions are not symmetric: whether a 1 may be appended can depend on whether the current string already ends in 1.

The order should be: name the states, write the legal moves between states, compute the first few values by hand, and only then solve or iterate the recurrence. This is also the discipline behind the period-detection method in the related AIME Recurrence Relations: Find the Period Before Expanding Long Sequences: a recurrence must be correctly specified before its long-term behavior means anything. The state table is the specification.

MAA’s public invitational-competitions page lists the 2027 AIME as 15 integer-answer questions with answers 0–999; the final count must collapse to one integer, but the counting logic must be valid first.

A complete teaching illustration: length-6 binary strings

Teaching illustration (original, not an official contest problem): Count the length-6 binary strings that contain no two consecutive 1s. A binary string uses only 0 and 1; “no consecutive 1s” means the substring 11 never appears.

Do not start with a recurrence. Start with the last symbol, because that is what controls whether appending another 1 is legal. Let An be the number of valid length-n strings ending in 0, and let Bn be the number of valid length-n strings ending in 1.

  • To form a valid length-n string ending in 0, append 0 to any valid length-(n−1) string. So An = An−1 + Bn−1.
  • To form a valid length-n string ending in 1, the previous string must end in 0. So Bn = An−1.
  • The initial values are A1 = 1, from the string 0, and B1 = 1, from the string 1.
n An: ends in 0 Bn: ends in 1 Total valid strings
1 1 1 2
2 2 1 3
3 3 2 5
4 5 3 8
5 8 5 13
6 13 8 21

The length-6 count is 21. The hand checks support the table: length 1 gives 0 and 1; length 2 gives 00, 01, and 10; length 3 has five valid strings, including 010 and 101, while 011 and 110 are excluded.

State split for no-11 strings

What a failed one-state attempt looks like

A solver who writes “each string has two possible next symbols, so Tn+1 = 2Tn” has skipped the state question. From length 1, T1 = 2. The false recurrence gives T2 = 4, but the actual valid length-2 strings are 00, 01, and 10. The missing fourth candidate, 11, is illegal because the first 1 cannot be extended by another 1.

The error is not arithmetic. The error is that “valid string” is not a sufficient state when the next allowed symbol depends on the final symbol. The transition from a string ending in 0 is different from the transition from a string ending in 1. Once those two states are separated, the overcount disappears.

This is why a recurrence that happens to produce the right numbers for one or two cases is not proof. A Fibonacci-like formula may fit a few values and still fail later if the state model is incomplete. Checking n = 1, 2, and 3 by hand is not cosmetic; it tests whether the transition rules match the actual objects.

The four-column diagnostic table

Before writing algebra, fill a table with four columns. The table is deliberately small; its purpose is to expose hidden assumptions.

State name Meaning Allowed transition Count
S0 Valid strings ending in 0 Append 0 or append 1; both remain valid An
S1 Valid strings ending in 1 Append 0 only; appending 1 would create 11 Bn

The “Allowed transition” column is where most errors become visible. If the entry says “append 0 or 1” for every state, the restriction has been ignored. If the entry depends on more than the last symbol, such as a rule forbidding 101, the table needs states that remember the last two symbols or an equivalent automaton state.

The “Count” column must be defined before it is used. An and Bn are not interchangeable totals; they are counts of different ending classes. The final answer is A6 + B6, not A6 or B6 alone.

Three warning signs that your state is incomplete

1. The condition is asymmetric. If appending one symbol is sometimes legal and sometimes not, a single state is probably too coarse. The no-11 condition is the simplest example: a 1 is legal after 0 but not after 1.

2. The next choice depends on more than one previous item. If the rule forbids a pattern of length three, such as 101, knowing only the last symbol is not enough. You need a state that records the relevant suffix, or you need to redefine the states so the forbidden pattern can be detected.

3. You are splitting by an ending pattern but forgetting to add the classes back. State counts are usually components of a total. Students sometimes compute the number ending in 0 and report it as the answer, or add a state twice because two labels describe overlapping sets. The state definitions must be disjoint and exhaustive for the objects being counted. This is the same counting discipline discussed in the AIME Inclusion-Exclusion: Count Overlaps Without Overcounting and the AIME Counting With Symmetry: When Dividing by the Number of Rotations Fails: before dividing, adding, or applying a formula, define the sets precisely.

How this fits AIME combinatorics preparation

A Hanlin Course WeChat article, “2027 AIME Qualification Moves to Fixed Cutoffs: Preparation Planning and a High-Energy Trial Class” (2026-11-04), reports the Hanlin teaching team’s judgment that AIME combinatorics calls for recursive methods and advanced combinatorial identities such as Vandermonde, and recommends targeted practice. That is a coaching analysis, not an official syllabus. Its practical value is that recursion and identities are not replacements for state design; they are tools applied after the counted objects and transitions are defined.

A separate Hanlin Course WeChat note, “Important Notice: Domestic AIME Mathematics Exam Arrangements Confirmed,” recommends classified AIME past-paper practice for students who already have AMC/AIME preparation and are targeting an AIME score of 8–10, with targeted work in number theory and combinatorics because the note describes those modules as common weak areas for Chinese students. That is a preparation recommendation, not a rule about what every AIME will contain. For combinatorics, classified practice is most useful when each attempt is annotated with the state definition, the transition rule, and the first place the count stopped matching a hand check.

The 2027 MAA invitational-competitions page is the current official reference for the AIME’s integer-answer format; this article does not infer regional booking routes or selection rules from it. The technique here is independent of any one paper: it is a way to make a counting attempt auditable.

A 20-minute practice protocol

Use one small counting problem, not a full timed set, and work in this order:

  • Minutes 0–4: Write the object definition. State the alphabet, the length, and the forbidden pattern in your own words. Do not begin with a recurrence.
  • Minutes 4–8: Name states by the information that controls the next move. For the no-11 example, the controlling information is the last symbol. For a longer forbidden pattern, choose the shortest suffix that determines legality.
  • Minutes 8–12: Fill the four-column table. Write each allowed transition and the count symbol it feeds. If a transition is not allowed, say why in words.
  • Minutes 12–16: Hand-count n = 1, 2, and 3. Compare with the table. If they disagree, fix the state or transition before doing algebra.
  • Minutes 16–20: Write the recurrence and compute one more value. Then check whether the recurrence’s structure matches the table’s transitions. Do not trust a formula that has not survived the small cases.

This protocol is deliberately slower than pattern-matching at the start. Its advantage is that it localizes failure. When an answer is wrong, you can ask whether the error began in the state definition, the transition rule, the initial conditions, or the arithmetic. That diagnosis is more useful than redoing the whole problem from the top.

Preparing for a course-fit or diagnostic conversation

If you are considering a diagnostic session or a combinatorics course, bring one counting attempt rather than a list of topics. Include your state table, your first three hand-checked values, and a note on where the transition stopped matching the actual objects. A coach can then distinguish a state-definition problem from a recurrence-execution problem. That is more actionable than a general request for “harder combinatorics.”

Ask for classified practice only if you can name the error type you need to fix: missing ending state, invalid transition, wrong initial condition, or overcount when adding classes. Not every student needs the same drill. The state-table habit is the common foundation; the next step depends on which column of the table broke.

General event background is available at Event background.

Build the diagnostic table

Frequently Asked Questions

Is a state table necessary if I already know a Fibonacci-like recurrence?

Not always necessary, but it justifies when the recurrence applies. For no consecutive 1s, the table splits strings by their last symbol and produces the correct transitions. If the restriction is asymmetric, a one-state recurrence is usually unsafe.

Does this article use real AIME problems?

No. The length-6 binary-string problem is an original teaching illustration, not an official contest problem. It is designed to show state definition, transition checking, and initial conditions; use authorized past papers for actual AIME practice.

What should I bring to an AIME combinatorics diagnostic?

Bring one timed or untimed counting attempt, including your state table, your first three hand-checked values, and a note on where the count stopped matching. That lets a coach identify whether the error is in state definition, transition, initial conditions, or arithmetic.

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