Non-Adjacent Permutations
The Gap Method
Scan to Follow
đ¸ Warm-Up: The Photo Line-Up Puzzle
Year 5 Permutations & Combinations
đ¯ The Class Photo Dilemma
7 students (A, B, C and D, E, F, G) line up in a single row for a class photo.
â ī¸ Teacher's Strict Condition:
No two of A, B, and C may stand adjacent to each other!
STUDENT ROSTER:
Quiet Crew (Unrestricted)
D
E
F
G
Chatterbox Trio (Must Separate)
A
B
C
đ¨ The Intuitive Trap: Complementary Counting?
Can we just calculate: Total â (All 3 Together)?
7! â (3! Ã 5!) = 5040 â 720 = 4320 ? â WRONG!
Why? Subtracting "all 3 together" still leaves cases where exactly two chatterboxes are adjacent (e.g., A & B together, C separated)!
đĄ The Breakthrough: The Gap Method
Instead of fixing bad arrangements, construct valid ones directly!
đ Golden Law of Non-Adjacent Permutations:
"Arrange the unrestricted students first, then insert the restricted students into the gaps!"
đ§Š The 3-Phase Strategy: Step-by-Step Breakdown
Constructive Permutation
Line-Up Stage Visualiser
Key Insight: Each gap can hold at most 1 chatterbox. Since quiet students stand between the gaps, chatterboxes are guaranteed never to touch!
PHASE 1: Arrange Quiet Crew
STEP 1
Permute the 4 unrestricted students (D, E, F, G):
4! = 4 Ã 3 Ã 2 Ã 1 = 24 ways
PHASE 2: Count Available Gaps
STEP 2
4 students create 2 ends + 3 in-between spaces:
4 + 1 = 5 available gaps (N items â N + 1 gaps)
PHASE 3: Insert Chatterbox Trio
STEP 3
Pick 3 distinct gaps from 5 for students A, B, and C:
P(5, 3) = 5 Ã 4 Ã 3 = 60 ways
đ Final Assembly & Multiplication Principle
Connecting the Independent Steps
âī¸ The Multiplication Principle
Because the line-up is completed through two sequential, independent stages, we multiply the possibilities:
Stage 1: Arrange Quiet Crew (D, E, F, G)
24 ways
Stage 2: Insert Chatterboxes (A, B, C)
60 ways
TOTAL VALID PHOTO LINE-UPS
24 Ã 60 =
?
1,440 ways
Mental math tip: 24 Ã 6 = 144 â 144 Ã 10 = 1,440
đ Master Recipe: Non-Adjacent Problems
1
Classify: Identify the unrestricted elements vs restricted (non-adjacent) elements.
2
Base Line: Arrange the M unrestricted elements first (M!).
3
Count Gaps: M elements create exactly (M + 1) available gaps.
4
Insert & Multiply: Insert K elements into gaps (P(M+1, K)) and multiply!
General Formula:
Total = M! Ã P(M + 1, K)
đ
Mission Accomplished!
You have mastered Non-Adjacent Permutations & The Gap Method!
đ After-Class Mastery: Test Your Superpowers!
Independent Challenges âĸ No Answers Revealed
â 4 Practice Challenges for Home â Apply the Gap Method on Your Own!
Challenge 1: Photo Line-Up
6 students line up for a photo. Two students, Sam and Leo, must not stand next to each other.
Valid ways:
Challenge 2: Car Parking
5 distinct cars (3 silver, 2 red) park in a row of 5 spaces. The 2 red cars cannot be parked in adjacent spaces.
Valid ways:
Challenge 3: Bookshelf Order
6 distinct books on a shelf: 4 maths textbooks and 2 science textbooks. The 2 science books must never sit side-by-side.
Valid ways:
Challenge 4: Running Lanes (Bonus)
7 sprinters compete in 7 lanes. Runner X and Runner Y must not be assigned to adjacent lanes.
Valid ways: