There are 10 men and 10 women. Alice (woman) and Brad (man) never stand next to each other. There are 10 men and 10 women. Alice (woman) and Brad (man) never stand next to each other. Assume that the men and women alternate in a line, how many possible ways are there for the arrangement?
Without the condition of Alice and Bob not standing next to eachother, it would be 10! * 10! * 2. Now I need to subtract all the ways in which they could be stuck together, or 9! * 9! * 10 * 2. (I can elaborate on how I got this part if it is wrong)
So would the final answer just be 10!10!2 - 9!9!10*2 ??
 A: Pick the position of the leftmost member of alice and brad.  There are $19$ options.
Then, pick whether it goes male-female-male-female-... or vice versa.  $2$ options.
Finally from left to right for each spot designated for a male pick one of the remaining males to fill it and same for the females.  $9!\cdot 9!$ options.
This gives a total of $19\cdot 2\cdot 9!\cdot 9!$ options for Alice and Brad to stand next to one another, not $10\cdot 2\cdot 9!\cdot 9!$ as you had calculated.  You had effectively missed the cases where the leftmost of them was in an even index (with indices counting from one).
Continuing, this gives $10!\cdot 10!-19\cdot 2\cdot 9!\cdot 9!$ ways for them to not stand next to one another.
A: I agree that you're on the right track with subtracting from the total number of way in which just 10 men and 10 women can alternate each other. However, the formula for the ways in which Alice and Bob could be stuck together is 9!9!*4, because there are 9! ways for the women to be arranged, 9! for the men to be arranged, and 2! (or 2) ways for Alice and Bob to be next to each other, then 2 ways for the 9 men and 9 women to be alternating. So 9!9!*2*2, or 9!9!*4. 
Now get back to your CS 240 HW. 
