Tabs

Friday, January 29, 2016

1 Ball is defected of 8 can you find in 2 weighs?

There are 8 balls. 7 of them weigh the same. 1 of them has a different weight, (you don’t know if it’s heavier or lighter). How do you find the odd ball with 2 weighs?

Answer:-

Tricky question, Right?

NO, It is not possible.

This can be explained by information theory. We need to extract 16 units of information (A ball may be light or heavy -2 units and it can be one of 8 balls). However, we gain just 3 units of information (light, heavy or equal).

So, we need ceil[log3(16)] = 3 weighing.

In the similar question you linked to,
we had 24 units of information and so we needed ceil[log3(24)] = 3 weighing.

please leave comments if you have any questions.

No comments:

Post a Comment