4

The simple version of the poisonous water problem can be described as follows: Given 1000 bottle with water with one bottle with poisonous water among 1000 bottles. You have several animal that can test the water. Once they drink the poisonous one(no matter how much) they will die 24 hours later. Now you want to find the poisonous one after 24 hours. Then the minimum amount of animal we need is 10 (log(1000)). Note that without the time limit it can be viewed as a binary search problem. Now the general form of this problem is what happens if we have m poisonous bottles instead of one? What's the answer of the minimum amount of animal we need? Theoretically I would say that the lower bound is not hard by taking the log of all the possibilities. But to find out the real value and algorithm is difficult. I will be grateful if someone can answer the general form of the problem

Update: I heard someone using m-(de)cimal but I don't see how this will leads to a simple answer.

essence16
  • 133
  • 1
    do we know $m$ ? – Asinomás Aug 15 '16 at 21:53
  • I'd suggest computing the amount of information (in the sense of information theory) that you need in order to determine which of the $m$ bottles are poisoned. This will give a lower bound on the work that you need to do which should be more or less tight. This is basically the trick in the case of one bottle: the information needed to figure out which bottle it is is the amount of information required to specify a number less than $n$, which is on the order of $\log_2(n)$. So presumably the information required is at worst $m \log_2(m)$, but maybe you can do better. – Ian Aug 15 '16 at 21:53
  • @CarryonSmiling Yes! for sure – essence16 Aug 15 '16 at 22:04
  • There is a closely related interesting problem: How many animals does it take if there are $N$ bottles and up to $m$ poison bottles? That problem is isomorphic to the problem of devising $m$-bit error correcting codes. – Mark Fischler Aug 15 '16 at 22:06
  • @MarkFischler I think cracking this problem in information theory way will be a good trial. Any further thought on this question? – essence16 Aug 15 '16 at 22:07
  • 1
    why $10\log(1000)$ Isn't it just $\log(1000)$ ? – Asinomás Aug 15 '16 at 22:11
  • I think the $1$ poisoned bottle case is $N>log_2 (1000)$ and so the smallest $N = 10$ – Doug M Aug 15 '16 at 22:13
  • 1
    @Rahul nope, the key is to recover the binary representation of the bottle, for this you use make the first cow try only the odd buckets, the second cow those buckets which are odd oafter removing the last bit, etcetera – Asinomás Aug 15 '16 at 22:13
  • if there are $b$ bottles and $m=b-1$ we clearly need $b-1$ animals – Asinomás Aug 15 '16 at 22:20
  • @Rahul Label the animals 1-10 in decimal. Label the bottles in binary from 0000000000 to 11110000100. Feed animal #n all the bottles where the n-th digit is 0. See which animals survive. If animal #n survives the posoin has a 1 in the nth binary position. If animal #n dies the poison has a 0 in the nth binary position. By checking which animals live or die you can determine all the digits in all 10 binary positions and those dertermine the exact bottle is the poison. – fleablood Aug 15 '16 at 22:50
  • Off the top of my head I'd say we need $log_{m+1} 1000$ animals. Instead of a binary sort we do a {m+1}-ary sort. – fleablood Aug 15 '16 at 22:55
  • @fleablood clearly not, that would make it a lot easier – Asinomás Aug 15 '16 at 23:02
  • Yeah, it won't work.... Oh, D'oh! that's a smaller number!!!! – fleablood Aug 15 '16 at 23:04
  • $\log_2 {1000 \choose m}$ There are ${1000 \choose m|}$ ways the poison can be distributed. But I don't know if this is the smallest. Oh, yes, it must be. – fleablood Aug 15 '16 at 23:14
  • Yes that's the obvious lower bound. However its not going to be exact. Does anyone have anything interesting even in the case $m=2$ ? – mercio Aug 15 '16 at 23:45
  • The case where $m$ is unknown was considered in this previous Question. – hardmath Aug 16 '16 at 00:39
  • A related problem when $m$ is unknown is (adaptive) Group Testing, where instead of trying to minimize the number of animals needed we just try to minimize the number of times we give an animal something to drink. It's known that $\log_2(\binom{n}{m}) + m$ trials work where $n$ is the total number of bottles, so certainly no more animals are needed than that. – larksford Aug 16 '16 at 15:16

2 Answers2

1

This problem is similar to but not identical to the $m-1$-error correction code problem ($m-1$ because the $\log_2(N)$ animals you would feed if $m=1$ correspond to the main $\log_2(N)$ bits you are correcting). The difference is that in this problem, the additional questions you ask (experiments you do, animals you feed) cannot themselves give erroneous results; in the correction code case, they can.

The other difference is that here, you know in advance there are precisely $m$ "errors."

At any rate, while there are in the literature nice methods for single and double error correction, and there are complex methods (see BCH theory) for dealing with multiple corrections, there do not seem to be bounds on the number of bits that can be corrected using $k$ additional bits, with those bounds constructively proven by demonstrating algorithms.

For your problem, we can show that there are cases where the "information theory" lower bound of $$\left\lceil \log_2\binom{N}{m}\right\rceil$$ does not suffice. Consider, for example, ten bottles, three of which are poisoned, which has $120$ possible answers. If you give any animal water from one bottle, then the answer splits the cases into $36$ if the animal dies and $84 > 64$ if the animal lives, so that leads to at least one extra trial compared to that bound. Giving any animal water from two bottles splits the cases into $64$ and $56$, but the $64$ cases in which the animal dies don't permit a splitting into $32|32$ on the next animal. Giving any animal water from more than two bottles splits the cases into $k>64$ and $120-k$.

The actual required number for general $N,m$ appears to be a hard problem.

Mark Fischler
  • 42,297
0

If there are $m$ bottles there are ${N \choose m}$ possible combinations. An animal lives or dies (binary) so you need $\log_2{N \choose m}$ animals to match all possibilities.

fleablood
  • 130,341