You first weigh 4 balls against another 4 balls. Let's say we
start by putting balls 1-4 on the left side, and balls 5-8 on the right
side. There are three outcomes: (A) they balance; (B) the left side
goes down; or (C) the right side goes down.
(A) Both sides balance. This means that balls 1-8 are regular
and are no longer possibilities. On the second weighing, place balls
9 and 10 on the left, and ball 11 and a regular ball on the right.
There are three outcomes: (A1) they balance; (A2) the left side goes
down; or (A3) the right side goes down.
(A2) If the left side goes down, (9,10 11,x) then ball 9 or 10 is heavy or
ball 11 is light. For the 3rd weighing, weigh ball 9 against 10.
If either side goes down, that is the heavy ball. If they balance,
then ball 11 is light by process of elimination.
(A3) If the right side goes down, (9,10 11,x) the ball 9 or 10 is light or
ball 11 is heavy. weigh ball 9 against 10. If either side goes
up, that is the light ball. If they balance, then ball 11 is heavy
by process of elimination.(A1) If they balance, ball 12 is odd. To determine
if it is heavier or lighter than the rest, weigh ball 12 against any other
ball.
THE REST OF THE ANSWER.