Permutations with Restrictions: Adjacent Objects
What you'll learn: How to count arrangements when certain objects must stay together or must stay apart using grouping techniques.
The Core Idea
Sometimes you need to count permutations where specific objects must be adjacent (next to each other) or must NOT be adjacent. The key insight: treat objects that must be adjacent as a single "super-object."
When Objects MUST Be Adjacent
If certain objects must stay together, group them into a single unit:
- Bundle the objects that must be adjacent into one "block"
- Count arrangements of this block with the remaining objects
- Multiply by the internal arrangements within the block
Example: Arrange the letters A, B, C, D, E where B and C must be adjacent.
- Treat BC as one unit: {BC}, A, D, E → 4 objects
- These 4 objects can be arranged in 4! = 24 ways
- Within the {BC} block, B and C can swap: 2! = 2 ways
- Total: 4! × 2! = 24 × 2 = 48 arrangements
When Objects Must NOT Be Adjacent
Use complementary counting:
- Count all unrestricted permutations
- Subtract cases where the objects are adjacent (using the bundling method above)
Example: Arrange A, B, C, D, E where B and C must NOT be adjacent.
- Total arrangements: 5! = 120
- Arrangements where B and C ARE adjacent: 48 (from above)
- Arrangements where B and C are NOT adjacent: 120 − 48 = 72
Multiple Adjacent Groups
If A and B must be adjacent AND C and D must be adjacent, create two blocks: {AB} and {CD}, then treat these as separate units alongside other objects.
Key Takeaway: Bundle objects that must be adjacent into single blocks, count arrangements of blocks plus remaining objects, multiply by internal block arrangements; for "not adjacent" conditions, subtract the adjacent cases from the total.