# Discrete Math HW (Stuck)

I have no idea how to begin the following problem

Nautical flags are specially designed flags made up of several colors which can be used to signal from ship to ship, or ship to shore. Suppose there are 4 red, 5 blue and 8 yellow flags. How many different arrangements can be made if all the flags must be used on a vertical flag pole?

-
It's a trick question -- there is no solid blue maritime signaling flag. – Henning Makholm Nov 12 '12 at 0:33

There are a total of seventeen slots on the flagpole. The red flags can be placed in $\binom{17}{4}$ ways (we use combinations since the red flags are indistinguishable from each other). Next, we can place the five blue flags in $\binom{13}{5}$ ways (since there are only thirteen remaining spots). Finally, place the eight yellow flags in $\binom{8}{8}$ ways (which is just one - our only option is to fill the remaining eights spots with the eight yellow flags. Thus, there are $$\binom{17}{4}\binom{13}{5}$$ distinct placements of the flags.

-
How would that set up change if you only have 16 slots but still 17 flags to hang? – MKZ Nov 12 '12 at 1:00
@MKZ Perhaps there is a more efficient way, but I would break the problem into three cases: either I leave out a red blag, a blue flag, or a yellow flag. Now each case will have sixteen spots and sixteen flags to hang, and I could proceed as I did in my answer. Finally, add up the result from each case. – Austin Mohr Nov 12 '12 at 1:41
13 Choose 5 ways? – MKZ Nov 12 '12 at 2:02

Hint: "multinomial coefficient"

-

Hint Presumably there are $17$ "positions" for the flags. The positions of the red ones can be chosen in $\dbinom{17}{4}$ ways. For each of these ways, the positions of the blue flags can be chosen in $\dots$.

-