Think Academy
Day 3: Non-Adjacent Permutations (The Gap Method)
Demonstrator: Alex Yuan
Think Academy

Non-Adjacent Permutations

The Gap Method
Scan to Follow

📸 Warm-Up: The Photo Line-Up Puzzle

đŸŽ¯ The Class Photo Dilemma
7 friends in Year 5 (Emma, Chloe, Zoe and Leo, Sam, Max, Ben) line up in a single row for a class photo.
âš ī¸ Strict Condition:
Emma, Chloe, and Zoe cannot stand next to each other because they will whisper and giggle!
STUDENT ROSTER:
Quiet Crew (4 Boys)
Leo
Sam
Max
Ben
Chatterboxes (3 Girls)
Emma
Chloe
Zoe
🚨 The Intuitive Trap: Can We Just Subtract?
Could we just find all arrangements and subtract when the 3 girls stand together?
❌ DOES NOT WORK!
💡 The Gap Method
Instead of fixing messy mistakes, construct the line-up directly:
🌟 Golden Law of Non-Adjacent Problems:
"Line up the boys first to create protective dividers, then let the girls choose their gaps!"

🧩 The 3-Phase Strategy: Step-by-Step Breakdown

Line-Up Stage Visualiser
LINE-UP TRACK (FRONT OF CLASS) Gap ① Gap ② Gap â‘ĸ Gap â‘Ŗ Gap ⑤ #1 Spot 1 #2 Spot 2 #3 Spot 3 #4 Spot 4 Leo Sam Max Ben Emma Chloe Zoe Queue Structure: 4 empty photo spots on the floor (Spot 1 to Spot 4)
Key Insight: Each gap can hold at most 1 chatterbox. Since boys stand between the gaps, the girls are physically separated!
STEP 1: Line Up the 4 Boys STAGE 1
Assign the 4 boys to the 4 photo spots choice-by-choice:
1st spot: 4 choices â€ĸ 2nd: 3 â€ĸ 3rd: 2 â€ĸ 4th: 1
4 × 3 × 2 × 1 = 24 ways
STEP 2: Count the Available Gaps STAGE 2
The 4 boys create 2 outside ends + 3 spaces between them:
4 boys in a line ⟹ 4 + 1 = 5 available gaps
STEP 3: Girls Choose Gaps One by One STAGE 3
â€ĸ Emma chooses first: 5 gap choices
â€ĸ Chloe chooses second: 4 choices left
â€ĸ Zoe chooses last: 3 choices left
5 × 4 × 3 = 60 ways

🏆 Final Assembly & Multiplication Principle

âš™ī¸ The Multiplication Principle
Because the line-up is completed through two sequential, independent stages, we multiply the possibilities:
Stage 1: Arrange the 4 Boys (4 × 3 × 2 × 1) 24 ways
Stage 2: Girls Choose Gaps (5 × 4 × 3) 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 who can stand anywhere (Boys) vs who cannot touch (Girls).
2
Seat the Boys First: Count choices for boys (4 × 3 × 2 × 1 = 24).
3
Count Gaps: 4 boys create 4 + 1 = 5 available gaps.
4
Girls Choose Gaps: Pick from remaining gaps (5 × 4 × 3 = 60) and multiply!
Master Rule: Total = (Ways for Boys) × (Ways for Girls in Gaps)
🏅 Mission Accomplished!
You have mastered Non-Adjacent Permutations & The Gap Method!

🚀 After-Class Mastery: Test Your Superpowers!

⭐ 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: