Recipe
Count a selection with a restriction
Use when: a counting problem adds an extra condition, such as a required element, a forbidden or required adjacency, or an order constraint, on top of an otherwise ordinary product, permutation, or combination count
Goal: the count of arrangements or selections that satisfy the restriction, built from the ordinary counting tools plus one targeted fix
Taught in Counting with restrictions
Quick recipe
-
1
Read the added condition first. It matches one of three shapes: a required element or position, a forbidden or required adjacency between two specific items, or an order constraint between two items with no other structure.
Example
"A 4-person committee is chosen from 10 people, and Jun must be on it" fixes a required element. "Two rival students cannot sit next to each other" is a forbidden adjacency. "Runner Kai must finish ahead of runner Leo" is an order constraint.
Why: no single formula covers every restriction, so naming the shape correctly decides which fix applies next.
-
2
Each of the three shapes has its own fix, reusing the ordinary counting tools instead of a new formula.
Example
For "Jun must be on the 4-person committee from 10 people": fix Jun's spot, then choose the remaining 3 members from the other 9 people, C(9,3).
- a specific item or position is required — fix that piece first, then count the remaining freedom with the ordinary product, permutation, or combination rule.
- two specific items must not sit together — count every arrangement ignoring the restriction, then subtract the arrangements where they do sit together.
- two specific items must sit together — glue them into one block, count arrangements of the block plus everything else, then multiply by the block's own internal orderings.
- one item must come before another, with no other structure imposed — count every arrangement ignoring the order, then divide by the fraction of orderings that place them correctly (usually 2).
Why: each shape has a fix that reuses tools already known, so this step never introduces a brand-new formula, only a targeted adjustment.
-
3
Compute the final number from whichever fix the previous step applied. Confirm it is no larger than the unrestricted count, since a restriction can only remove outcomes, never add them.
Example
C(9,3)=84, and 84 < C(10,4)=210, the unrestricted count. The restricted count is smaller, as it must be.
Why: a restricted count that comes out larger than the unrestricted one signals an arithmetic or setup error, not a legitimate answer.
Common mistakes
- Applying the complement when the restriction really needs the glue-block fix, or the reverse.
- Fixing the required element but forgetting to reduce both the pool size and the number of remaining spots by one.
- Dividing by a fraction other than 2 when more than one pair of items has an order constraint between them.
- Forgetting to check whether the final count is actually smaller than the unrestricted one.