5. This is a real toughie. Along the way, we'll denote coins
we know nothing about with '?'; coins that can't be the odd
coin with '0'; coins that must be heavier if they're odd with 'H';
and coins that must be lighter if they're odd with 'L'.
STEP 1. Weigh four coins against four coins. Either (a) they
balance or (b) they don't. So (a) looks like 00000000???? and (b)
looks like HHHHLLLL0000.
STEP 2(a). Weigh two '?' coins against one '?' and one '0'.
There are three possible results: (i) they balance, (ii) the '??'
side is heavier, (iii) the '?0' side is heavier.
STEP 3(a)(i). Since the scales balanced again, we now have
00000000000?. The last coin must be the odd coin. Weigh it against
an '0' coin to see whether it's too heavy or too light.
STEP 3(a)(ii). The 4 coins not weighed in step 1 now are HHL0.
Weigh H against H. If the scales balance, L is the odd coin and is lighter
than the other coins. Otherwise, the tip of the scale tells you which
is H is in fact heavier and which is actually an 0 coin.
STEP 3(a)(iii). Proceed as in 3(a)(ii), but with L's and H's switched.
STEP 2(b). We so far have HHHHLLLL0000. Weigh HHL against HL0.
There are three possible results: (i) they balance, (ii) the 'HHL'
side is heavier, (iii) the 'HLO' side is heavier.
STEP 3(b)(i). The five "candidate" coins on the scale in the last
step must be ok, leaving HLL000000000. Proceed as in step 3(a)(iii).
STEP 3(b)(ii). The three "candidate" coins not weighed in the
last step must be ok. Also, since HHL was heavier than HL0, either
an H from the left side is truly heavier or the L on the right
side is truly lighter. This gives HHL000000000, so proceed as
in step 3(a)(ii).
STEP 3(b)(iii). Again, the three "candidate" coins not weighed
in step 2(b) are ok. Since HL0 was heavier than HHL, either
the H on the left is truly heavier or the L on the right is
truly lighter. Weigh the H coin against any 0 coin. If they
balance, the L is truly lighter; if not, the H is truly heavier
(and the scale will tip toward H).