## 9 Balls Puzzle (Interview Puzzle)

###### 2 years ago Lalit Bhagtani 0

**9 Balls Puzzle :-** You have given a two-arm balance scale and 9 identical looking balls. One of the ball is of different weight(heavier/lighter) than rest of the 8 balls, which all are of equal weight. You have to find out the different weight(heavier/lighter) ball and identify whether the ball is heavier or lighter by using two arm balance scale, the minimum number of times.

This 9 balls puzzle problem is very similar to 8 Balls Weight Puzzle, where 8 identical looking balls are given and one of the balls is heavier than rest of the 7 balls.

## Now try to solve this on your own…

## Solution of 9 Balls Puzzle :-

The optimal solution for 9 balls puzzle is three weighing’s, solutions are as follows :-

## Three weighing’s :-

Divide the 9 balls into three sets, each containing 3 balls each. Let’s name them for easy understanding. A {3 balls}, B {3 balls}, C {3 balls}. Now weigh them against each other to find out the set containing different weight(heavier/lighter) ball and whether the ball is heavier or lighter.

**First weigh :-** Weigh A {3 balls} vs. B {3 balls}, Now either the scale will balance or the scale will not balance and one side will be heavier.

**Second weigh (a) :-** If the scale is balanced, then the different weight(heavier/lighter) ball must be in C{3 balls} which was not weighed. Now weigh A {3 balls} vs C {3 balls} to find out whether the ball is heavier or lighter. If C {3 balls} is on lighter side then a ball is lighter or if C {3 balls} is on heavier side then a ball is heavier.

Till now we have identified that different weight(heavier/lighter) ball is present in C {3 balls} and whether the ball is heavier or lighter. Let’s assume it is heavier.

**Third weigh (a) :-** Weigh any two balls (1 ball vs. 1 ball) from C {3 balls}. If the scale balances, then the ball that didn’t get weighed is the heavy ball. If the scale does not balance, the ball on the heavier side is the heavy ball.

**Second weigh (b) :-** If the scale is not balanced, then the different weight(heavier/lighter) ball must be either in A{3 balls} or in B{3 balls}. Now weigh A{3 balls} vs C{3 balls}.

If the scale is balanced, then the ball must be in B{3 balls} and will be lighter if B{3 balls} was on the lighter side or will be heavier if B{3 balls} was on the heavier side during First weigh.

If the scale is not balanced, then the ball must be in A{3 balls} set and will be lighter if A{3 balls} was on the lighter side or will be heavier if A{3 balls} was on the heavier side during First weigh.

Till now we have identified that different weight(heavier/lighter) ball is present in A {3 balls} or B {3 balls} and whether the ball is heavier or lighter. Let’s assume A{3 balls} contain the ball and it is heavier.

**Third weigh (b) :-** Weigh any two balls (1 ball vs. 1 ball) from A {3 balls}. If the scale balances, then the ball that didn’t get weighed is the heavy ball. If the scale does not balance, the ball on the heavier side is the heavy ball.

That’s all for 9 balls Puzzle, If you liked it, please share your thoughts in a comments section and share it with others too.For more interesting puzzles visit Interview Puzzles.