0

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?

Legolas
  • 361
  • 1
  • 11
  • 2
    Groups of three – mr eyeglasses Nov 17 '15 at 14:56
  • 1
    Related posts: http://math.stackexchange.com/questions/15423/optimal-algorithm-for-finding-the-odd-spheres ; http://math.stackexchange.com/questions/72055/comparison-trees ; http://math.stackexchange.com/questions/1531054/counterfeit-coin-problem-8-coins ; http://math.stackexchange.com/questions/667601/finding-the-unique-rock-with-its-weight – colormegone Nov 17 '15 at 15:02

2 Answers2

1

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. :)

Atvin
  • 3,392
1

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
barak manos
  • 43,109