# Nine same balls with one heavier

There are nine same balls,which all weigh the same except one , which is heavier than each others from the rest. How we can with just two weighings to find out which is the heavier ball?(We are using scale with two discs)

Could anyone help me with this puzzle?

• Groups of three – mr eyeglasses Nov 17 '15 at 14:56
• – colormegone Nov 17 '15 at 15:02

Make $3$ groups: Each group will consist $3$ balls. Weight $2$ groups. If they are the same, then the group we didn't choose has the heavier ball. If one of them is heavier, then that group has the heavier. So far, with $1$ weighing, we have $3$ balls left. Make the same tactic again: Make $3$ groups. Each group will consinst $1$ ball. If they are the same, then the one we didn't choose is the heavier, if one is heavier, that is the heavier ball. Hope you can understand the logic behind it. :)

Pseudo Code:

compare B1+B2+B3 with B4+B5+B6
if B1+B2+B3 > B4+B5+B6 then:
compare B1 with B2
if B1 > B2 then return B1
if B1 < B2 then return B2
if B1 = B2 then return B3
if B1+B2+B3 < B4+B5+B6 then:
compare B4 with B5
if B4 > B5 then return B4
if B4 < B5 then return B5
if B4 = B5 then return B6
if B1+B2+B3 = B4+B5+B6 then:
compare B6 with B7
if B6 > B7 then return B7
if B6 < B7 then return B8
if B6 = B7 then return B9