Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Riddles, brain puzzles and mathematical problems
MyRedNeptune Offline
Senior Member

Posts: 553
Threads: 3
Joined: May 2012
Reputation: 33
RE: Riddles, brain puzzles and mathematical problems

(03-25-2014, 07:09 PM)Bridge Wrote: Neither. The 10th rat drinks from 512 bottles just like the rest of them. At the end of the process, all you know is which 512 bottles contain the poison (e.g. you can rule out the other 512.) You still need to repeat the process until only two possibilities remain.

You're right that each rat drinks 512 bottles. But the pattern of the sampling means that every step rules out an additional half of the amount of bottles of the step before it, which after 10 steps rules out 2^9 + 2^8 + 2^7 + ... ... + 2^1 + 2^0 = 1023 bottles. The chart I attached illustrates this pattern:

[Image: chart.png]

Note that the darker cell colors mark the range of medicine sampled by a rat. You can see that that already on the 3rd step it is possible to tell which 128 bottles include the poison. It is not necessary to wait for the deaths to occur because our sampling pattern is constant. As an example, if the number of the poison bottle is 666, then 20 hours after the sampling rat 1 would be alive, rat 2 would be dead and rat 3 would be alive.


Here's a better way to look at it. This is essentially the same solution, but illustrated differently.

Let's write down 1024 as its 2-bit equivalent (10000000000) and label all the bottles accordingly.

Now, let's take 10 rats and assign to each rat a certain position in the number 10000000000, so that each rat only samples medicine in which there is a 0 at said position of its number. The following list illustrates this concept. The string of 11 characters represents the type of number assigned to each rat, where $ is any binary digit:

Rat 1 -   $0$$$$$$$$$
Rat 2 -   $$0$$$$$$$$
Rat 3 -   $$$0$$$$$$$
Rat 4 -   $$$$0$$$$$$
Rat 5 -   $$$$$0$$$$$
Rat 6 -   $$$$$$0$$$$
Rat 7 -   $$$$$$$0$$$
Rat 8 -   $$$$$$$$0$$
Rat 9 -   $$$$$$$$$0$
Rat 10 -  $$$$$$$$$$0

I think this list does a better job than the colored chart at showing how the poison will be found. Since we are using binary, there can only be either a 0 or a 1 at each position. The state of each rat after 20 hours will determine which one it is, and then we will have a full number which will be the number of the poisonous bottle.





@BAndrew (what's up with the new name? Tongue) - Hm, I'm having trouble understanding your solution. Which rats get which medicine? I'm a bit confused.

(03-25-2014, 06:29 PM)Titanomegistoterastiotatos Wrote: Actually he didn't meant to do this.

Also, part of this sentence is incorrect. Can you guess which?

^(;,;)^
(This post was last modified: 03-25-2014, 08:53 PM by MyRedNeptune.)
03-25-2014, 08:43 PM
Find


Messages In This Thread
RE: Riddles, brain puzzles and mathematical problems - by MyRedNeptune - 03-25-2014, 08:43 PM



Users browsing this thread: 7 Guest(s)