# Puzzles & Tricks: Twelve Coins Solution

## Twelve Coins Solution

Twelve Coins Puzzle

This video presents the solution to the twelve coins puzzle. If you have not watched that video, you should watch it here first.

To explain the solution, we use a color code scheme to represent the state of knowledge that we have about each particular coin. Now, each coin can be lighter than, equal to, or heavier than the genuine coins. We represent these states as the colors of the coins: red, green, and blue, respectively.

Additionally, we can use color mixtures to represent that a coin is either lighter than or equal to a genuine coin. These states are represented by the colors green and red, which make yellow when they are mixed (the colors are mixtures of light). So, yellow is used to represent that a coin is know to be either lighter than or equal to a genuine coin. The full table is shown above.

To begin with, we know nothing about the state of the coins. This fact is represented by starting with all of the coins being colored white. As we weigh coins on the pan balance, the colors of the coins will change until we have 11 green coins (genuine) and one that either red or blue (counterfeit).

To represent our colors, we will use the first letter of each color name: r = red, g = green, b = blue, y = yellow, c= cyan, m = magenta, w = white. With these abbreviations, we can describe the full set of weighings to find the counterfeit coin and determine whether it is lighter or heavier. The weighings are shown below.

The first index represent the weighing number: 1, 2, or 3. Then, we have the outcome of the previous weighing: Even, Uneven, Light, or Heavy. Light, Even, and Heavy, represent the first pan being up, even or down, respectively. We use Uneven to specify that the weighing is Light or Heavy, when it does not matter which one it is. After the outcome of the previous weighing, we specify state of our knowledge after the previous weighing. Finally, after the colon, we specify the coins that are weighed by their colors.

For example, on the first line, we begin with 12 white coins and make our first weighing with 4 white coins on each side. If both side are equal, we have the case that is specified in the next line: Even 8g+4w : weigh 1w+1g vs 2w. This says that our first weighing was even and resulted in 8 green coins and 4 white ones. For our second weighing, we put 1 white coin on the left and 2 white coins on the right.