We have $4$ Americans, $3$ Russians and $5$ Chinese. They are forming a line and no nationality is allowed to form a block. How many possibilities are there?
A block just means that something like $AA...$ isn't allowed.
We have $12!/4!3!5!$ possibilities if we allow blocks, now we have to substract the possibilities with blocks. Let's take $2A$ and force them to be next to each other, we get $11$ possibilities; so $11(10!/2!3!5!)$. We have to do the same with $R$ and $C$ and we get
$12!/4!3!5! - 11(10!/2!3!5! + 10!/4!1!5! + 10!/4!3!3!)$. Is this correct?
I just used the $n!/k_1!k_2!...$ formula and don't really know where it comes from, can someone explain that maybe? And is there a more elegant solution?