TCS
Company
HR Interview
Interview
if there are 30 cans out of them one is poisoned if a person tastes very little he will die within 14 hours so if there are mice to test and 24 hours, how many mices are required to find the poisoned can?
Read Solution (Total 25)
-
- 1 mouse is sufficient to get the result...
At 1st min the mouse tastes 1st can & dies at 14hr 1 min.
After 15 mins the mouse tastes 2nd can & dies at 14hr.15 Min
After 30 mins the mouse tastes 3rd can & dies at 24 hr 30 mins.
.
.
After 7 hrs the mice tastes 29th can & dies after 21 hrs
If the mice is till alive after 21 hrs, then the poison will be in the 30th Can....
- 14 years agoHelpfull: Yes(165) No(94)
- ANS is 5 mice....
CONSIDER 7 cans ...it requires 3 mice A,B,C as explained below...
(WRITING 7 IN BINARY 111 REQUIRES 3 DIGITS... SO 3 MICE...)
A B C CAN NO. MICE DEAD.
0 0 1 - 1 C
0 1 0 - 2 B
0 1 1 - 3 B,C
1 0 0 - 4 A
1 0 1 - 5 A,C
1 1 0 - 6 A,B
1 1 1 - 7 A,B,C
FROM THE ABOVE TABLE, U CAN GET THE REQUIRED POISONED BOTTLE IN 14 HOURS......
EXTENDING THE SOLUTION TO 30 BOTTLES,
30 = (11110)BASE 2 ----> 5 DIGITS
SO 5 MICE ARE REQUIRED TO TEST.. - 14 years agoHelpfull: Yes(134) No(26)
- ans:5
the question states that the mice die WITHIN 14hrs and not exactly after 14hrs. so the binary approach will be followed. correct answer=5 mice - 14 years agoHelpfull: Yes(31) No(13)
- their is a trick n-1 so 30-1 = 29 and its binary is 11101 total 5 digit so ans is 5
- 12 years agoHelpfull: Yes(21) No(8)
- One mouse is sufficient if you can force him to taste different cans at different (at specific intervals of) time and noting the time of death.
- 14 years agoHelpfull: Yes(17) No(10)
- The options are necessary.. It can be both 5 and 1..
look with 1 as answer after 14 hrs 28 min u can identify the poisoned can but if you want to do it little bid faster you can do it with 5 mice..... 1 is not accurate answer bcoz the mice will die WITHIN 14 hrs not exactly after 14 hrs.. so lets consider 5 mice.. now the solution is:-
let as take can as 1 2 3 4 5 6 ... 30 and mice as A,B,C,D & E
make mice A to drink 1-5 cans
B to 6-10
C to 11-15
D to 16-20
E to 21-25
aft 12hrs check which one is dead A, B, C, D, or E.
If no1 is dead upto 25, then check 26 to 30..
A-26, B-27, C-28, D-29, E-30
-----------------------------------------------------------
If any1 is dead, then check in this way..
for eg.:
if C dies, then take 11-15 cans
A to 11
B to 12
D to 13
E to 14
leave the 15th can..
if A dies then 11 is poisoned, if B dies then 12 is poisoned, if D dies then 13 is poisoned, if E dies then 14 is poisoned, if no1 is dead then 15 is poisoned one..
- 9 years agoHelpfull: Yes(16) No(2)
- Have 6 mice for testing, Give each mice contents from 5 cans each 5 5 5 5 5 5 After 14 hours, one of the mice will die So, we will know which 5 cans must have the poison Then , take the contents of these 5 cans and give to the remaining 5 mice each. We will know in due time which can is poisoned.
- 10 years agoHelpfull: Yes(15) No(9)
- 1 mice & 14hrs 28mins are enough to get the result...
At 1st min the mice tastes 1st can & dies at 14hr
At 2nd min the mice tastes 2nd can & dies at 14hr.1Min
At 3rd min the mice tastes 3rd can & dies at 14hr.2Min
.
.
.
At 29th min the mice tastes 29th can & dies at 14hr.28Min
If the mice is till alive after 14hr.28Min then the poison will be in the 30th Can....
So no death and result achieved in the last case...
- 10 years agoHelpfull: Yes(12) No(6)
- Ans is 5.
2^5=32 i.e the nearest number to 30 - 11 years agoHelpfull: Yes(11) No(22)
- 5 mice are needed to find poisoned can.
- 14 years agoHelpfull: Yes(9) No(31)
- i guess answer is 5
using 1 mouse we cannot find the exact can so answer is 5 - 11 years agoHelpfull: Yes(8) No(5)
- 30 is solit in to binary digit. 30 is a base 5. so ans will be 5
16 8 4 2 1
1 1 1 1 0 - 11 years agoHelpfull: Yes(6) No(6)
- the answer of such questions are no of bottles nearly equal to 2^n.
2^5 = 32
answer 5. - 10 years agoHelpfull: Yes(5) No(4)
- Exact Ans will be 5.
Reason why it cant be 1: It is told in the question that the mice will die WITHIN 14 hours not exactly on the 14th hour.
Now lets consider any time (say 12 noon), at which the 1st can is given
1st can @ 12noon
2nd can @ 12:15 (with a 15mins gap)
3rd can @ 12.30 and so on...
Now if the mice die at some hour say 5 pm which is
5 hours from 12 noon and - 10 years agoHelpfull: Yes(3) No(2)
- can you plz explain the solution in some other way...to make me understand..
- 10 years agoHelpfull: Yes(2) No(1)
- its a mouse it has small stomach dipin ....its not an elephant
- 10 years agoHelpfull: Yes(2) No(0)
- we can solve this question using combinations the question can be seen as how many numbers are required to form 30 unique combinations if we take 2 mice then no of combination is 2c1 plus 2c2 equal to 5 if we take 3 mice then no of combination is 3c1 plus 3c2 plus 3c3 equal to 7 if we take 4 mice then no of combination is 4c1 plus 4c2 plus 4c3 plus 4c4 equal to 15 if we take 5 mice then no of combination is 5c1 plus 5c2 plus 5c3 plus 5c4 plus 5c5 equal to 31 let each combination taste each bottle for the poisionous bottle a unique combination will die so answer is 5 5 mice can check 31 bottles
- 10 years agoHelpfull: Yes(1) No(0)
- Here is the trick....
2^n >N
N=number of can which is 30 & n would be the number of mice ..
put values in formula and get ans =5 - 9 years agoHelpfull: Yes(1) No(0)
- ans is 5 or 6
30=15+15 take one mice let it eat all 15 can if dont die then other part contain poission then continue process till 1(by dividing each time by 2
like merge sort
- 10 years agoHelpfull: Yes(0) No(3)
- we can solve this question using combinationsthe question can be seen as how many numbers are required to form 30 unique combinationsif we take 2 mice then no of combination is 2c1 2c2 5if we take 3 mice then no of combination is 3c1 3c2 3c3 7if we take 4 mice then no of combination is 4c1 4c2 4c3 4c4 15if we take 8 mice then no of combination is 5c15c25c35c45c5 31let each combination taste each bottle for the poisionous bottle a unique combination will die so answer is 5 5 mice can check 31 bottles
- 10 years agoHelpfull: Yes(0) No(1)
- 2^5=32 i.e the nearest number to 30
- 10 years agoHelpfull: Yes(0) No(0)
- hi, this is Vicky, i would like to appreciate everyone. you people got skills and a better approaching ability and i would like to make some toast over here.
there are 30 cans, arrange them in a order. allocate one rat for first can, allocate two mice for second can , 3 mice for 3rd can, 4 mice for 4th can like 10 mice for 10th can, 20 mice for 20th can and 30 mice for 30th can.
now if only one rat die before or exactly at 14 hour then the can one is poisonous, similarly is 10 mice are dead at 14th hour then the 10th can is poisonous and the this will keep goes. totally we need 150 mice to obtain the poisonous can. i hope u guys can understand, and i accept others too. thanks - 9 years agoHelpfull: Yes(0) No(0)
- If each mouse is made to taste one particular can, then we would find the poisoned can within 14 hours know!!
so we need 30 mice. - 9 years agoHelpfull: Yes(0) No(0)
- ans: 3 mouses
consider
1st mouse : initially feed first can and after 1hr feed other and repeat upto 10cans.
now if mouse dies after 14 hrs 1st can is poisonous.................if mouse dies after 24 hrs 10th can is poisonous
similarly feed 10 cans from remaining to 2nd mouse from 1st hour to 14th hour
similarly feed remaining 10 cans to 3rd mouse from 1st hour to 14th hour
- 9 years agoHelpfull: Yes(0) No(0)
- 11 Mouses at the Least.The mice may die anytime within 14 hrs(It may happen all mice die after 13.30 hrs) but total time is only 24 hours for test.So we only get once chance to test.If we test again after 14 hours we might not find the can in 24 hours.
let the 11 mice be divided into two groups
Group A->5 mice
Group B->6 mice
Now draw 5 horizontal lines in your copy signifying group A mice...Passsing through these Horizontal Lines draw 6 Vertical lines signifying group B mice...30 points of intersection are obtained each having a distinct mouse pair....Now these mouse pairs taste cans...Each mouse will drink from several cans as the line signifying it will have multiple intersection points...Finally the can which was poisnous will kill 1 mouse each from Group A and Group B thus signifying the poisnous can......
Dipesh Answer is wrong...question says "Within 14 Hours" not "Exactly 14 hours" as dying time
So Answer is 11 Mouse.......... - 9 years agoHelpfull: Yes(0) No(0)
TCS Other Question