PDA

View Full Version : The Emporer



Pokemon Trainer Red
August 5th, 2012, 03:15 PM
You are the ruler of a medieval empire and you are about to have a celebration tomorrow. The celebration is the most important party you have ever hosted. You've got 1000 bottles of wine you were planning to open for the celebration, but you find out that one of them is poisoned.

The poison exhibits no symptoms until death. Death occurs within ten to twenty hours after consuming even the minutest amount of poison.

You have over a thousand slaves at your disposal and just under 24 hours to determine which single bottle is poisoned.

You have a handful of prisoners about to be executed, and it would mar your celebration to have anyone else killed.

What is the smallest number of prisoners you must have to drink from the bottles to be absolutely sure to find the poisoned bottle within 24 hours?

It is much smaller than you first might think. Try to solve the problem first with one poisoned bottle out of eight total bottles of wine.
Good luck!

Gzz
August 6th, 2012, 02:08 AM
I need 500 slaves for determinate for sure what is the poisone bottle

Pokemon Trainer Red
August 8th, 2012, 09:42 AM
I need 500 slaves for determinate for sure what is the poisone bottle
Read the hint ;)

Nick
August 8th, 2012, 09:52 AM
Death occurs within ten to twenty hours

1000 prisoners...

EDIT:

because


under 24 hours to determine which single bottle is poisoned

Nick
August 8th, 2012, 09:56 AM
So if each prisoner can drink from different bottles of wine...

How many bottles can they drink from?

CmG
August 8th, 2012, 09:59 AM
Topic is wrong. Its called an Omporor!

Nick
August 8th, 2012, 10:16 AM
If there must be poison in one of the bottle

with limited time... 999 prisoners

with unlimited time...

m^n > 1000
m ~ n
Total = m+n - 2 (because must have)

2^2 = 4
3^3 = 27
4^4 = 256
5^5 = 3125

4^5 = 1024
5^4 = 625

Total = 4 +5 -2 = 7

JSaint
August 8th, 2012, 10:28 AM
Thanks to a large amount of Black Oo Long Tea, the logical side of my brain seems to be functioning again.

This question is similar to the Birthday problem.

How many people do you need in a room to guarantee that you will find someone with the same birthday?

Based on the pigeon hole principle, the answer is 366. Simply because there are 365 days in a year. Statistically even in the unlikely case where all of them had a different birthday from each other, there is an extra person that CANNOT fit outside these constraints and will share a birthday with all the others.

Let's say we just want the probability to be more than half. How many do we need then?

The answer to this question is actually 23. Which is a surprisingly small number.

Unfortunately, I failed discreet maths, so I am gonna let Wiki do some of the talking

http://en.wikipedia.org/wiki/Birthday_problem

This principle might be useful in solving this. Although, I admit that I am not completely sure at this point how to modify this and apply it because the problem feels abit different. Maths was never my forte though I do programming.

cookies4you
August 9th, 2012, 06:23 PM
Thanks to a large amount of Black Oo Long Tea, the logical side of my brain seems to be functioning again.

This question is similar to the Birthday problem.

How many people do you need in a room to guarantee that you will find someone with the same birthday?

Based on the pigeon hole principle, the answer is 366. Simply because there are 365 days in a year. Statistically even in the unlikely case where all of them had a different birthday from each other, there is an extra person that CANNOT fit outside these constraints and will share a birthday with all the others.

Let's say we just want the probability to be more than half. How many do we need then?

The answer to this question is actually 23. Which is a surprisingly small number.

Unfortunately, I failed discreet maths, so I am gonna let Wiki do some of the talking

http://en.wikipedia.org/wiki/Birthday_problem

This principle might be useful in solving this. Although, I admit that I am not completely sure at this point how to modify this and apply it because the problem feels abit different. Maths was never my forte though I do programming.
You speak using my form of logic.

You now have my respect.

Pokemon Trainer Red
August 9th, 2012, 07:40 PM
If there must be poison in one of the bottle

with limited time... 999 prisoners

with unlimited time...

m^n > 1000
m ~ n
Total = m+n - 2 (because must have)

2^2 = 4
3^3 = 27
4^4 = 256
5^5 = 3125

4^5 = 1024
5^4 = 625

Total = 4 +5 -2 = 7
Incorrect, close though!

Pokemon Trainer Red
August 9th, 2012, 07:41 PM
Thanks to a large amount of Black Oo Long Tea, the logical side of my brain seems to be functioning again.

This question is similar to the Birthday problem.

How many people do you need in a room to guarantee that you will find someone with the same birthday?

Based on the pigeon hole principle, the answer is 366. Simply because there are 365 days in a year. Statistically even in the unlikely case where all of them had a different birthday from each other, there is an extra person that CANNOT fit outside these constraints and will share a birthday with all the others.

Let's say we just want the probability to be more than half. How many do we need then?

The answer to this question is actually 23. Which is a surprisingly small number.

Unfortunately, I failed discreet maths, so I am gonna let Wiki do some of the talking

http://en.wikipedia.org/wiki/Birthday_problem

This principle might be useful in solving this. Although, I admit that I am not completely sure at this point how to modify this and apply it because the problem feels abit different. Maths was never my forte though I do programming.
Same as what I said with Nick. Read the hint ;)

MoDTassadar
August 9th, 2012, 07:44 PM
10 Prisoners...

Edit: Still thinking about it, may edit later...

MoDTassadar
August 9th, 2012, 08:08 PM
For those of you who are stuck, here is a hint: combination.

So, as stated by the hint in the OP, it leads to combination. Example: Prisoner A drinks bottle 1; Prisoner B drinks 2; C, 3; A+B 4; B+C 5; A+C 6; A+B+C 7; if no one dies from those, then 8 is the poisoned bottle.

If Prisoner A dies, and no one else, 1 is poisoned.

If Prisoner B dies, and no one else, 2 is poisoned.

If Prisoner C dies, and no once else, 3 is poisoned.

If Prisoners A and B die, 4 is poisoned.

If Prisoners B and C die, 5 is poisoned.

If Prisoners A and C die, 6 is poisoned.

If Prisoners A, B, and C die, 7 is poisoned.

If no one dies, 8 is poisoned.

Nick
August 9th, 2012, 08:24 PM
EDIT: Can't be solved with formula
EDIT2: Deleted

Nick
August 9th, 2012, 08:37 PM
Blast it.

2^10 = 1024

1000
500
250
125
63
32
16
8
4
2
1

Nick
August 9th, 2012, 08:41 PM
EDIT: deleted

MoDTassadar
August 9th, 2012, 08:46 PM
It is 10 prisoners, right?

Nick
August 9th, 2012, 08:53 PM
Yeah. Mine is for lowest m+n, not mn. Wrong solution.

Nick
August 9th, 2012, 10:28 PM
Yeah. Mine is for lowest m+n, not mn.

This is not true. Your "formula" is !@#$.

Pokemon Trainer Red
August 10th, 2012, 06:19 AM
It is 10 prisoners, right?
Correct. Posting solution now.

SOLUTION
10 prisoners must sample the wine. Bonus points if you worked out a way to ensure than no more than 8 prisoners die.

Number all bottles using binary digits. Assign each prisoner to one of the binary flags. Prisoners must take a sip from each bottle where their binary flag is set.

Here is how you would find one poisoned bottle out of eight total bottles of wine.
5198
In the above example, if all prisoners die, bottle 8 is bad. If none die, bottle 1 is bad. If A & B dies, bottle 4 is bad.

With ten people there are 1024 unique combinations so you could test up to 1024 bottles of wine.

Each of the ten prisoners will take a small sip from about 500 bottles. Each sip should take no longer than 30 seconds and should be a very small amount. Small sips not only leave more wine for guests. Small sips also avoid death by alcohol poisoning. As long as each prisoner is administered about a millilitre from each bottle, they will only consume the equivalent of about one bottle of wine each.

Each prisoner will have at least a fifty percent chance of living. There is only one binary combination where all prisoners must sip from the wine. If there are ten prisoners then there are ten more combinations where all but one prisoner must sip from the wine. By avoiding these two types of combinations you can ensure no more than 8 prisoners die.

One viewer felt that this solution was in flagrant contempt of restaurant etiquette. The emperor paid for this wine, so there should be no need to prove to the guests that wine is the same as the label. I am not even sure if ancient wine even came with labels affixed. However, it is true that after leaving the wine open for a day, that this medieval wine will taste more like vinegar than it ever did. C'est la vie.

Nick
August 10th, 2012, 08:40 PM
A - 1234____
B - ____5678
C - 12__56__
D - __34__78
E - 1_3_5_7_
F - _2_4_6_8

Nick
August 10th, 2012, 08:48 PM
Mathematical solution to the reason for splitting into two.

m^n = a
n ln(m) = ln(a)
n = ln(a) / ln(m)

mn = b

For smallest b possible for mn combination

m ln(a) / ln(m) = b
db/dm = ( ln(a) ln(m) - m ln(a) / m ) / ln(m) ln(m) , m > 0
0 = ln(a) ( ln(m) - 1 ) / ln(m) ln(m) , m > 0
ln m = 1
m = e
m = 2.718
Rounded
m = 3

But poison is confirmed
m - 1 = 2

d2b/dx2 = +ve