even harder coin problem solution
The key is, the 3 weighs can give you 27 possible outcomes (BBB, BBL, BBR, BLB,BLL,BLR.... etc, where BLR means Balance on first weigh, Left-tilt on second, Right-tilt on 3rd). We only need 12*2 = 24 outcomes to uniquely idenity one of the culprits (coin 6 heavier, coin 3 lighter, ...etc.).
Well I could give an example, lets consider 5 is heavier, then first weigh gives Left-tilt, 2nd weigh a Right-tilt, and 3rd one Left again. So the outcome is LRL. You can trace it backwards too.
Oops, back-tracing uncovers that LRL is possible when 8 is lighter or 5 is heavier. So I wasn't all that lucky. But, u can play around to fix it.
Your method can't tell the difference between 6 and 12
Fog Creek Home