Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it,
follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given
their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!
Posts
An evil king has a wine cellar with 1,000 bottles. Somebody sneaks in a poisons one of them, but nobody knows which. The poison is so potent that even diluted massively, it'll still kill, but the symptoms can take anywhere between a day and a week to show up. What is the minimum number of foodtasters the king needs to use to be able to drink his wine 7 days from now?
There are all sorts of fun alternates too... like "assume he has X foodtasters, what's the best strategy to minimize the number of deaths?" or "One of his foodtasters is resistant to the poison, how many are needed minimum?" Etc etc. There's really no point to the duration stuff other than to discourage people saying "bring out 1,000 stopwatches and then stare at your prisoners to determine the exact time of death."
least number of people with unlimited time:
logbase2(n) where n is the number of bottles. So 10 since 2^10 is 1024.
What you do is you put one drop from the first 500 bottles together to make one drink. Give it to someone. If the person dies you know that poison is in the first 500 bottles. Now make a drink from the first 250. See if person is poisened. etc..
Which means assuming 1024 bottles instead.
Then after first narrow
-poison is in one of 512 bottles
then
-poison is in one of 256
- 128
- 64
- 32
- 16
- 8
- 4
- 2
- 1
Is not going to take 7 days as each stop could take up to 7 days; process will prolly take between 7-70. Binary search ftw. Do I get a cookie?
So, no. You get no cookie.
Wine tasters:
Do we need a definition of "enjoy his wine" because he can enjoy at least 500 bottles with just one tester in one week.
Obviously with unlimited time, you just have the guy start tasting one bottle a week until he dies and then throw out that bottle.
The king's later flash of insight was unfortunately his last, as he realizes the tester had a random heart attack.
Or they get fed up with the waiting and just shoot him with a crossbow for lack of wine and his reign ends prematurely, yes. I mean it'd be nearly 20 years if they were exceptionally unlucky.
Assume he has a big evil party to throw.
An evil party? Wouldn't he want the wine poisoned?
I'll try this.
If N is 11, then you get 11C0 + 11C2 + 11C4 + 11C6 + 11C8 + 11C10 = 1 + 55 + 330 + 462 + 165 + 11 = 1024, which is greater than 1000.
This works the same as Smasher's solution, except it leaves a gap between the combinations to allow for a single tester to resist the poison without disrupting the combinations he's involved in. If more testers are resistant, the gap would need to be further increased in the same manner.