Label the balls A, B, C, D, E, F, G, H, I, J, K, L. We
refer to the 3 weighings as #1, #2 and #3. "A vs B" means A is
on the left of the scale, B on the right; order matters.
Once the different ball has been found, it's relative mass
may be found by looking at any weighing where it was on the scale.
WEIGHING #1: ABCD vs EFGH
IF THIS BALANCES (A-H are "neutral"). Go to
weighing #2.a
WEIGHING #2.a: IJ vs KA
IF THIS BALANCES, weigh L vs A. L is either lighter
or heavier as indicated by this weighing.
OTHERWISE, weigh I vs J. If this balances, K is
different. If it doesn't balance, but goes the same way as
weighing #2, then I is different. If it goes the opposite way, J is
different.
OTHERWISE (I-L are "neutral"). Go to
weighing #2.b
WEIGHING #2.b: ABE vs CFI
IF OPPOSITE to weighing #1, C or E are different.
Weigh C vs I to determine the result. If this balances, E is different.
Otherwise C is different.
IF weighing #2.b is the SAME as weighing #1, weigh A vs B (weighing
#3.a).
If weighing #3.a balances, then F is different.
If weighing #3.a is the same as #1 and #2.b, then A is different.
If weighing #3.a goes the opposite way from #1 and #2.b, then B is different.
IF weighing #2.b BALANCES, weigh G vs H (weighing #3.b).
If weighing #3.b balances, then D is different.
If weighing #3.b is the same as #1, then H is different. Otherwise G is
different.