You’re currently locked in the dungeon by orders of the king, but as the realm’s greatest mathematician, you’ve been given a chance to free yourself: If you can identify a counterfeit coin, one fake coin in a group of twelve identical looking coins, you can earn your freedom.

Can you solve the counterfeit coin riddle? Don’t forget to hit pause and try to work out the problem before the solution is revealed! Then read more about this TED Ed lesson in logic by Jennifer Lu:

The counterfeit coin riddle is derived from the mathematics field of deduction, where conclusions are systematically drawn from the results of prior observations. This version of the classic riddle involves 12 coins, but popular variations can consist of 12 marbles or balls. Part of the appeal of this riddle is in the ease with which we can decrease or increase its complexity. A simple swapping of a few key words drastically alters the problem’s difficulty.

To make the problem simpler, for example, we can reduce the total number of coins to 9. To further simplify, we can reveal whether the counterfeit is lighter or heavier at the onset, as is shown here. For a harder version of the problem, start with 39 coins and four weighs.

Watch more puzzle videos like these: Matchstick Triangle Puzzle and can you solve the river crossing riddle?