Module 2.1 · Counting and Probability
Permutations and combinations with restrictions
Almost no AMC counting problem asks "how many ways to arrange things?" and stops there. There is always a catch: two people who must sit together, two letters that can't touch, a digit that can't be zero. This module is a toolkit of standard moves for handling restrictions quickly and without overcounting.
The basic tools
You already know the two building blocks:
- Permutations (order matters): the number of ways to arrange of distinct objects in a row is .
- Combinations (order doesn't matter): the number of ways to choose of distinct objects is .
When some objects are identical, divide out the rearrangements that look the same. A word with letters in which one letter repeats times, another times, and so on has
distinct arrangements. For example, BANANAS has arrangements.
Every restriction technique below is a way of turning a restricted problem back into one of these.
Move 1: Handle the most restrictive choice first
When filling slots one at a time, fill the pickiest slot first. To count four-digit odd numbers with distinct digits, the units digit has the tightest rule (it must be odd), and the thousands digit has the next tightest (it can't be ). Choose them in that order: choices for the units digit, then for the thousands digit (not , not the units digit), then and for the middle two. That gives .
If you had started from the thousands digit, the number of choices for the units digit would depend on whether the thousands digit was odd, and you'd need casework.
Move 2: Glue objects that must be together
If some objects must be adjacent, glue them into a single block, arrange the block with everything else, then multiply by the number of ways to arrange the objects inside the block.
Move 3: Use gaps for objects that must be apart
If certain objects must not be adjacent, first arrange the other objects. They create gaps (including the two ends), and you place the separated objects into distinct gaps. With objects in a row there are gaps.
Move 4: Count the complement
"At least one" and "not all" are signals to count what you don't want and subtract from the total:
For "these two are not adjacent," you can either use gaps or subtract the glued count from the total. Pick whichever is shorter.
The restriction toolkit
- Pickiest first: fill the most restricted slot before the others.
- Together: glue into a block, then multiply by the internal arrangements.
- Apart: arrange the others, then drop the separated objects into distinct gaps.
- At least one / not: count the complement and subtract.
- Round tables: fix one person's seat to remove rotations, so people can be seated in ways.
Worked example: Glue
In how many ways can people stand in a row if Ana and Ben must stand next to each other?
Glue Ana and Ben into one block. Now there are units to arrange: ways. Inside the block they can stand as AB or BA, so multiply by . The answer is .
Worked example: Gaps with repeated letters
How many arrangements of the letters of COUNTING have no two vowels adjacent?
The vowels are O, U, I (all different). The consonants are C, N, T, N, G, with N repeated. Arrange the consonants first: ways. They create gaps:
Put the three distinct vowels into three different gaps, where order matters: ways. The answer is .
Worked example: At least one of each
A committee of is chosen from boys and girls. How many committees include at least one boy and at least one girl?
The bad committees are all boys or all girls. Total: . All boys: . All girls: . The answer is .
Common mistake
A common wrong approach to "at least one boy and one girl" is: pick a boy ( ways), pick a girl ( ways), then pick any of the remaining ( ways), for . This counts the same committee many times, because any boy on the committee could have been "the chosen boy." When you see "at least," reach for the complement.
Worked example: A round table
Four couples sit at a round table with seats. Rotations of the same seating count as the same. In how many ways can they sit if every couple sits together?
Glue each couple into a block. Four blocks around a round table: fix one block's position and arrange the other three, ways. Each couple can sit in orders, giving . The answer is .
Tip
Choosing numbers from with no two consecutive is a gaps problem in disguise: the answer is . Think of the unchosen numbers in a row; the chosen ones go into the gaps, at most one per gap.
Practice
How many four-digit positive integers are odd and have four distinct digits?
Six different books are placed on a shelf. In how many orders can they be placed if two particular books must not be next to each other?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
In how many ways can numbers be chosen from so that no two of the chosen numbers are consecutive?
How many distinct arrangements of the letters of BANANAS have the two N's not next to each other?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Five students, including Ava and Bo, line up for a photo. Ava refuses to stand first in line and Bo refuses to stand last. How many lineups are possible?
How many five-digit positive integers have digits that are strictly decreasing from left to right (such as )?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Five men and five women sit at a round table with seats so that men and women alternate. Seatings that are rotations of each other are the same. How many seatings are there?
A path on a grid starts at and moves one unit right or one unit up at each step until it reaches . How many such paths do not pass through the point ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many -element subsets of have the property that any two of their elements differ by at least ?
Real contest practice
- 2015 AMC 10A, Problem 10: rearrangements of four letters with an adjacency restriction.
- 2017 AMC 10A, Problem 19: seating five people in a row when some pairs refuse to sit together.