wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> Truck load of pills
(Message started by: jdk on May 12th, 2012, 8:37am)

Title: Truck load of pills
Post by jdk on May 12th, 2012, 8:37am
Puzzle goes like this:
There is truck load of pills, life saving drug.
1 pill is poisonous either weight less or more then others
You have weighing machine such that u can put pill on either side and compare weight.
You can weight only once.
To make condition worst, patient is dying,, can u save the guy for sure.

Title: Re: Truck load of pills
Post by 0.999... on May 12th, 2012, 11:01pm
The pills are labelled accordingly, so just pick one that is not labelled as being poisonous.

or

The pills come in cases, except the poisonous pill must have dropped out of a damaged case from the previous load, so just choose a case.

or

Put the truck on a centrifuge and weigh any two pills on the outermost layer. If it's unbalanced the heavier one will be poisonous.

or

Pick any two pills, put them on opposite sides of the weight measuring device. If it's balanced, either pill will work. If it's unbalanced, any other pill will work.

Title: Keith Gilabert, "Truck load of pills"
Post by keithgilabert on May 14th, 2012, 8:19pm
Pick the blue pill Neo.

Cheers,

Keith Gilabert

Title: Re: Truck load of pills
Post by fieldazed on May 15th, 2012, 4:36am
another possibility - [hide]compare three pills by cutting one in half.  if scale is equal, administer either whole pill.  if scale is unbalanced, use both halves.[/hide]

Title: Re: Truck load of pills
Post by 0.999... on May 15th, 2012, 9:40pm
Neat solution, fieldazed! I'll give the following generalization of this problem to which I thought I had a solution based on that approach, but it fails in just one case, so I still have faith that there is something to it.

Suppose instead of one pill we have n poisonous pills (all weighing the same, though I have nothing against a solution involving possibly different weights). We also have a machine Xm which takes m inputs and outputs an array [x,y,z,...] in which x is the greatest number of equal weights; y is the first value in the output of Xm-x on the remaining inputs; etc. until we run out of inputs to apply to an Xk.

The question is, given n does there exist m for which a single application of a machine Xm will allow us to determine a nonpoisonous pill. If this is true, also find the least value of m.

Of course, when n = 1 we have m = 2.
When n = 2, I think we need m > 4. Here's what I tried on a machine with m = 4:
[hideb]Take six pills represented by the letters A - D and F,G. Split both F and G in half and pair (A,F1),(B,F2),(C,G1),(D,G2). Apply these pairs as input to the machine X4 to get output X.
X = [4]: Pick any whole pill given as input to the machine.
X = [3,1]: Suppose (wlog) that C = D and A is poisonous. We have either (in weights) A + 1/2F = C + 1/2G or B + 1/2F = C + 1/2G. In the former case, if F http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/ne.gif  G: then F could be poisonous and G not, where 1.5F = 1.5G; or otherwise 0.5G = 0.5F. Thus F = G. Now, if B + 1/2F = C + 1/2G, then by cancellation, F = G. Pick either of the halved pills.
X = [2,2]: This seems to fail to give enough information. (If we had access to a X2 as well, then we could weigh F and G.)
X = [2,1,1]: Exactly one whole pill is poisonous. If neither halved pill was poisonous, then X would be [3,1]. Thus, both poisoned pills are represented in A-G.
[/hideb]

Title: Re: Truck load of pills
Post by 0.999... on May 16th, 2012, 4:43am
When n = 2, m can equal [hide]4[/hide].
[hideb]Given eight pills: A1 through A4, B1, B2, C1, C1. Input to X4: (A1,1/2B1,1/3C1),(A2,1/2B1,1/3C1),(A3,1/2B2,1/3C1),(A4,1/2B2,1/3C2)
Output X.
As a Lemma, I use the fact that x+1/2y+1/3z = x' + 1/2y'+1/3z' iff corresponding terms are equal when x,y,z http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/in.gif {a,b}.
X = [4]: A1 = A2 = A3 = A4 cannot be poisonous, so return any whole pill from this set.
X = [3,1]: B1 = B2, and they cannot both be poisonous since X would be [4]. Return any halved pill.
X = [2,2]: C1 = C2, and they cannot both be poisonous since X would be [4]. Return any thirded pill.
X = [2,1,1]: There are two triples which are not equal to any of the other three, so they must each have a poisonous member. Since they do not equal each other, the poisonous member is not shared. Thus, pick any other pill than these eight pills.[/hideb]

This looks quite readily generalized. I'll have to think about that some other time, though.

Title: Keith Gilabert, "Re: Truck load of pills"
Post by keithgilabert on May 20th, 2012, 5:25pm
"so it wasn't the blue pill???" by, Keith Gilabert

Title: Re: Truck load of pills
Post by Grimbal on May 21st, 2012, 1:16am
You still can crush a large number of pills, mix it well, and use the amount of powder corresponding to the weight of one pill.  The poison will be diluted to a harmless dose.

Title: Re: Truck load of pills
Post by towr on May 21st, 2012, 8:56am
That depends on the poison; some are lethal in minute traces so if you have a pill that's 100% poison, even diluted by a truck-full it could be deadly. For example, just a few hundred nanograms of botulinum toxin can be lethal, perhaps less if someone is already in a bad condition.

Title: Re: Truck load of pills
Post by sanaya on Sep 3rd, 2013, 2:25am
I think the best way is to weigh two pills.
If the balance is equal, any pill can be used.

Title: Re: Truck load of pills
Post by swapnilraja1212 on Sep 17th, 2013, 12:37am
Crush them all and use the liquid

Title: Re: Truck load of pills
Post by towr on Sep 17th, 2013, 8:25am

on 09/17/13 at 00:37:37, swapnilraja1212 wrote:
Crush them all and use the liquid
Are you trying to kill your patient? Or assuming that a diluted dose is not poisonous?



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