Derangements Problem: Color Water

73 Views Asked by At

The problem: say I want to sell 4 different types of colored water: red, green, blue, and yellow. I also want to use colorful bottle caps, which are also red, green, blue, and yellow. However, I'm not allowed to see bottles of water where the cap is the same color as the water. (e.g. I won't sell a bottle with a red cap that also has red water). If I'm selling bottles in packs of 4 such that each pack has a bottle of water of all 4 colors, as well as a bottle cap of all 4 colors, how many possible packs of water can I create? This is assuming that the order of the bottles doesn't matter.

1

There are 1 best solutions below

0
On

Start with Red water. There are three possible caps, lets say we put a cap of color blue on there. Now let blue be the next bottle. Since the blue cap is accounted for, there are three possibilities: {Red,Green,Yellow}. If red, we are done. Let green and yellow each have a cap of the other color. If green or yellow we are also done because we have two caps left and either the green or yellow bottle can not have a cap of the same color.

The solution to the four bottle/bottle cap derangement is thus:

$$\text{Number of derangements }=3\cdot3 = 9.$$