Spider Problem Counting Socks and Shoes Problem
A spider has one sock and one shoe for each of its eight legs. In how many different orders can the spider put on its socks and shoes, assuming that, on each leg, the sock must be put on before the shoe?
A) 8! (B) $2^8$ (C) $(8!)^2$ (D) $\frac{16!}{2^8}$ (E) 16!
I am having trouble visualizing how the answer was gotten from this solution.
Solution 2
Each dressing sequence can be uniquely described by a sequence containing two $1$s, two $2$s, ..., and two $8$s -- the first occurrence of number $x$ means that the spider puts the sock onto leg $x$, the second occurrence of $x$ means he puts the shoe onto leg $x$. If the numbers were all unique, the answer would be $16!$. However, since 8 terms appear twice, the answer is $\frac{16!}{(2!)^8} = \boxed{\frac {16!}{2^8}}$ 

It might be better to put subscripts on the numbers: $L_1$ means the action of putting the sock, and $L_2$ the shoe, on leg $L$. Then we have 16 distinct symbols $1_1,1_2,2_1,2_2,3_1,3_2,\dots,8_1,8_2$ and there are $16!$ ways to permute them without restrictions.
With the sock-before-shoe restriction, for each pair of $L_1$ and $L_2$, $L_1$ must come before $L_2$. For each sequence where $L_1$ comes before $L_2$ (allowed) there is a corresponding sequence where $L_1$ comes after $L_2$ (disallowed), so we divide by 2 for each leg, yielding the correct answer of $\frac{16!}{2^8}$.
