Three different pairs of shoes are placed in a row so that no left shoe is next to a right shoe from a different pair. In how many ways can these six shoes be lined up?
- A)
- B)
- C)
- D)
- E)
Answer
A
Key insight
A left shoe next to a right shoe must be its own mate. First find the allowed left-right patterns, then see which pairs are forced into place.
Solution
Call the pairs , , , with shoes and so on. First decide which spots hold left shoes (L) and which hold right shoes (R). Then place the actual shoes.
Step 1: which L/R patterns are allowed?
1. Wherever an L sits next to an R, those two shoes must be a pair.
2. A shoe has only one mate. So a shoe cannot have an opposite-type shoe on both sides. The patterns and can never appear.
3. List the patterns of three L's and three R's that avoid and :
- Split once: , .
- Split twice: , , , .
- Split three times: , .
That is patterns.
Step 2: place the shoes. Every place where L meets R must hold a matching pair.
- Split once, like . The pair at the meeting point (spots and ) can be any of pairs. The other two left shoes fill spots and in ways, and the other two right shoes fill spots and in ways. That is ways. With such patterns: .
- Split twice, like . The two meeting points (spots – and –) need two different pairs: ways. The last pair must fill spots and , which are an L spot and an R spot, in way. That is ways. With such patterns: .
- Split three times, like . The three meeting points (spots –, –, –) each take a whole pair, in ways. With such patterns: .
- Total: .
The answer is .
Why this works
Break a lineup problem into two layers: first the rough pattern (left or right), then the exact shoes. The rule rules out many rough patterns right away, and in the ones that are left it forces certain pairs to sit together. Counting each layer separately is much easier than handling all six shoes at once.
Alternative approach
Build the row from the left. The first shoe can be any of , and by symmetry each choice leads to the same number of rows. Say it is .
- If the second shoe is : the third must be another left shoe, or ( ways). Say . Then the row ends or : ways. That gives .
- If the second shoe is another right shoe, or ( ways), say . Then either follows ( way), or follows and then in either order ( ways). That gives .
So each first shoe leads to rows, and the total is .
The trap
Finding the left-right patterns and then placing the shoes freely. Wherever a left and a right meet, those two must be a pair, which cuts the count.
Concise solution
Record each position as or . Whenever an and an are adjacent they must be mates. Since a shoe has only one mate, no shoe can be adjacent to two shoes of the opposite type: the patterns and cannot appear anywhere. Equivalently, every run of identical letters that is not at an end of the row has length at least .
With three 's and three 's, the allowed patterns are:
- one boundary: , ;
- two boundaries: , , , ;
- three boundaries: , .
Now assign actual shoes. Each – boundary forces the two shoes on either side to be a pair.
- One boundary (2 patterns): pick the pair straddling the boundary ( ways). The other two left shoes fill the remaining slots in ways, the other two right shoes fill the remaining slots in ways: per pattern.
- Two boundaries (4 patterns): the two boundaries use two different pairs ( ways to assign them), and the third pair's shoes fill the two remaining slots, one and one , in exactly way: per pattern.
- Three boundaries (2 patterns): each boundary holds a whole pair, assigned in ways: per pattern.
Total: .
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.5)
- Introduction to Algebra, Chapter 22: Special Manipulations (§22.3)
- Introduction to Counting & Probability, Chapter 3: Correcting for Overcounting (§3.2, §3.4)
- Prealgebra, Chapter 14: Counting (§14.3)
Techniques
Split into exhaustive cases and handle each · Exploit symmetry to reduce work or pair up objects