I have a red, green and blue ball.

They can be repeated
I have 4 bags to put the balls into.
I have to use all 3 colors.
so I could have red red green blue or I could have red red blue green...etc, etc.
Is there a way to figure out how many possible combinations there are? The answer is supposed to be 36... I think. Any help would be appreciated.
I was able to do it with just 2 colors (red and green), but the 3 colors is stumping me. Thanks

Call the balls r,g,b,x

There are 4P3 = 12 ways to put 3 balls into the bags
There are 3 choices for the x ball

Thanks so much it makes sense.

To figure out the number of possible combinations with three colors (red, green, and blue) and four bags, you can use the concept of permutations with repetition.

In this case, each ball has three choices (red, green, or blue) and can be placed into any of the four bags. Since the balls can be repeated, the number of possible combinations is calculated as:

Number of possibilities per ball ^ Number of balls

In this case, it would be 3^4 = 81. However, this would also include cases where one or two colors are missing. To eliminate those cases, we need to calculate the number of combinations where all three colors are used.

To calculate the number of combinations where all three colors are used, we can subtract the cases where only two colors are used or only one color is used.

1. Cases where only one color is used: For each color, there are 4 possibilities of which bag it can go into. So, there are 4 possibilities with one color, and since there are three colors, the total number of cases is 4 * 3 = 12.

2. Cases where two colors are used: For each pair of colors, there are 4C2 = 6 possibilities of which two bags they can go into. Since there are three pairs of colors (red-green, red-blue, green-blue), the total number of cases is 6 * 3 = 18.

Now, to find the number of combinations where all three colors are used, we subtract the cases from steps 1 and 2:

Total possibilities - Cases with one color - Cases with two colors
81 - 12 - 18 = 51

Hence, there are 51 combinations where all three colors are used.