Infosys
Company
There are 6561 balls out of them 1 is heavy and remaining 6560 are same weight. Find th min. no. of times the balls have to be weighed for finding out the heavy ball ?
Read Solution (Total 7)
-
- 6561 balls are divided into 3 groups containing equal no. of balls.
=>each group contains 2187 balls.
two groups are selected randomly and weighed against each other by placing them on the two pans of a common balance.Among these two groups,it can be easily determined which has higher weight and that group is selected & if both weigh same so,the remaining group is of higher weight.
Now,the group having higher weight and containing 2187 balls is chosen and again the above steps are repeated.
this group is divided in three groups containing equal number of balls.
=>each group contains 2187/3 = 729
=>again following the same method as above,the group of higher weight is chosen and the balls are divided into 3 groups containing equal number of balls.
=>each group has 729/3 = 243
Similarly the heavier group from them is chosen and the balls are divided into 3 groups containing equal number of balls.
=>each contains 243/3 =81 balls
Similarly the heavier group from them is chosen and the balls are divided into 3 groups containing equal number of balls.
=>each contains 27 balls.
Similarly the heavier group from them is chosen and the balls are divided into 3 groups containing equal number of balls.
=>each contains 27/3 = 9 balls
Similarly the heavier group from them is chosen and the balls are divided into 3 groups containing equal number of balls.
Each contains 9/3 = 3 balls
Now, from these 3 balls ,2 balls are taken and weighed again by a common balance ,if one pan contains the heavy ball,then the pan will show more mass it contains,than the other ball,so distinctly,the heavy ball can be found out ,and if both pans weigh same,the remaining one is selected,and definitely this ball is heavy.
1st weighing operation: 6561/3 =2187
2nd weighing operation: 2187/3 =729
3rd weighing operation: 729/3 = 243
4th weighing operation: 243/3 = 81
5th weighing operation: 81/3 = 27
6th weighing operation: 27/3 = 9
7th weighing operation: 9/3 = 3
8th weighing operation: 3/3 = 1
ANSWER::-
--------------------
So,MINIMUM 8 TIMES, the balls are to be weighed for finding out the heavy ball.
Thanks to Al..:-):-) - 12 years agoHelpfull: Yes(38) No(1)
- Answer : 8 times the balls have to be weighed for finding out the heavy ball.
Steps to be followed,
1)Divided the 6561 balls into 3 lots of 2187 balls each.
2)Weigh lot1 & lot2.If of the same weight,the over weight ball be in lot3.
3)From lot3,Divide the 2187 balls into another 3lots of 729 balls each.Again goto step(2).
4)From lot3,Divide the 729 balls into another 3lots of 243 balls each.Again goto step(2).
5)From lot3,Divide the 243 balls into another 3lots of 81 balls each.Again goto step(2).
6)From lot3,Divide the 81 balls into another 3lots of 27 balls each.Again goto step(2).
7)From lot3,Divide the 27 balls into another 3lots of 9 balls each.Again goto step(2).
8)From lot3,Divide the 9 balls into another 3lots of 3 balls each.Again goto step(2).
9)From lot3 weigh 2 balls one to one & keep one aside. If the pans are balanced on weighing,the ball kept aside is the over weight one.
10)If in (9)the balls are not balanced the over weight ball will be the lower weighing pan.
11)If in (2)the pans are not balanced,the 2187 balls on the over weight pan side will be taken for further weighing.Again follows step (3) so on.
Finally it would require only 8 weighing to identify the over weight ball. - 12 years agoHelpfull: Yes(6) No(0)
- @ABHISHEK KUNDU :dear friend the simplest way to solve problems like these weighing in less times is write the given number as factors of 3...
that is 6561/3=2187
2187/3=729
729/3=243
243/3=81
81=3^4...
so 6561=3^8
the power on 3 is the minimum no. of times required.. that is 8...
-------------------------------------------------------------------------------
Here why we took factors of 3 is while weighing we generally divide into 2 parts... but it takes more time... suppose if there are 9 balls...
if we devide into 3,3 for weighing and 3 out side...
if both weighs the same then the odd ball is in out side 3...
other wise it will be in highest weighing 3 balls..
then we weigh 1 ball in each from the 3..
if they weighs the same the out side ball is heavy... otherwise u know one which weighs high...
here we took 2 weighing for 9 balls... which is 3^2... similarly for any number of balls...
u can go by back tracking when the item number is not divisible by 3...
that is for 85 (take powers of 3 until it reaches near to 85)=3*3*3*3=81
but 85>81 so it takes same time as time for 243 balls... so no. of weighing required=4+1=5...
for 79 (take powers of 3 until it reaches near to 79)=3*3*3*3=81
- 12 years agoHelpfull: Yes(3) No(0)
- i have read the solution of both but i didn't understand their calculation. Because, if u divided that to 3 lots then u have to weight the lots of ball at least 2 times, like that if u do the same then it will be more than 8 times. as per my calculation "IT SHOULD BE 16 TIMES"
- 12 years agoHelpfull: Yes(2) No(4)
- just find the nearest n so that 3^n>=6561(i.e given no. of balls)
- 12 years agoHelpfull: Yes(2) No(0)
- @sdeep..plz make it simple.
- 12 years agoHelpfull: Yes(0) No(1)
- if we divide those 6561 balls into two groups of 3280 and 3281, then surely one group will be heavier. now we again divide that heavier group and get two groups among whom one is heavier. in this way we have to weigh it 11 or 12 times
- 11 years agoHelpfull: Yes(0) No(1)
Infosys Other Question
The puzzle is Nine IIT students were sitting in a classroom. Their professor wanted them to test. Next day the professor told all of his 9 students that he has 9 hats, The hats either red or black color. He also added that he has at least one hat with red color and the no. of black hats is greater than the no. of red hats. The professor keeps those hats on their heads and ask them tell me how many red and black hats the professor have? Obviously students can not talk to each other or no written communication, or looking into each other eyes; no such stupid options and no tricks.
Professor goes out and comes back after 20 minutes but nobody was able to answer the question. So he gave them 10 more minuets but the result was the same. So he decides to give them final 5 minutes. When he comes everybody was able to answer him correctly.
So what is the answer? and why?
0,2,4,6,8,12,12,20,16,?