The first step: divide the coins into 3 groups of 4: 1 2 3 4, 5 6 7 8, 9 10 11 12.
Compare the first two groups. There are three options:
- the first group is heavier;
- the second group is heavier;
- are equal.

1) If the groups are equal, then the counterfeit coin is in the third group. It is necessary to find a fake coin of 4 coins for two weighings.
Divide the third group into two: 9 10 11 12
Compare 9 and 10:
- if they are equal, then a fake coin in the second group - we compare 9 and 11. If 9 and 11 are equal, then a false one - 12, if not -11
- if they are not equal, then fake in the first group - we compare 10 and 12. If 10 and 12 are equal - fake - 9, if not - 10.
So we found a fake coin.
2) Consider the second case. If the first group is heavier than the second, then we assign the first character “>”, the second group “<”, the third group - “0”.
We divide the coins into groups of 1 9 10 11 and 5 2 3 4, we weigh. There are three options:
- Are equal. A fake coin is among the numbers: 6 7 8. Compare 6 and 7, if equal - fake - 8, if 6 is more, then fake - 7, if 7 is more, then fake - 6, since in this case the fake coin is easier.
- The first group is heavier, then a fake coin is either 1 or 5. We compare 1 and 9, if they are equal - a fake coin - 5, if not - 1.
- The first group is easier, then fake among 2 3 4 coins, since it is known that 9, 10 and 11 are real, and the second group can only outweigh coins 2, 3 and 4. We compare 2 and 3, if equal, fake 4, if 2 is heavier, then false is 2, otherwise the 3rd is fake.
3) The case when the second group is heavier than the first is similar to the second.
The general diagram of the “Decision Tree” is presented below.
