You have a lamp which needs batteries to run. You have batteries in total out of which are working batteries and the rest are dead. But you don't know which one is working or dead.
What is the least possible number of tries to check the batteries so that you are guaranteed to get a working triplet ?
[ Note :- The last try will not be considered if the result is sure.]
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Divide the batteries into 2 sets of 5 each. Try checking batteries in the first set (10 tries). If it didn't work then set 2 is guaranteed to have at least one working triplet. In worst case we have to check set 2 1 0 times. So we have a total of 20 tries. But note that in 20th try we are guaranteed to get a working triplet. We have tried 1 9 times in all !
Thanks to Mark Hennings for the solution.