cover me in ashes

lundi


Cute interview question:

(Variants of this have appeared elsewhere, I believe):

There are 1000 bottles of wine, exactly one of which is poisoned. You will be serving the wine tomorrow, so you don't want to serve poisoned wine.

To try to find as many bottles of unpoisoned wine as possible, you have 10 lab rats. Each rat can be given samples from one or more of the bottles. If the rat drinks unpoisoned wine, nothing happens. If he drinks poisoned wine, he dies.

The problem is if a rat dies, he dies tomorrow, so you can only run *one* experiment before serving the wine. The question is, how many bottles can you hope to serve tomorrow (and guarantee they are all unpoisoned)?

For example, if you give each rat 100 unique bottles, one rat will die. You won't know which of the 100 he drank is poisoned, but you know the remaining 900 aren't, so you can serve 900 bottles tomorrow.

Hint/Spoiler (highlight):

You can serve 999 (as in detect which bottle is exactly poisoned). Remember, 2^10 = 1024 > 1000.


posted by ncmhp @ 4.12.06

covermeinashes : a syndicated collective

covermeinashes is:
anodyne. wayward wordsmith latter day aesculapius.
ncmhp. ....
fcs
.
tormented lover poet bard.

diversions

contrails

Powered by Blogger