If you have solved it then try it for N no. of identical balls with one defective ball.

See Solution : Heavier BallThe minimum no. of measures required are 2. Now can you solve it… ? Give it a try…

Here is the solution which tells you that how can you do it in 2 measurements.

Divide 8 balls into groups of 3, 3 and 2.

First weigh :

Weigh the two groups of 3 ball, now there are two possibilities

a) They are balanced (all 6 balls are of equal weight)

b) One side is heavier then the other.

case (a) :

The group of 2 has the defective ball. Weigh them with one on each side of balancing machine. The side which has more weigh has the heavier/defective ball.

case (b) :

We got the three balls of the side which is heavier. Now take any two balls and weigh them, then again there are two cases.

(i) They both are of equal weight.

(ii) One is heavier than the other.

for case (b)(i) :

The third ball is heavier/defective than all other balls

for case (b)(ii) :

The heavier ball is defective.

——————————————–

Solution for N no. of balls.

If there is 1 ball, No measurement is required.

If there are 2-3 balls, we need 1 measurement.[(3^0 +1) to 3^1]
If there are 4-9 balls, we need 2 measurement. [(3^1 +1) to 3^2]

Now if there are N balls

and lets say it lies between (3^(x-1) +1) to 3^x

then x = [logN/log3] = Greatest integer of logN to the base 3.

Then minimum no. of measures is equal to x = [logN/log3]