What's wrong with this combination? There are $20$ students. $8$ of them are boys while the other $12$ are girls. I have to pick $4$ of them and I need to have at least one boy and one girl in my pick.
There are $4$ spots to choose. Let's name them A, B, C, and D.


*

*I have $12$ options to choose a girl for the first spot.

*I have $8$ options to choose a boy for the second spot.

*I have $18$ options to choose anyone for the third spot.

*I have $17$ options to choose last person.


From above, I have $12 \cdot 8 \cdot 18 \cdot 17$ which is $29376$. Anyway, the order doesn't matter so I divide $29376$ by $4!$ and get $1224$.
But the answer is $4280$ and they get that number by getting all possibilities of choosing a team ${20 \choose 4}$, then subtract it with possibility of choosing all girls ${12 \choose 4}$ and choosing all boys ${8 \choose 4}$.
I just don't understand why the method I use leads me to an incorrect answer.
 A: You can't simply divide by 4! because that can only be done if the combinations you are counting with $12 \cdot 8 \cdot 18 \cdot 17$ is already partially ordered with the first two products corresponding to the first male and female chosen. You could divide by 4! if there was no semi-ordering on the first two picks.
The solution you proposed from "them" is correct.
A: Consider the case where you choose Amy (a girl) along with
Bert, Carl, and Dave (three boys).
When you divide by $4!$ in your counting method, you implicitly assume that
there are $4!$ sequences in which you might have chosen 
Amy, Bert, Carl, and Dave. But in fact here are the only six sequences
in which you could have chosen these particular four children,
because you always put a girl in the first spot:


*

*Amy, Bert, Carl, Dave

*Amy, Bert, Dave, Carl

*Amy, Carl, Bert, Dave

*Amy, Carl, Dave, Bert

*Amy, Dave, Bert, Carl

*Amy, Dave, Carl, Bert


So in this case, by dividing by $4!$ you have undercounted by a factor of $4$.
In fact every case is undercounted, because the implicit assumption
of $4!$ sequences includes several sequences in which the "first" child
is a boy or the "second" is a girl (or both), none of which can
actually be produced by your selection procedure.
A: To get the grip on the at-least conditions you can calculate the number of all combinations without conditions minus the number of combinations with no girls (only boys) and no boys (only girls):
${20 \choose 4}-{12 \choose 4}-{8 \choose 4} $
You calculate "Number of possible events"-" Number of complementary events"="Number of required events"
A: The problem is that the first spot needn't be for a girl and the second neddn't be for a boy.
The correct way to do this problem is:


*

*There are $\binom{20}4=4845$ ways to choose the four people.

*There are $\binom{12}4=495$ ways to choose $4$ girls.

*There are $\binom{8}4=70$ ways to choose $4$ boys.


Result: $4845-(495+70)$.
