1. ## Problem

I need help on how to solve this problem: Each car of a five car train must be painted a solid color. The only color choices are red, blue, and yellow. If each of these colors must be used for at least one car, in how many ways can this train be painted? Help would be appriciated Thank you.

2. Hello, jarny!

I have a rather primitive approach.
Maybe someone has a more elegant solution.

Each car of a five-car train must be painted a solid color.
The only color choices are red, blue, and yellow.
If each of these colors must be used for at least one car,
in how many ways can this train be painted?

The color distribution could be 3-1-1. .(Three of one color, one each of the others.)
. . There are $\displaystyle 3$ ways this could be done: RRRBY, RBBBY, RBYYY.
Once the colors are chosen, the trains can be painted in: .$\displaystyle \binom{5}{3,1,1} = 20$ ways.
Hence, there are: $\displaystyle 3 \times 20 \,=\,60$ ways to have 3-1-1.

The color distribution could be 2-2-1. .(Two each of two colors, one of the third.)
. . There are $\displaystyle 3$ ways this could be done: RRBBY, RRBYY, RBBYY.
Once the colors are chosen, the trains can be painted in: .$\displaystyle \binom{5}{2,2,1} = 30$ ways.
Hence, there are: $\displaystyle 3 \times 30 \,=\,90$ ways to have 2-2-1.

Therefore, there are: .$\displaystyle 60 + 90\,=\,150$ ways to paint the trains.

3. thanks but i see a flaw. In your 3-1-1 you have 20 ways. I dont see how the (5; 3,1,1) = 20 ways or how that math works. Just for red you could have: RRRBY RRRYB RBRRY RYRRB BYRRR YRRRB YRBRR BRYRR BRRRY BRRYR etc. So far thats 10 just for red which is = or >30. If you or others could resolve the problem. Maybe you could use some sort of combinations or permutations? Sorry but this is due tomorow by midnight so if someone could please help me? Thanks.

4. Originally Posted by Soroban Hello, jarny!

I have a rather primitive approach.
Maybe someone has a more elegant solution.

The color distribution could be 3-1-1. .(Three of one color, one each of the others.)
. . There are $\displaystyle 3$ ways this could be done: RRRBY, RBBBY, RBYYY.
Once the colors are chosen, the trains can be painted in: .$\displaystyle \binom{5}{3,1,1} = 20$ ways.
Hence, there are: $\displaystyle 3 \times 20 \,=\,60$ ways to have 3-1-1.

The color distribution could be 2-2-1. .(Two each of two colors, one of the third.)
. . There are $\displaystyle 3$ ways this could be done: RRBBY, RRBYY, RBBYY.
Once the colors are chosen, the trains can be painted in: .$\displaystyle \binom{5}{2,2,1} = 30$ ways.
Hence, there are: $\displaystyle 3 \times 30 \,=\,90$ ways to have 2-2-1.

Therefore, there are: .$\displaystyle 60 + 90\,=\,150$ ways to paint the trains.

Since you don't have a choice for three of the cars, all you need to do if find the combinations for 2 of the cars, which is 2x3=6

Of course that changes if the order is important.

5. Jarny,
Sorobans solution is correct. Clearly, order in implicit in the problem.
You confusion results for not knowing a basic counting rule.
Some texts label this the MISSISSIPPI rule.
There are $\displaystyle \frac{{11!}}{{\left( {4!} \right)\left( {4!} \right)\left( {2!} \right)}}$ ways to rearrange those eleven letters. We divide to account for the reparations: 2 Is, 4Ps and 4Ss.
To paint the cars RRRBY there are $\displaystyle \frac{{5!}}{{\left( {3!} \right) }}= 20$ ways to do it.

6. sorry! and thanks alot again! funny im a precalc honors student at my highschool with a A+ in the class and i couldnt figure out the problem. Never learned comb. or permutations before though so i guess i should learn them on my own. THANKS ALOT AGAIN I APPRECIATED IT.

#### Search Tags

problem 