AMC Club Combinatorics Cram Course: 1. Laws of Counting
AMC Club Combinatorics Cram Course: 1. Laws of Counting
1. Laws of Counting
Law of Addition: If you have two or more events that are mutually exclusive, the number of
outcomes is the number of outcomes of each event added together.
Example: If you have pairs of jeans and pairs of shorts, the number of ways to
select a bottom to wear is .
Law of Multiplication: If you have two or more events that are mutually independent, the
number of outcomes is the number of outcomes of each event multiplied together.
Example: If you have pairs of pants and pairs of shirts, the number of ways to
select a pant and a shirt (independently) is .
Using these two laws to count the number of possible outcomes is known as Constructive
Counting.
If there are two possible directions you could go when constructing a final outcome, you make
use of casework to split them into two (or more) different cases. Once you have found an answer
for each case, use the Law of Addition to combine the answers of each case into a final answer.
Don't be afraid to have sub-cases in each case, but don't allow yourself to get too deep in sub-
cases either.
2. One-to-One Correspondence
A one-to-one correspondence (aka bijection) is a mapping between two sets such that:
each element of the first set is mapped to exactly one element of the second set, and
each element of the second set is mapped from exactly one element of the first set.
This means that the number of elements in both sets (or the cardinality) is the same.
(mapping function ).
(mapping function ).
This exact idea is sometimes useful to count the number of terms in a sequence, where
you know the first few terms and the last term. Find a mapping which makes the first
term 1, the second term 2, the third term 3, and so on so forth. Then apply this
mapping to the last term to find the number of terms.
(mapping function outputs the position of
the input).
The set of all combinations with repetition of items from choices the set of all ways
to permute stars and arrows on a line the set of all ways to select slots from
slots.
We know that the cardinality of the last set is just , so the number of
combinations with repetition of is that value. See section 2.2 for more details.
Permutations Combinations
No Repetition
Spoken as Pick Spoken as Choose
With Repetition
My notation (not real):
Examples:
Mr. Newton has 8 questions in his test bank, and he needs to pick 3 for today's quiz. How
many ways can he do this? Answer: . We use permutations
with no repetition because order matters and the same question can not appear twice.
Mr. Newton has 6 different vegan sandwiches in his refrigerator. He wants to take three of
them for lunch. How many ways can he choose three of the sandwiches? Answer:
. We use combinations for this with no repetition because the
order of the sandwiches does not matter but the same sandwich can not appear twice.
For the purposes of our analogy, we are trying to count the number of ways to create ice cream
bowls of scoops from different flavors, where order of the scoops does not matter, but the
same flavor can be repeated. To begin thinking about our analogy, we pretend that the ice cream
bowls are being constructed by robots.
We first think of how the robots would serve customers. Imagine the ice cream shop as being a
long line of ice cream tubs. The robot starts from the left-most end. The robot can only do two
things, move to the right, or add a scoop from the tub it is in front of.
We see that we can represent any possible combination of flavors like this, as a permutation of
arrows and stars. This means that we can make a one-to-one correspondence between
the set of all possible ice cream bowls and the set of all permutations of arrows and stars.
In order to find the number of these permutations, we think about how we construct such a
permutation. We can first fill in the stars, then fill in the remaining spaces with arrows.
Therefore, we can make another one-to-one correspondence between the set of all permutations
of arrows and stars and the set of all combinations of spaces out of spaces.
We can then count the possible combinations of bowls by just counting how many ways we can
This argument is sometimes called Stars and Bars, where the arrows are replaced with bars.
4. Complementary Counting
One common and powerful method of counting is Complementary Counting. When a problem
asks to count the outcomes satisfying a difficult conditions, it is sometimes easier to count the
outcomes that do NOT satisfy the condition and subtract that from the total number of possible
outcomes.
For instance, if you are trying to count the number of positive integers less than or equal to 100
which are not divisible by either 3 or 7, you could first count the number of positive integers
which are divisible by 3 or 7 (using PIE, see section 5), and then subtract that from 100 to find
your answer.
where represents the cardinality (number of elements) of set , represents the union
of sets and , and represents the intersection of sets and .
PIE allows us to find the number of elements which satisfy at least one of two conditions.
We derive this by looking at a Venn diagram. Note that when we add all three of the two-set
intersections, we count the middle region 3 times. Then, we just subtract away the middle region
twice. We can also derive this by plugging in the sets , , and into our
original PIE equation for two sets, and noticing that (and other
similar permutations of this pattern).
PIE does not neccessarily have to be used only to find the number of elements of a set, it can also
be applied in other scenarios, such as finding the sum of all integers in a set. In addition, PIE can
be applied to probability.
Example: What is the sum of all integers from 1 to 100 that are multiples of 2 or 3?
The sum of all integers 1 to 100 which are multiples of 2 is (this is an arithmetic
sequence with 50 terms and a mean of 51). The sum of all integers 1 to 100 which are multiples
of 3 is similarly . Finally, the sum of all integers 1 to 100 which are multiples of 6 is
. Therefore, our answer is .
6. Probability
The probability of an event is the chance of that event happening, possibly given that some other
conditions are true. There are two different ways to calculate probability, combinatorial and
constructive.
You should be using combinatorial probability in most AMC problems, simply because there are
many more combinatorial tricks than probability tricks that you can use.
Example: find the probability of flipping at least 2 heads if you flip 3 coins.
There are ways to flip at least 2 heads, , , , and . There are a total of
different possible outcomes. Therefore, the probability is
Constructive probability uses the Law of Addition and Law of Multiplication (their equivalents in
probability) to construct the probability based on the choices made in the process.
Example: find the probability of flipping at least 2 heads if you flip 3 coins.
Case 1 - first flip is (with chance ): If the next flip is a (with chance ), the results of the
third flip do not matter. Otherwise, if the next flip is (with chance ), the third flip must be
(with chance ). The probability of this ( ) happening is . Thus, the total probability
of this case happening is
Case 2 - first flip is (with chance ): The next two flips must be , which happens with chance
, so the total probability of this case happening is .
7. Expected Value
The expected value of a number is the weighted average value of all the outcomes based on their
probabilities. For instance, if you flip a coin 10 times, the expected value of the number of heads
is 5, and if you roll a dice, the expected value of the roll is 3.5. The expected value of the sum of
two variables is the sum of the expected value of those two variables.
8. Binomial Theorem
Binomial Theorem states that
We see that this looks very similar to the binomial expansion of , except that the and
terms are missing. We try to set and to set those equal. Thus, is the value
we are looking for, so our answer is .