wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> hard >> CRIMINAL CUPBEARERS (answer)
(Message started by: gavnook on Nov 7th, 2002, 7:51pm)

Title: CRIMINAL CUPBEARERS (answer)
Post by gavnook on Nov 7th, 2002, 7:51pm
Here's the answer:

You need use 20 prisoners in order to save all 999 good bottles
Each one will drink a small portion of each of about half the bottles.
Prisoner #1 gets the a cup filled with a drip from each of the 1st 500 and #2 gets the 2nd 500
#3 gets the 1st and 3rd 250 while #4 gets the 2nd and 4th 250
#5 and 6 get every 125
#7 and 8 get every 64
#9 and 10 get every 32
#11 and 12 - 16
#13 and 14 - 8
#15 and 16 - 4
#17 and 18 - 2
and finally #19 gets the odd numbered bottles and #20 gets the even numbered bottles

After they drink, wait 5 weeks and see who died. If prisoners #1, #4, #5, #8, #10, #11, #13, #16, #17, and #20 die you throw away bottle 0+250+0+64+32+0+0+4+0+1=351 and drink the rest.

If you change the total bottles to 1024 (or just start prisoner #1 with 512 instead of 500) you can write a more elegant representation of the solution.

Title: Re: CRIMINAL CUPBEARERS (answer)
Post by towr on Nov 8th, 2002, 12:07am
you only need 10, 2^10 = 1024 (give every prisoner a drink whose  bit is 1 in the binary representation of the bottle number)

There was allready a thread about this riddle though..



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board