AIME Need-To-Know
AIME Need-To-Know
1 Introduction
Like every year when the AIME comes around, people begin to agonize over details: what should I guess on
#15? Should I bring a granola bar or a water bottle? Will the USAMO cutoff be 211 or 211.5? Others more
wisely decide to spend their time preparing for the impending doomsday, leading to the constant refrain of the
AoPS forums: what should I do in the last [length of time] to prepare for AIME? Should I take my 45th practice
test? Study Combinatorical Nullstellensatz? Read every prime numbered chapter in AoPS volume 2?
The purpose of this document is to provide an answer to the important question: what should I study to
prepare for AIME? It is, of course, impossible to create a comprehensive list of every detail that might appear
on an AIME, but I would personally be rather surprised if most of the concepts on the AIME test were not, at
least in spirit, present on thi slisting. Please note that this document is not intended to teach all the concepts
that may appear on the AIME - indeed, such an endeavor would require several volumes. Instead the intention
is to provide two things: a starting point for additional study, and a reference that can be utilized to decide
what to work on.
As per usual, the (mathematical) material has been split into the four major subjects: Algebra, Combina-
torics, Number Theory, and Geometry. The tips and strategies suggested should not, however, be considered
exclusive to the subject in which they appear; with many problems being interdisciplinary and the lines be-
tween subjects being blurred, a line in the Combinatorics section may well find greater use on a problem that
is objectively categorized under Algebra. Within each subject, the material is intended to increase in difficulty,
beginning with basic tips applicable to the opening problems and concluding with material that is advanced
even for the end of the test. To more easily distinguish between the two, some of the later sections are marked
with stars. They denote sections that, while well worth study, are likely to be impractical for the AIME exam
and whose use will be limited to the last few problems.
Again, I wish to reiterate that this is intended as a starting point only. In some sections, the concept is
given a brief explanation, done for one of three reasons: either because it is not feasible to understand the later
results without first having a overview of the earlier ones, because examples illustrate the concept better than
a description can, or because the current literature is lacking and further self-study may prove difficult without
an appropriate background. Where they appear, however, they should not generally be considered sufficient to
have learned the concept - such mastery comes from working on related problems and reading more detailed
treatments.
I have also taken what seems to be a relatively unique approach - after detailing a concept, I have added a
brief note detailing the motivations and the cues for its use. It is quite suprising to me that this approach has
not found a great deal of use, as it seems that an overview of concepts is dramatically incomplete without an
explanation of their functions. My hope is that this approach will catch on in future documents similar to this
one.
Lastly, this work is still a rough draft - in “beta”, so to speak - and I hope to improve it in the future.
Specifically, one major short-term goal is to associate practice problems with the concepts and strategies laid
out here, so that even if left unsolved, the reader might gain a better understanding of what problem cues
suggest a certain methodology. It is also possible, if not likely, that this article contains errors - while I hope
that such errors are limited to typographical ones, it is possible that some of the mathematics requires revision
as well. If you notice any such mistakes, please let me know as soon as possible. Finally, if you have any
suggestions for how to improve this document, including the addition of concepts currently left omitted, please
let me know!
I hope that you find this useful, and wish you good luck on the upcoming AIME!
BOGTRO AIME “Study guide” 2 GENERAL
2 General
• Basic testing tips
– Know your goal! If you know you’re not going to be happy with anything lower than 15, you need to
adjust your strategy to focus more on the later questions. If, like many others, your goal is to make
USA(J)MO, then make sure you know what you’re looking for going in. The USA(J)MO cutoffs are
usually between 210 and 215, which means most of you will be coming in looking for an 8 to 10.
– If that’s you, you’ll want to focus mainly on the first 10 problems. This is hardly a glamorous
strategy, but if you can check over and over and over again to really make sure you’ve gotten the
first 8-9 right, the rest is about picking off the easy ones in the last half of the test. Focusing on 1-10
and whichever of the last 5 you can do fairly quickly is probably your best bet towards olympiad
qualification.
– Some of you will be taking the AIME for the first or second time, with no olympiad dreams in mind.
In that case you should be realistic about your expectations: while you certainly shouldn’t ignore
the back half of the test or be intimidated by the high question numbers, your main focus will be on
problems 1-7. Adjust accordingly.
– 3 hours may sound like a long time, but it’s easy to let that time fly by while getting sucked into a
wrong approach. Don’t be afraid to abandon a problem if you’re not making serious progress - take
another look in half an hour or so, when you’ve cleared your head a bit and got yourself going again.
• Avoiding stupid mistakes
– When I’m asked for AIME advice, my favorite thing to say is “make sure you get points for the
problems you solve!”. Once you figure out the solution to a problem, you’ve only won half the battle
- you still have to make sure you see it through to the correct answer. A lot can happen between the
correct flash of inspiration and the various computations that go into the final process, so make sure
you stay alert throughout the whole process.
– If you define auxiliary variables, scale a diagram up to avoid fractions, or anything else that might
cause you to write down a number that isn’t the final answer you meant, write a VERY LARGE
note at the top of your paper detailing it. For example, if you write k = n − 42, write a rather large
note to yourself to add 42 at the end. It may seem like you’ll remember, but after the computation’s
done and you want to get to the next problem as soon as possible, it’s very easy to make these kinds
of errors.
– Keep your work organized! 3 hours is plenty of time for you to come back and check your work, and
it will be much easier to catch any mistakes you made if you can follow it. It’s a good idea to keep
work for a problem in its own self-contained box, if not its own page, and you might even want to
outline your solution at the end for when you come back later.
– Write out all nontrivial computations explicitly. Yes, everybody knows you can do 42 · 16 in your
head, but when you get 684, it will be much easier to find your mistake if you’ve written 42 · 16 =
420 + 42 · 6 = 420 + 264 = 684 than if you didn’t write anything at all.
– And, of course, READ THE PROBLEM CAREFULLY! Reading each problem twice before you do
any work on it will help to cut down your reading errors significantly. It may also help you to circle
key points of the problem, such as the final answer they’re looking for or anything else that you think
might confuse you later on (for example, if you see “compute m” on your first read-through, it will
help you to circle it for when you’ve finished the problem and are panicing because m + n is too big).
• Problem ordering
– Every year, there’s almost always at least one problem in the last 5 that actually turns out to be
rather easy, and there’s almost always a problem within the first 7 or so that actually turns out
to be really difficult (or at least annoying). Don’t be afraid to temporarily concede a problem just
because it’s placed early, and don’t be afraid to take a crack at a harder problem you think can do
just because it’s a #13. In 2009 I scored a 5: problems 1, 2, 3, 4, and 13.
– That said, you almost certainly want to be working on the problems in order - at least for the first
half of the test. After you’ve finished 5-7 problems or so, then you can take a more detailed look
around and see which problems you think you can do.
– Keep in mind that the problems that look the hardest usually are more notational messes than
actually hard, and the ones that seem the simplest are usually the most difficult to solve. This may
sound paradoxical, but it actually makes quite a bit of sense - if you’re given little information in a
problem, it will seem very simply stated, but it will be difficult to work with.
BOGTRO AIME “Study guide” 3 ALGEBRA
3 Algebra
• General
– Be explicit about assigning your variables. Writing a note to yourself at the beginning of your work
such as “x=Bob’s speed, t=time for Alice to finish first leg” may save you a headache later on.
– When you have a word problem, the first thing to do is to convert it into equations - keeping the
first point in mind!
– Before diving into complicated algebra, take a minute or two to see if there’s a simpler method. If
you don’t see one, feel free to bash away, but there’s often a nice simplification you can make right
away.
– Keep looking for better methods throughout your algebra - it might take you a few steps to notice
the key insight, and even if there isn’t any key insight to be had, there are still often little tricks you
can perform to make your life a bit easier.
• Solving equations
– Watch out for extraneous solutions. If you’re doing anything non-reversible, such as squaring, check
your solutions at the end.
– Also watch out for division by expressions that could possibly be 0. Usually you want to factor rather
than divide - e.g. write a2 = ab as a(a − b) = 0 instead of dividing through by a.
3 · 22 · 53
– Don’t multiply out big constants until you have to; you’re far more likely to recognize
7 · 11 · 53
3498
simplifies than you are to notice does.
4081
• Useful factorizations
• Substitutions:
– Always consider swapping in different variables to make things easier; even auxilary variables like
y = x − 42 can simplify your algebra a bit.
– Use substitutions to clear out fractions or nasty radicals - work with integers whenever possible
– If you get an equation in terms of, for example, x + y and x − y, consider writing x − y = n, solving
for x + y in terms of n, and then expressing both x and y in terms of n - this essentially reduces the
number of variables.
• Sequences/series: a1 , a2 , a3 , . . . , an
a1 + an
– Arithmetic: kth term a1 + (k − 1)d where d is the common difference, sum n · .
2
– Tip: When working with arithmetic sequences, it’s often better to write them as ..., a−2r, a−r, a, a+
r, a + 2r, ... instead of a, a + r, . . ..
a(1 − rn )
– Geometric: kth term a1 ·rk−1 where r is the common ratio, sum (when |r| < 1 and n → ∞,
1−r
a
this becomes ).
1−r
– General strategy for other series (e.g. arithmetico-geometric): Write the sum as S and multiply by
the common ratio, e.g. S = r + 2r2 + 3r3 + . . . =⇒ rS = r2 + 2r3 + . . . =⇒ S − rs = r + r2 + r3 + . . .,
causing reduction to to a geometric series.
a1 a2 . . . an 135 5
– 0.a1 a2 . . . an = ; e.g. 0.135 = =
10n − 1 999 37
– When given a sequence with a seemingly arbitrary rule (e.g. an = an−1 − an−2 ), list out the first few
terms to see if there’s a pattern you can prove.
BOGTRO AIME “Study guide” 3 ALGEBRA
– Telescoping: If you can manage to write a sequence in a form similar to an = bn − bn−1 (for some
1 1 1
sequence bn ) - for example, = − - try adding up the terms from a1 to an for heavy
n(n + 1) n n+1
cancellation:
1 1 1 1 1 1 1 1 1 n−1
+ + ... + = − + − + ... + − =
1·2 2·3 n(n − 1) 1 2 2 3 n−1 n n
• Trigonometry
π π
– Know common trig values! Have cos θ, sin θ memorized for , |θ
6 4
– Sum/difference: sin(α±β) = sin α cos β±sin β cos α, cos(α±β) = cos α cos β∓sin α sin β, tan(α±β) =
tan α ± tan β
1 ∓ tan α tan β
– Useful: eiθ = cos θ + i sin θ - can use to rederive above (eα+β = eα · eβ )
α+β α−β α+β α−β
– Sum-to-product: sin α + sin β = 2 sin cos - derive using sin + +
2 2 2 2
α+β α−β
sin − (analogous formulas for cos follow similarly)
2 2
– Double-angle: sin(2θ) = 2 sin θ cos θ, cos(2θ) = cos2 θ − sin2 θ = 2 cos2 θ − 1 = 1 − 2 sin2 θ (special
case of sum/difference above)
– Trig substitutions: Be on the lookout for conditions like a2 + b2 = r2 - this usually suggests sub-
stituting a = r cos θ, b = r sin θ (especially if r = 1). Similarly, sequences like an = 2a2n−1 − 1 or
am + an
am+n = suggest representing a1 as the appropriate trig function (cosine and tangent in
1 − am an
these examples).
• Inequalities - a1 , a2 , . . . , an , b1 , b2 , . . . , bn positive reals:
– Trivial: x2 ≥ 0 for real x
– QM-AM-GM-HM:
r
a21 + a22 + . . . + a2n a1 + a2 + . . . + an √ n
≥ ≥ n a1 a2 . . . an ≥
n n 1 1 1
+ + ... +
a1 a2 an
r
k k k
k a1 + a2 + . . . + an
– More generally: Define pk = (with p0 the geometric mean) - then a ≥ b =⇒
n
pa ≥ pb (the above is equivalent to p2 ≥ p1 ≥ p0 ≥ p−1 )
Equality occurs at a1 = a2 = . . . = an
– Cauchy-Schwartz:
(a21 + a22 + . . . + a2n )(b21 + b22 + . . . + b2n ) ≥ (a1 b1 + a2 b2 + . . . + an bn )2
a1 a2 an
Equality occurs at = = ... = .
b1 b2 bn
– Rearrangement: Suppose a1 ≥ a2 ≥ . . . ≥ an and b1 ≥ b2 ≥ . . . ≥ bn , and φ is a permutation of the
bi . Then
a1 b1 + a2 b2 + . . . + an bn ≥ a1 bφ(1) + a2 bφ(2) + . . . + an bφ(n) ≥ a1 bn + a2 bn−1 + . . . + an b1
(In other words, choose greedily)
• Roots of unity: rn = 1
– Recall eiθ = cos θ + i sin θ - important here
2nπi
2nπ 2nπ
– r = e k = cos + i sin for k = 1, 2, . . . , n.
k k
– rn − 1 =⇒ (r − 1)(rn−1 + rn−2 + . . . + 1) = 0 =⇒ rn−1 + rn−2 + . . . + 1 = 0, as long as r 6= 1. For
example, if ω is a third root of unity, ω 2 + ω + 1 = 0.
– Consider cos and sin as the real/imaginary parts (respectively) of a root of unity - this will help you
find sums such as
◦ ◦
179
X 179
X kπi
cos(2k) = Re e 90
k=0◦ k=0◦
◦ !
179
kπi
X
= Re e 90
k=0◦
πi
1(1 − (e 90 )180 )
which is now the real part of a geometric series equal to πi = 0.
1 − e 90
BOGTRO AIME “Study guide” 3 ALGEBRA
4 Combinatorics
• General
– Many early Combinatorics problems are about good bookkeeping: making sure you’ve accounted for
all of the cases, that you’ve counted everyone the appropriate number of times, and so on. Be sure
to work deliberately on these, and constantly be checking to make sure you’ve done so.
– Combo is the biggest source of the “ugh, I was off by one” regrets that flood the forums immediately
upon unlocking. Make sure this isn’t you! Check the bounds in the problem, make notes of < vs. ≤
and similar such things, and take a minute at the end of your solution to ask yourself if everything
works out. Checking the extreme points (usually the smallest and/or largest solutions) can also go
a long way towards avoiding this.
– Don’t forget cases where you “do nothing” - it is for this reason that 0! = 1, and similarly why a0 = 1
in many recursions rather than a0 = 0.
• The basics
– Generally, when you need to do things like “draw k marbles” or “form a committee”, it’s best to
look at it like you’re doing things one at a time. For example, instead of selecting 5 people to form
a committee, look at the first person and think about what happens if he goes in the committee and
what happens if he doesn’t.
– Don’t forget about complimentary counting! It’s often easier to count what you don’t want and
subtract it off from the total number of possibilities than to work constructively. For example, how
many four-digit numbers don’t contain a 1?
– The principle of inclusion-exclusion (PIE) is powerful, but the important thing is to know what
you’re trying to do: PIE works because it counts every possbility exactly once with strategic count-
ing and overcounting. Keeping track of how many times you’re counting something will help you
solve problems where PIE isn’t directly applicable, e.g. “how many have exactly two of the three
characteristics”?
• Changing perspective
– In problems where we have to account for rotations and/or reflections, it’s often simplest to fix one
of the points - effectively looking at the entire situation from its perspective (if you’re standing at
a round table, and the whole room suddenly rotates, the situation looks exactly the same to you as
before).
– The same strategy of “fixing” points applies in other places as well - if you need to choose one of 9
numbers in a set, for example, and which one you choose doesn’t make a difference, just abitrarily
pick one and remember to multiply by 9 at the end.
– Additionally, in problems where there’s a lot going on - for example, the sum of all positive differences
of two elements in some set - a good strategy is to focus on one particular element and see how its
affected. For example, in the AIME problem below, focusing on what happens to each specific
element quickly results in a solution.
– Let S = {20 , 21 , . . . , 210 }. Consider all possible positive differences of pairs of elements in S. Let N
be the sum of all those differences. Find the remainder when N is divided by 1000.
• Combinations/Permutations
n n!
– There are = ways to choose k members from a set of n objects, if we don’t care
k k!(n − k)!
n
about the order (formally: there are subsets of S, where |S| = n, of cardinality k. There are
k
n!
n Pk = ways to choose the k members if order does matter. These are both 0 by convention
(n − k)!
if n < k.
n n
– Know basic binomial-coefficient rules: = (choosing a subset is equivalent to choosing
k n−k
n n−1 n−1
its complement), = + (we can either put the first element in our subset or
k k−1 k
not), etc.
BOGTRO AIME “Study guide” 4 COMBINATORICS
n
– Know small common values of binomial coefficients; you should probably know the values of
k
10
up through or so from experience by now.
5
• Symmetry
– Always look to exploit symmetry! If you’re looking for the probability of something, and its comple-
1
ment is the exact same scenario, you immediately know the answer is without any work.
2
– Be careful for cases where there’s equality however - depending on the problem, you may have to
handle it different.
– A simple example: Suppose you flip a coin 4 times. What is the probability that you get more heads
than tails?
– Solution: The probability of getting more heads than tails is symmetrically equal to the probability
1
of getting more tails than heads... but the answer isn’t immediately because we need to account
2
3
for the case where the numbers of heads and tails are equal. That probability is , so our answer is
8
3
1−
in fact 8 = 5 . Note that if there were an odd number of coins, the answer would indeed be
2 16
1
exactly .
2
– Take also the classic: Alice flips n + 1 coins and Bob flips n coins. What is the probability that
Alice gets more heads than Bob? Well, consider the first coin Alice flips. If it’s heads, she just needs
1+p
to get at least as many heads as Bob gets, which has a chance of happening where p is the
2
probability of them getting the same number of heads among their n coins. If it’s instead tails, now
1−p
she needs to get more heads than Bob, which has a chance of happening. The answer is then
2
1 1+p 1−p 1
+ = !
2 2 2 2
• Stars-and-bars or Balls-and-urns
n+k−1
– If a1 , a2 , . . . , ak are nonnegative integers satisfying a1 + a2 + . . . + ak = n, there are
k − 1
n−1
possible assignments of the ai . If the ai are necessarily positive integers, there are possible
k−1
assignments.
Proof: Consider n stars and k − 1 bars being arranged - the number of stars between each bar
(counting the start and end of the string as bars) determine one of the ai . In the positive case,
consider n − k of the stars instead and add one in to each group after the assignment.
– If instead a1 + a2 + . . . + ak ≤ n, we can
addanother variable ak+1 = n − a1 − a2 − . . . − ak to get
n+k
a1 + a2 + . . . + ak+1 = n, which has solutions. Incidentally, this proves the Hockey Stick
k
identity.
– Clever applications of this usually involve looking at the gaps between things we’re placing down.
For example, how many ways can we park two indistinguishable cars in a row of 12 parking spaces,
if they both take up 3 spaces? We can look at the gaps between the start and the first car, the gap
between the cars, and the gap between the last car andthe
end (each of which might be zero), which
8
total 6 spaces - hence a1 + a2 + a3 = 6 and there are = 28 possible assignments.
2
• Binary
– Be on the lookout for conversions to other bases, especially binary!
– Whenever you see a lot of powers come up, whether explicitly or implied, consider looking at it in
other bases.
– Functions satisfying things such as f (2x) = f (x) are prime candidates for a binary interpretation,
especially if you see something like f (2x + 1) = f (x) + 1 to go along with it.
BOGTRO AIME “Study guide” 4 COMBINATORICS
– One famous example is “A function satisfies f (0) = 0, f (2x) = f (x), f (2x + 1) = f (x) + 1 for all
nonnegative x. What is the maximum possible value of x on the interval [0, 2015]? The solution
here is that f (x) is counting the number of 1s in xs binary representation, making the answer 10 (as
10232 has 10 1s).
• Invariants
– Whenever you’re generating a sequence, moving around a plane, or lopping off hydra heads, look for
what doesn’t change. For example, take the classic:
– Heracles wishes to kill the 100-headed hydra. He can only slice off exactly 2, 4, or 10 heads with one
blow, but the hydra will grow back 5, 1, and 4 heads in those respective cases. Can Heracles ever
kill the hydra? The answer is no, because the number of heads always changes by a multiple of 3,
meaning it will always have a positive number of heads.
– Similarly, if a robot can move from the point (x, y) to the points (x+7, y+2), (x+2, y+7), (x−5, x−10),
or (x − 10, y − 5), note that there are two important invariants: the sum x + y remains constant
modulo 3, and the difference y − x remains constant modulo 5.
The rest of the combinatorics section gets pretty advanced - feel free to skip this material if you don’t feel
confident tackling the later 5 questions yet.
• ”States”
– This concept is a somewhat difficult one to verbalize, but is also one of the most important (encom-
passing both recursion and expected value). So pay attention!
– The general idea is to view situations as ”states”, and actions as passing between them. This sounds
vague, so we’ll illustrate with a simple example:
– Alice and Bob alternately flip a coin. The winner is the player who first flips heads. What is the
probability Alice wins?
The canonical way of solving this problem involves writing out an infinite geometric series, but this
doesn’t scale well to harder problems and is error-prone anyway. Instead we have a much better (and
1
generalizable) method using the concept of states. Suppose p is the desired probability. There is a
2
1
chance that Alice wins on her first turn, and a chance that we pass to the state of it being Bob’s
2
turn. From the state of Bob’s turn, there is a probability of p that he wins - meaning there’s a 1 − p
chance of Alice winning from this state.
1 1 2
– As a result, we can write p = (1) + (1 − p) =⇒ p = .
2 2 3
– The key is to account for all possible states, which was easy in this case as there were only two - it
was Alice’s turn, or it was Bob’s turn - and to account for how we pass between those states. Let’s
see a slightly more difficult example:
– Alice and Bob continuously roll a die. Alice wins when a sum of 12 appears, and Bob wins when two
consecutive sums of 7 appear. What is the probability Alice wins?
We enumerate the states beforehand: Either the previous roll was neither a 7 nor a 12 or the previous
roll was a 7 (or, of course, the game is over). Denote the probability that Alice wins from these states
to be p0 and p7 respectively. From the first state, we can either roll a 12 - immediately ending the
game in Alice’s favor, roll a 7 thus moving to the p7 state, or roll something else - thus staying in
the same state. As a result, we have the equation
1 1 29
p0 = p7 + (1) + p0
6 36 36
1 1
From the p7 state, there’s a chance that we roll a 7, thus ending the game in Bob’s favor, a
6 36
29
chance of rolling a 12, thus ending the game in Alice’s favor, and a chance of rolling something
36
else, thus bringing us back to p0 . As a result, we have
1 1 29
p7 = (0) + (1) + p0
6 36 36
7
solving these equations gives us p0 = , which is what we want as the game starts from the p0
13
position.
BOGTRO AIME “Study guide” 4 COMBINATORICS
• Recursion
– Recursion is a very special case of the ”states” concept above, where we only care about passing to
smaller states.
– Tip-offs to use recursion: We’re building something iteratively, such as a string; we’re representing
some number as a sum or product of others (e.g. writing n as the sum of powers of two); people are
rearranging themselves in some manner; we’re looking for some subset of a larger set with a certain
property; etc.
– These all boil down to the same thing: if we can remove a couple chairs/people/stairs/etc. and
end up with essentially the same problem (just different numbers), the solution is almost certainly
recursion.
– If we have a linear recurrence an = cn−1 an−1 + cn−2 an−2 + . . . + c0 a0 where the ci are constants
(possibly zero), then we can find the roots r1 , r2 , . . . , rk of xn − cn−1 xn−1 − . . . − c0 = 0, and the
general solution to the recurrance will be b1 r1n + b2 r2n + . . . + bk rkn for some appropriate constants bi
(there are caveats with double roots, but they don’t come up very often). For example, suppose we
have an = an−1 + 2an−2 . Then the roots of x2 − x − 2 = 0 are 2 and −1, so the general solution is
c1 · 2n + c2 · (−1)n for some constants c1 , c2 (we’d need to know some values of ai , such as a0 and a1 ,
to determine them).
– Don’t be shy about using multiple co-dependent recurrances. It can be easier to work with things
such as an = an−1 +bn−1 , bn = bn−1 +cn−1 , cn = an−1 +cn−1 than whatever single-variable recurrance
this solves to.
– For example, how many sequences of As and Bs have the property that every run of As has even
length and every row of Bs has odd length? Well, let An denote the number of such sequences that
begin with A and denote Bn similarly; then An = An−2 + Bn−2 and Bn = An−1 + Bn−2 . Note that
we can ”reduce” this to F (n) = 2F (n − 2) + F (n − 3) − F (n − 4) were we so inclined, but this is
unlikely to be particularly helpful (since the characteric polynomial is a mess).
– If you’re working with a circle (which has become very common lately), break it into a line first by
considering one specific chair/person/etc. and work from there - lines are much nicer to work with
than circles!
• Expected value
– This is the more interesting version of the states concept, and can be thought of as a generalized
recursion.
– The trick here is exactly the same as how we handled the ”states” problems: focus on the possible
states and how we pass through them. Instead of the base cases being probabilities though, now
they’re expected values.
– An illustrative example: What is the expected number of flips before we flip two consecutive heads?
There are only two states here: we just flipped a tail, or we just flipped a head (of course, there is
the usual state of ”game over”). Call the expected number of flips from the tail state ET , and the
expected number of flips from the head state EH . We then have the following relationships (make
sure you see why):
1 1
ET = (ET + 1) + (EH + 1)
2 2
1 1
EH = (ET + 1) + (1)
2 2
which solves to ET = 6, our answer as the starting position is equivalent to ET .
• Roots of unity filter (*)
– Given a polynomial P (x), the sum of the coefficients to the terms with degree divisible by k is given
by
1
P (ω 0 ) + P (ω 1 ) + . . . + P (ω)k−1
k
where ω denotes a primitive kth root of unity.
– The above may look scary, but the principle isn’t actually that complicated. How would we, for
example, find the sum of the coefficients to the terms with even degree? The method for that is
P (1) + P (−1)
well-known: we want , as all the terms with odd degree cancel out in the sum. The
2
general method takes advantage of the fact that 1 + ω + ω 2 + . . . + ω k−1 = 0 unless ω = 1, which
occurs precisely when the term has degree divisible by k!
BOGTRO AIME “Study guide” 4 COMBINATORICS
2013 2013 2013
– One application: find + + ... + .
0 3 2013
Solution: Let P (x) = (x + 1)2013 . Then
– Generating functions are about modeling situations with polynomials. For obvious reasons, we often
combine this with the roots of unity filter above.
– Generating functions are most useful when we’re moving about, by which we literally mean moving
about. For example, we can model walking on a number line with a generating function, as well as
around a polygon, a circle, and so on. We can also, with a bit of creativity, extend this concept to
things like rolling dice, building numbers (such as partitions), and so on. In fact, this is quite similar
to the ”states” concept as well.
– Let’s take an illustrative example - a rather famous one, in fact. Suppose we want to travel from
(0, 0) to (m, n) using a sequence of moves, each of which are either one unit up or one unit to the
right. In how many ways is this possible? Well, let’s look at one particular move: we can either
increase our x coordinate or increase our y coordinate - this is equivalent to multiplying by x + y! If
we do this m + n times, we can model the situation with the generating function (x + y)m+n .
a b
– The coefficient
of the
x y term is thus the number of paths to get from (0, 0) to (a, b); this makes
m+n
our answer by the Binomial Theorem.
m
– The key here is that, when two moves are modeled by generating functions G1 (x), G2 (x), we can
model the two steps with G1 (x)G2 (x).
– For example, one roll of a die can be modeled by the function x1 + x2 + x3 + x4 + x5 + x6 , one random
move on a number line can be modeled by the function x1 + x−1 , one random diagonal move on a
1 1
plane by x + + y + , and so on.
x y
BOGTRO AIME “Study guide” 5 NUMBER THEORY
5 Number Theory
• General
– Like in Algebra, the first step is usually to convert a word problem into equations. But here, it’s even
more important to choose your variables wisely: do we want to let x be an odd integer, or write it
as 2k + 1? The choices here are less clear and largely depend on the problem, but make sure you’re
at least conscious of your options.
– Remember that you’re dealing with integers. If there’s any possibility that your variables aren’t
integers, it probably isn’t actually a number theory problem. This is a blessing!
– One of the most basic things you can do is look at parity (odd or even). It’s usually easy to do, and
it can often reveal a lot about a problem!
• Divisibility rules
– Know the basics: a number is a multiple of 2 iff its last digit is, a multiple of 3 or 9 if the sum of its
digits is, a multiple of 4 if its last two digits is, a multiple of 5 if its last digit is, and a multiple of 11
if the alternating sum of its digits is.
– Keep in mind that both sides of an equality must be divisible by the same numbers. This sounds
obvious, but if you have something like 3b3 = 2a2 , it means that a must be a multiple of 3 and b
must be a multiple of 2 (and, repeating this process, a a multiple of 18 and b a multiple of 6).
– When looking for divisibility, try breaking up your number into smaller, relatively prime parts. For
example, divisibility by 10 is the same thing as divisibility by 2 and 5; similarly, divisibility by 1001
is equivalent to divisibility by 7, 11, and 13.
– A note of warning in the above: Don’t make the mistake of saying a | n, b | n =⇒ ab | n - this only
holds when a, b are relatively prime!
• Prime factorization
– In a lot of cases, the first thing you want to do is to consider the prime factorizations of numbers.
– We can interpret multiples and divisors more easily in terms of prime factorization: b is a multiple of
a (and a a divisor of b) if, for every prime p dividing a, the exponent of p in b is at least the exponent
of p in a. For example, 288 · 592 is a multiple of 1088 = 288 · 588 , but 299 · 587 is not.
– It’s also much easier to notice cancellations when working with prime factors - you’ll notice 17 should
be canceled out in 2 · 13 · 17n = 11 · 17 · 23m easily, but not so much in 442n = 4301m.
– A basic but effective method of prime factorizing numbers: start with 2, and divide your number by
2 as many times as you can (possibly not at all). Move on to 3, then 5, then 7, and so on. You can
stop when the number you’re trying to divide by is more than the square root of the number you’re
trying to divide, because otherwise you would have already found your answer.
– For example, prime factorizing 22176 might seem difficult, but let’s go through our method: 22176 =
2 · 11088 = 22 · 5544 = 23 · 2772 = 24 · 1386 = 25 · 693 - now we move on to 3 - = 25 · 3 · 231 = 25 · 32 · 77
- now to 5, which doesn’t work, so on to 7 - = 25 · 32 · 7 · 11 - and we’re done (you might have noticed
the factor of 11 much earlier, such as at 11088).
• Difference of squares, completing the square, and SFFT
– One of the simplest ways to solve Diophantines (equations with integer solutions) is to write a product
of numbers equal to a constant, allowing us to analyze its factors. For example, if ab = 80, we know
that a must be a factor of 80.
– One common usage of this is difference of squares. If we know two squares differ by 80, we can
write a2 = b2 + 80 =⇒ a2 − b2 = 80 =⇒ (a − b)(a + b) = 80. Additionally, we might as well
assume b is positive, so a − b < a + b. This means we only have a few factor pairs to check, which
we can reduce even further since a − b, a + b are of the same parity. Hence we’d only need to check
(2, 40), (4, 20), (8, 10), leading to the solutions 92 = 12 + 80, 122 = 82 + 80, 212 = 192 + 80.
– Oftentimes this isn’t written out so plainly for us: in those cases we complete the square instead.
For example, if a2 + 84a + 2008 = b2 , we have (a + 42)2 + 254 = b2 , so letting c = a + 42 we have
(b − c)(b + c) = 244 =⇒ b − c = 2, b + c = 122 =⇒ b = 62, a = 16.
– In some cases, instead of completing the square, we complete the rectangle - better known as Simon’s
Favorite Favoring Trick (SFFT). When we have an equation such as xy + 6x + 6y = 0, we can write
this as xy + 6x + 6y + 36 = 0 =⇒ (x + 6)(y + 6) = 36, leading to the various solutions. These often
1 1
arise as a result of equations like + = 4.
x y
BOGTRO AIME “Study guide” 5 NUMBER THEORY
– Know basic modular rules: if a1 ≡ b1 (mod c) and a2 ≡ b2 (mod c), then a1 + a2 ≡ b1 + b2 (mod c),
a1 a2 ≡ b1 b2 (mod c), etc.
– Corollary: an ≡ (a (mod m))n (mod m).
– You can use modular arithmetic to reduce your search space when solving Diophantines. For example,
if you want the number of [positive integer] solutions to 2a + 5b = 2013, you know 2a ≡ 3 (mod 5),
so a ≡ 4 (mod 5) (and a < 1006), meaning there are 201 solutions (alternatively, b must be odd
leading to the same result).
– Chinese Remainder Theorem (CRT): Given a set of linear congruences x ≡ b1 (mod m1 ), x ≡ b2
(mod m2 ), . . . , x ≡ bn (mod mn ), there either exists no solution (due to contradictory things such
as x ≡ 1 (mod 2), x ≡ 2 (mod 4)) or there exists a unique r such that x ≡ r (mod M ), where M is
the least common multiple of m1 , m2 , . . . , mn .
– Power residues: There are only so many possible residues that can be expressed as a square in some
modulus - for example, there is no n for which n2 ≡ 2 (mod 3). In a modulus m, we only need
to check 12 , 22 , . . . , (m − 1)2 (0, of course, is always a residue) - and, in fact, since 1 ≡ −(m − 1)
(mod m), we only need to check half of these.
– Some excellent moduli to work with when analyzing Diophantines involving squares are 3 and 4 - in
both these moduli, the only quadratic residues are 0 and 1. This immediately tells us, for example,
that x2 − y 2 ≡ 2 (mod 4) has no solutions. 8 is also an excellent modulus to use, particularly because
all odd squares are 1 (mod 4). For cubes, checking modulo 9 is usually a good start, since the only
cubic residues are −1, 0, 1.
Repeating this gives us (a, b) = (a (mod b), b) = (a, b (mod a)). Repeat until termination. For
example, (16, 56) = (16, 56 (mod 16)) = (16, 8) = (16 (mod 8), 8) = (0, 8) =⇒ (16, 56) = 8. If
(a, b) = 1, we say a, b are relatively prime.
– How many a < n are there for which (a, n) = 1? We go about this using a counting strategy: PIE.
n
Suppose p divides n - then a = p, 2p, . . . don’t satisfy (a, n) = 1. There are − 1 of those. Similarly,
p
we can do this for all the primes, and account for our overcounting using PIE.
1 1 1
– The phi function: if n = pe11 pe22 . . . pekk , we have φ(n) = n 1 − 1− ... 1 − . For
p1 p2 pk
1 4
example, φ(1000) = 1000 · · = 400.
2 5
n
– Example: For how many 0 < n < 500 is in lowest terms? Solution: We need (n, 1000−n) =
1000 − n
1, which by the Euclidean algorithm is equivalent to (n, 1000) = 1. There are φ(1000) = 400 such n
less than 1000, exactly half of which are less than 500 (because if k works, so does 1000 − k), making
our answer 200.
– A second warning: Be very careful about applying this theorem to p = 2! If 4 | a − b then the
theorem works as expected, but otherwise we have to introduce a second version: v2 (an − bn ) =
v2 (a − b) + v2 (a + b) + v2 (n) − 1. Of course, a, b are still odd since p - a, b.
6 Geometry
• General
– It’s a geometry problem - why haven’t you drawn a diagram yet?
– Choose your diagram wisely: drawing things that are too close to special cases (e.g. drawing a
triangle that’s very close to right, or one that’s very close to isosceles) might cause you to spend time
trying to prove things that aren’t true - or, more disasterously, accidentally assuming something is
true when it really isn’t!
– When you see a relationship you think might be true, such as two lines being perpendicular or two
similar triangles, a good test is to draw a completely different diagram and see if it still looks true.
If you can reproduce the same result with more than one different diagram, the chances of it being
true go up significantly.
– Don’t just sit and stare! The solution isn’t going to pop up magically. Assign variables to angles
or lengths, draw auxiliary lines, draw another diagram and see what sticks, even jump into using
coordinates - but the worst thing you can do is sit around for fifteen minutes waiting for a flash of
inspiration. Yes, you sometimes need to just look and analyze your diagram, but if you’ve been doing
that for more than 3 minutes or so it’s time to try something new.
– These next two are true for all problems, but especially for Geometry: if you’re stuck, look back at
the problem and ask yourself what information you haven’t used yet?
– Don’t be afraid to work backwards! If you see something you can’t quite figure out how to prove,
start with what you’d like to be true and see if you can work backwards to what you know.
• Parallel lines and angles - suppose the line AB is parallel to the line CD, and E, F lie on AB, CD
respectively.
– Know the basics: ∠AEF = ∠DF E and ∠BEF = ∠CF E.
– There are 180◦ in a straight angle (i.e. a line), and by the above this is also the sum of the angles in
a triangle.
– Vertical angles are equal - if AB and CD intersect at E, we have ∠AEC = ∠BED and ∠AED =
∠BEC.
• Similarity and Congruency
– Two triangles are similar if they share the same angles; since the sum of the angles in a triangle
is constant, it suffices to find two equal angle pairs. Equivalent, two triangles ABC and DEF are
AB BC CA
similar if = = ; determining similarity by either condition lets you conclude the other.
DE EF FD
– Two triangles are congruent by SSS (their sides have the same length), SAS (two sides and the angle
they form are equal), or AAS (two angles and some side are equal). Note that SSA (two sides and
an a different angle) could specify one of two different triangles.
– Parallel lines almost always result in some similar triangles - be on the lookout for them. In fact,
similar triangles are so useful that we often draw in parallel lines specifically to create them.
– Also be on the lookout for right angles - they make it much easier to find similar triangles.
• Area/Perimeter and Volume/Surface area formulas
– The area of a rectangle is `w, and its perimeter is 2(` + w). A special case is the square, which has
area s2 and perimeter 4s.
h(b1 + b2 )
– The area of a parallelogram is bh, the area of a trapezoid is , and the area of a rhombus
2
d1 d2
is .
2
– The area of a circle is πr2 , and its circumference is 2πr. The area of an ellipse is πab (the perimeter
is not usually reasonable) where a, b are the length of the axes - note that a circle is a special case
where a = b = r.
4
– The volume of a sphere is πr3 , and its surface area is 4πr2 .
3
bh
– The volume of a cone or pyramid is , where b denotes the area of its base. The surface area of
3
2
a cone is πrs + πr where s is the slant height - the important point to rederive this is that the
circumerence of the lateral surface area if 2πr, because it’s also the circumference of the base. The
area of a cylinder or prism is bh. The surface area of a cylinder is 2πr2 + 2πrh.
BOGTRO AIME “Study guide” 6 GEOMETRY
|x1 y2 + x2 y3 + x3 y1 − y1 x2 − y2 x3 − y3 x1 |
2
– The above, the Shoelace theorem, extends to higher-order polygons as well, so long as we keep the
coordinates in [counter]clockwise order.
• Useful triangle results: ABC is a triangle with a = BC, b = CA, c = AB.
– In a right triangle, a2 = b2 + c2 (Pythagorean triples). Common Pythagorean triples include
n2 − 1 n2 + 1
(3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), n, , for odd n, and their multiples.
2 2
– Median splitting: The 3 medians split [ABC] into six triangles of equal area. Additionally, the
centroid G satisfies AG = 2GMa , BG = 2GMb , CG = 2GMc where Ma , Mb , Mc are the midpoints.
– Angle bisectors: The 3 angle bisectors meet at the incenter. Additionally, if D lies on BC such that
AB BD
AD is the angle bisector, we have = .
AC CD
– Altitudes: The altitudes meet at the orthocenter, H. H has the useful property that, when reflected
over any of the sides, it lies on the circumcircle of ABC.
– Cirumcenter: The 3 perpendicular bisectors intersect at the orthocenter, O. O is, predictably, the
center of the circumcircle.
[ABC] BC
– Area ratios: If D lies on BC, then = (since the two triangles share the same height).
[ACD] CD
– Law of Cosines: c2 = a2 + b2 − 2ab cos C, b2 = a2 + c2 − 2ac cos B, a2 = b2 + c2 − 2bc cos A
a b c
– (Extended) Law of Sines: = = = 2R
sin A sin B sin C
– Stewarts: Suppose X lies on BC and AX = p, BX = m, CX = n. Then man + dad = bmb + cnc (“a
man and his dad put a bomb in the sink”).
p
– Sometimes useful: R(R − 2r) is the distance between the incenter and circumcenter; as a corollary,
R ≥ 2r.
1 1 1 1
– One trick that’s come up a bit recently: = + + , where hA , hB , hC are the lengths of
r hA hB hC
the altitudes and r is the inradius.
• Cyclic quadrilaterals
– If A, B, C lie on a circle, then ∠ABC is half the arc AC. In other words, an inscribed angle is half
its subtended angle.
– A, B, C, D are cyclic if they all lie on a single circle. Cyclic quadrilaterals have a ton of useful
properties:
– ∠ABC + ∠CDA = ∠BCD + ∠DAB = 180◦ .
– ∠ABD = ∠ACD; analogously ∠BCA = ∠BDA, ∠CDB = ∠CAB, ∠DAC = ∠DBC. These are
due to subtending the same arc.
– Power of a point: if AC intersects BD at E, then AE · EC = BE · ED (note this doesn’t rely on the
ordering of A, B, C, D - E might be outside the circle and A = C is even possible).
BOGTRO AIME “Study guide” 6 GEOMETRY
– This also applies to higher-order polygons: we can often assume a quadrilateral is a rectangle, or my
personal favorite: that a parallelogram is a line. Be very careful trying to do this when lengths are
given in the problem however - it may be the case that the polygon is implicitly determined. Don’t
try to assume a 13-14-15 triangle is right!
• Complex numbers in Geometry
– We first define what we actually mean: the complex number a + √ bi, in the complex plane, is the
Cartesian analogue of the point (a, b). The modulus of z is |z| = a2 + b2 , or the distance to the
origin.
– Note that complex numbers are very similar to vectors - indeed, the same “parallelogram rule” applies
to summing two points, among other things.
2π
– Rotating about the origin θ clockwise takes z to zeiθ . Note that when θ = this looks suspiciously
k
like roots of unity - and indeed, this is one of the biggest tip-offs to use complex numbers. A regular
n-side polygon in the complex plane can be placed with vertices at 1, ω, ω 2 , . . . , ω n−1 where ω is an
nth root of unity.
– Incidentally, note that this immediately proves cos 2◦ + cos 4◦ + . . . + cos 360◦ from before - these
correspond to the x-coordinates of the vertices of a polygon whose centroid is 0, so the sum is
immediately 0.
z
– Another useful result: w and z are perpendicular if and only if is pure imaginary (this refers to the
w
lines from 0 to w and from 0 to z). Analogously, the lines from a to b and c to d are perpendicular
d−c
if and only if is pure imaginary.
b−a
– An application: A square in the coordinate plane has vertices whose y coordinates are 0, 1, 4, and
5. What is the area of the square? Solution: Place the square in the complex place. We want the
origin to be the center, and we’d like to work with integers, so scale everything up by a factor of 2
and then shift it 5 units downward - this makes the square have y-coordinates −5, −3, 3, 5. Suppose
πi
one of the points is a + 5i. Then (a + 5i)e 2 = (a + 5i)i = −5 + ai is the result of rotating the point
90 degrees clockwise about the origin, which coincides with the vertex on y = 3 (or possibly y =√−3,
but the difference is academic) - this
√ implies that a = 3. As a result, the magnitude of 3 + 5i is 34,
so the diagonal of the square is 2 34, making the area of the original square (remember we scaled
up by a factor of two at the beginning) 17 . Note how little work we had to do!
– Hints to use complex geometry: Regular polygons work excellently with complex numbers, because
(if we can make the origin the centroid), multiplying the points by ω results in the same polygon.
Note how we did this in the previous problem, multiplying by a 4th root of unity (i). Any sort of
rotation also suggests using complex geometry, since this is very easy to do using complex geometry.
Finally, points on a circle suggest making the origin the center of that circle, since this again results
in a rotational analogue. Summarizing: Lines - use coordinates, Circles - use complex numbers.
Remember that we almost always want the origin to be the center of whatever we’re considering,
usually a regular polygon.