1. In how many different ways can $n$ women and $n$ men be arranged so that no two neighbors are of the same gender, and this is:

a) in a single row,

b) around a round table with $2n$ seats.
Solution. Let $a_{1}, a_{2}, \ldots, a_{n}$ denote the women, and $b_{1}, b_{2}, \ldots, b_{n}$ the men.

a) We consider sequences of the form $a_{1}, b_{1}, a_{2}, b_{2}, \ldots, a_{n}, b_{n}$ (when a woman is in the first place). For a fixed arrangement of $a_{1}, a_{2}, \ldots, a_{n}$, there are $n!$ arrangements of $b_{1}, b_{2}, \ldots, b_{n}$. Thus, there are $n!n!=(n!)^{2}$ arrangements of this form. There are equally many arrangements of the form $b_{1}, a_{1}, b_{2}, a_{2}, \ldots, b_{n}, a_{n}$ (when a man is in the first place). Therefore, the total number of such arrangements is $2(n!)^{2}$.

b) Fix one element from the set $b_{1}, b_{2}, \ldots, b_{n}$. The remaining elements of this set can be arranged in $(n-1)!$ ways. For each such arrangement, $a_{1}, a_{2}, \ldots, a_{n}$ can be arranged in $n!$ ways. Thus, the number of desired arrangements is $(n-1)!n!$.