Permutations with Restrictions
Real counting problems rarely give you total freedom. In a photo, best friends always stand together. At a dinner table, rivals must not sit adjacent. Someone always needs to be first. Restrictions shrink the count — but they require a systematic strategy. This lesson gives you three: fix the object, glue objects together, or use the gap method.
Six people line up for a photo. Without restrictions, $6! = 720$ arrangements exist. Alice and Bob insist on standing next to each other (in either order). Without calculating — what fraction of 720 do you think satisfy this condition?
Every restriction problem uses one of three moves. Identify the restriction type, pick the matching strategy, execute.
- Fix — a specific object must occupy a specific position. Fix it there, arrange the rest normally.
- Glue — objects must be together. Glue them into a single unit, arrange units, then multiply by internal arrangements.
- Gap — objects must not be together. Arrange the other objects first, then place the restricted objects in the gaps.
Key facts
- $n$ objects in a row create $n+1$ gaps (including both ends)
- Glue method: treat grouped objects as one unit, then multiply by $k!$ internal arrangements
- "Not together" methods: gap method or (total) $-$ (together)
Concepts
- Why fixing an object reduces the problem size by one
- Why the glue method gives $k!$ times more arrangements than forgetting the internal order
- When to use the complement approach versus the direct gap method
Skills
- Solve "must be together" problems using the glue method
- Solve "must not be together" problems using the gap or complement method
- Apply fixed-position restrictions to reduce arrangement counts
When a permutation problem includes conditions on where objects can appear, we apply one of the three strategies: Fix, Glue, or Gap.
Strategy 1 — Fix (object in a specific position):
- Place the required object in its fixed position first.
- Arrange the remaining $n-1$ objects in the remaining $n-1$ positions: $(n-1)!$ ways.
- Example: A must be first in a row of 5 $\Rightarrow$ fix A, arrange B,C,D,E in the remaining 4 spots: $4! = 24$ ways.
Strategy 2 — Glue (objects must be adjacent):
- Treat the $k$ objects that must be together as a single unit.
- Count the arrangements of the units: $(n-k+1)!$ ways if all $n$ objects are being arranged.
- Multiply by the internal arrangements of the glued group: $k!$ ways.
- Total = $(n-k+1)! \times k!$
Strategy 3 — Gap (objects must not be adjacent):
- Arrange the unrestricted objects first: say $m$ objects gives $m!$ arrangements.
- This creates $m+1$ gaps (including both ends): _ O _ O _ O _ ...
- Choose gaps for the restricted objects: $^{m+1}P_k$ ways (if $k$ restricted objects are all distinct).
- Total = $m! \times {^{m+1}P_k}$
Fix: pin object to position, arrange rest — reduces problem by 1 object and 1 slot; Glue: k objects together treat as 1 unit, multiply by k! internal arrangements
Pause — copy the restriction strategies into your book: Fix — pin object to a position, arrange the rest; Glue — treat $k$ adjacent objects as one unit ($k!$ internal arrangements), then arrange the combined group.
Quick check: Three books (A, B, C) must be kept together on a shelf of 6 books. How many units must be arranged after gluing?
We just saw that "must be adjacent" problems use the glue technique (treat glued objects as one unit, then multiply by internal arrangements) and "must be in specific positions" uses the fix technique. That raises a question: what about "must NOT be adjacent" — gluing doesn't work here, so what does? This card answers it → the gap method: arrange the free objects first, then count the gaps they create, and place the restricted objects into those gaps.
The gap method is the most powerful technique for "not adjacent" problems. The key insight is to arrange the unconstrained objects first, then count ways to insert the constrained objects into the gaps.
Five boys create six gaps. Choosing four of these six gaps for girls guarantees no two girls are adjacent.
Key formula: if $m$ unrestricted objects are arranged first and $k$ restricted objects must not be adjacent (and $k \leq m+1$):
Gap method steps: (1) arrange m free objects in m! ways; (2) count m+1 gaps; (3) place k restricted objects: ^{m+1}P_k; Total = m! {^{m+1}P_k}
Pause — copy the gap method steps into your book: (1) arrange $m$ free objects: $m!$ ways; (2) count $m+1$ gaps; (3) place $k$ restricted objects in gaps: $^{m+1}P_k$; total $= m! \times\ ^{m+1}P_k$.
Did you get this? True or false: four objects placed in a row create five gaps (including both ends).
Worked examples · 3 in a row, reveal as you go
In how many ways can 6 people be arranged in a row if two particular people (Alice and Bob) must sit together?
How many arrangements of the letters A, B, C, D, E have A at the beginning?
In how many ways can 5 boys and 4 girls be arranged in a row so that no two girls are adjacent?
Fill the gap: If 4 boys are arranged first, they create gaps for girls to occupy.
Misconceptions to fix · the 3 traps that cost marks
Did you get this? True or false: for a group of 6 arranged in a row with 2 specific people not together, the answer equals $6! - 5! \times 2!$.
Activities · practice with the ideas
In how many ways can 4 boys and 3 girls be arranged in a row if the 3 girls must sit together?
How many arrangements of the letters of the word LEADER have the two E's together?
In how many ways can 6 people be arranged in a row if two particular people must not sit together? (Use the complement method.)
Seven people line up. Two specific people (X and Y) must not be next to each other. Use the gap method to count valid arrangements.
A 5-digit number is formed using the digits 1–5 (each once). How many such numbers have 1 and 2 in the first two positions (in either order)?
Odd one out: Three of these statements about restricted permutations are correct. Which one is NOT?
Earlier you estimated what fraction of 720 arrangements have Alice and Bob together.
The answer: glue A and B $\Rightarrow$ 5 units, $5! = 120$ arrangements, times $2! = 2$ internal orders $= 240$. That is $\dfrac{240}{720} = \dfrac{1}{3}$ of all arrangements. The intuition many people have is "about half" — the true fraction is smaller because there are only $\dfrac{2}{6} = \dfrac{1}{3}$ of the slots where A and B can be placed together.
Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.
Q1. In how many ways can 4 boys and 3 girls be arranged in a row if the girls must sit together? (2 marks)
Q2. How many arrangements of the letters of the word LEADER have the two E's together? (2 marks)
Q3. In how many ways can 6 people be arranged in a row if two particular people must not sit together? (2 marks)
Comprehensive answers (click to reveal)
Activity answers:
1. Glue 3 girls as 1 unit. Units: {GGG}, B, B, B, B = 5 units. $5! \times 3! = 120 \times 6 = 720$.
2. LEADER: 6 letters. Glue EE: 5 units {EE}, L, A, D, R. Arrangements = $5! \times 1 = 120$ (EE unit has only 1 internal order since the two E's are identical). So answer = $120$. (If treating the two E's as distinguishable: $5! \times 2! = 240$.)
3. Total $6! = 720$. Together: glue 2 people $\Rightarrow$ $5! \times 2! = 240$. Not together $= 720 - 240 = 480$.
4. Gap method: arrange 5 others in $5! = 120$ ways, creating 6 gaps. Place X and Y: $^6P_2 = 30$. Total $= 120 \times 30 = 3600$.
5. Place 1 and 2 in positions 1–2: $2! = 2$ orders. Arrange 3, 4, 5 in positions 3–5: $3! = 6$. Total $= 2 \times 6 = 12$.
Q1 (2 marks): Glue 3 girls as 1 unit: 5 units, $5! = 120$ [1]. Internal arrangements of girls: $3! = 6$ [1]. Total $= 120 \times 6 = \mathbf{720}$.
Q2 (2 marks): Glue EE: 5 units (L, EE, A, D, R). $5! = 120$ unit arrangements [1]. The two E's are identical so the EE unit has only 1 internal order [1]. Total $= 120$. (Full marks also awarded for $5! \times 2! = 240$ if treating E's as distinguishable — accept with justification.)
Q3 (2 marks): Total $= 6! = 720$ [0.5]. Together $= 5! \times 2! = 240$ [1]. Not together $= 720 - 240 = \mathbf{480}$ [0.5].
Five timed questions. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.
⚔ Enter the arenaClimb platforms by answering restricted permutation questions. Lighter alternative to the boss.
Mark lesson as complete
Tick when you've finished the practice and review.