I've known "12 balls, weigh 3 times" since high school, but never went into it in detail since it seemed tedious, but also never read a solution since it's a beautiful puzzle. I've finally done it on my own today. No new information here, except that I'm doing a different second weighing in case I) a) than geoo.
12 balls, one is either lighter or heavier than all others.
Use a scale three times to determine which ball has what exact quality.
We call a ball "normal" if it is certainly not the single odd ball.
We call a ball "red" if it is either normal or heavier than the normal balls.
We call a ball "blue" if it is either normal or lighter than the normal balls.
Weighing I:
Put 4 balls on each side.
Case I a: Both sides are equal.
We now have 8 normal balls and 4 unknown ones.
Weighing I a II:
Put 3 unknown balls on one side, and 3 normal balls on the other.
Case I a II a: Both sides are equal.
We now have 11 normal balls and 1 unknown one. Weigh the unknown ball
against any single normal one for the end result.
Case I a II b: The 3 unknown balls are heavier than the 3 normal ones.
Weigh one of the red balls against another red ball to see which of
the 3 red balls is heavy.
Case I a II c: The 3 unknown balls are lighter than the 3 normal ones.
Weigh one of the blue balls against another blue ball to see which of
the 3 blue balls is light.
Case I b: One set of 4 balls is heavier than the other.
We now have 4 red balls, 4 blue ones, and know for sure that the unweighed
4 balls are normal.
Weighing I b II:
Left side: 2 red, 2 blue
Right side: 1 blue, 3 normal
Case I b II a: Both sides are equal.
All balls from weighing II must now be normal.
We have 2 red balls and 1 blue ball remaining from weighing I which
were not part of weighing II. Weigh the 2 red balls against each other.
If one is heavier, it's the odd ball, otherwise the blue ball is light.
Case I b II b: The left side is heavier.
The red balls from the left side stay red, all other red balls become
known as normal. Weigh the 2 red balls against each other. If one is
heavier, it's the odd ball. If they are equal, then the single blue
ball from the right side of weighing II must be light.
Case I b II c: The left side is lighter.
Weigh the two blue balls from the left side against each other to see
which is the light ball.
New weighing puzzle:
You have 2 black balls, 2 grey balls, 2 white balls. Among each color, one ball is heavier than the second. The three light balls are all of the exact same weight, as are the three heavy balls.
Your task to label each ball as heavy or light. You may use an ordinary balance scale (telling which side is heavier, if any) a total of two times.
-- Simon