12-Ball Balance Puzzle
One of 12 balls has a different weight, but you do not know whether it is heavier or lighter. The challenge is to identify the ball and the direction of the difference in only three balance-scale weighings.
The three fixed weighings
Candidate states
Why this construction works
Each ball has a three-weighing placement signature: left pan, right pan, or off the scale. The signatures are chosen so that no two heavy/light possibilities generate the same three outcomes.
If the odd ball is heavy, its placement pushes the scale one way; if it is light, every non-balanced direction reverses. That lets the same three tests determine both which ball is odd and whether it is heavier or lighter.
Reference: Wikipedia — Balance puzzle, 12-ball problem