Count the opposite, then subtract: "Not together" is hard to count head-on. So count everything, then subtract the arrangements where they ARE together (the block method).
IB-style question — must NOT sit together
5 friends sit in a row, but Ana and Ben must NOT sit next to each other.
In how many ways can they sit?
Step by step
- All arrangements, no restriction.
- The ones where Ana and Ben ARE together (glue them): 4! × 2.
- Subtract.
Final answer
72 ways.
Seat the others first, then use the gaps: When no two of a group can be next to each other, seat the others first.
They leave gaps (including the two ends) — drop the restricted items into separate gaps.
IB-style question — no two girls together
4 boys and 2 girls stand in a row. No two girls may stand next to each other.
In how many ways can they stand?
Step by step
- Arrange the 4 boys first.
- 4 boys make 5 gaps: _ B _ B _ B _ B . Slot the 2 girls into 2 different gaps. They're different people, so who's in which gap counts → ⁵P₂.
- Multiply: 24 boy-orders × 20 ways to place the girls.
Final answer
480 ways.
[Diagram: math-counting-row] - Available in full study mode