|
|
|
|
|
| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26 Mar 2008 21:35:51 IST
|
|
|
Wrong!!Answer is 7 pigs.. See, how will you find one poisoned bottle out of seven bottles (numbered 1,2, 3,4,5,6,7).... take 3 pigs (unimaginatively named A, B and C) and feed them in such a way that there is a unique combination of deaths for each bottle that may be poisoned... eg. give 1,4,6 & 7 to pig A; 2,4,5 & 7 to pig B; 3,5,6 & 7 to pig C.... now, for every bottle, if it is poisoned, there is a unique combination of deaths:
if 1 is poisoned, only A dies if 2 is poisoned, only B dies if 3 is poisoned, only C dies if 4 is poisoned, A & B die if 5 is poisoned, B & C die if 6 is poisoned, A & C die if 7 is poisoned, A, B & C die
I give this example only to illustrate that the number of unique combinations possible between a given number of pigs is equal to the number of bottles that can be tested for poisoning at once.. in the above example, since 7 combinations were possible using A,B and C, 7 bottles could be tested using 3 pigs...
Please note that repetitions should not be considered..eg. AB is the same as BA here since both combinations point only to one bottle.. similarly, BC is same as CB... the point is although there are 6 two-lettered combinations possible between A,B and C (3*2*1 or 3! i.e 3 factorial), we can only consider 3 combinations (AB, BC, AC) as other 3 (BA, CB, CA)... this may seem trivial in case of three alphabets, but it will become increasingly important when the alphabets (or pigs) increase..
Now, what if there are 4 pigs A,B,C and D... how many combinations are possible.
4 single-lettered unique combinations i.e. A,B,C,D
double-lettered: totally, 12 combinations possible i.e. 4*3, but each combination is repeated twice like BA and AB.. so, only 6 useful unique combinations..
triple-lettered: totally, 24 combinations possible i.e. 4*3*2, but each combination is repeated 6 times like ABC can be written in 3! or 6 ways.. so, only 24/6= 4 unique combinations.
four-lettered: only one i.e. ABCD... so, having 4 pigs will allow us to test 4+6+4+1= 15 bottles ... we try till this figure reaches 100 or more..
say, we have 5 pigs..
5 single-lettered combinations
20/2= 10 double-lettered combinations
60/6 = 10 triple-lettered combinations
120/24= 5 four-lettered combinations
1 five lettered combination.
so, 5 pigs let us test 5+10+10+5+1= 31 bottles
using similar calculations for 6 pigs, we get 63 combinations , which is still not enough....
get 7 pigs and we can test 7+21+35+35+21+7+1= 127 combinations ... well, this is more than 100, but since 6 pigs will give us only 63 bottles, we need minimum 7 pigs to test for 100 bottles...
|
MaNuTd RoXxXx..MaNuTd 2 WiN PrEmIeR LeAgUe ThIs SeAsOn ToO AlOnG WiTh ChAmPiOnS LeAgUe.....HaiL RoNaLdO ...HaiL LaMpArD... |
this reply: 5 points
(with 1 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
|
|
|
|
|
|
|