Nine cars are parked in a row. Four of the cars are painted red and five are painted blue. In how many ways can the cars be parked so that there are never two red cars next to each other?

I think I know how to solve this but I am not sure.

First arranging the blue cars in line and specifying where the red ones could be parked.


Where $\color{blue}B$ stands for a parked blue car and $\color{red}X$ for a potential red car parking spot. So we have 6 $X's$ (red cars) and 5 $B's$ (blue cars). Note all cars are considered to be the same.

Then the answer is $C(6,4) = 15$?

  • 4
    $\begingroup$ You are correct! $\endgroup$ – Nicholas Oct 26 '15 at 11:11

For validation, consider the number of partitions of $5$ into at least $3$ parts, namely $311$ and $221$ which yield $3$ solutions each, $2111$ which yields $8$ solutions, and $11111$ which yields $1$ solution - total $15$ solutions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.