GeekInterview.com
Series: Subject: Topic:
Question: 9 of 219

Weight of Heavy Ball

There are 6561 balls out of them 1 is heavy. Find the min. no. of times the balls have to be weighed for finding out the heavy ball.
This question is related to Infosys Interview
Asked by: sudarshan2u | Member Since Jul-2010 | Asked on: Aug 25th, 2010

View all questions by sudarshan2u

Showing Answers 1 - 10 of 10 Answers
Vaishali29

Answered On : Aug 30th, 2010

View all answers by Vaishali29

9 comparisons

  
Login to rate this answer.

8 Comparisions..

Divide 6561 in 3 parts..2187 of each
Keep 2 of parts in weight machine...Take the heavy part n again divide in 3 parts
If they are eual then take the 3rd part..

2187>729>243>81>27>9>3>1

Yes  1 User has rated as useful.
  
Login to rate this answer.
monomomo

Answered On : Aug 3rd, 2011

View all answers by monomomo

7 times.

6561 = 3 ** 8

First, divide the group of 6561 into 3 groups of 2187. Take two arbitrary groups and weigh them. Either they will be imbalanced (in which case you've identified the group with the heaviest ball), or they are equal, in which case you know the 3rd group has the heaviest ball. Split the heaviest group of 2187 into 3 groups of 729, and continue on - so first test 6561, then 2187, then 729, then 243, then 81, then 9, then 3 balls remain. You can deduce which one is heaviest at this (7th) step in which 3 balls remain.

Yes  1 User has rated as useful.
  
Login to rate this answer.
prabhaamca11

Answered On : Aug 8th, 2011

View all answers by prabhaamca11

6541

  
Login to rate this answer.
suprabha.r

Answered On : Sep 7th, 2011

View all answers by suprabha.r

i have an alternate solution which makes only 1 comparison in the best case and 12 it n worst case.
split 6561 as A:B:C 3280 ,3280 and 1
==>comp 1 if A and B are equal then C is the heavy ball
else
comp 2 split 3280 as two groups of 1640. Take the heavier group for next comparison
comp 3 split 1640 as two groups of 820. Take the heavier group for next comparison
comp 4 split 820 as two groups of 410. Take the heavier group for next comparison
comp 5 split 410 as two groups of 205. Take the heavier group for next comparison
==>comp 6 split 205 as three groups of 102,102 and 1. if A and B are equal then C is the heavy ball else take the heavier group for next comparison
comp 7 split 102 as two groups of 51. Take the heavier group for next comparison
==>comp 8 split 51 as three groups of 25,25 and 1. if A and B are equal then C is the heavy ball else take the heavier group for next comparison
==>comp 9 split 25 as three groups of 12,12 and 1. if A and B are equal then C is the heavy ball else take the heavier group for next comparison
comp 10 split 12 as two groups of 6. Take the heavier group for next comparison
comp 11 split 6 as two groups of 3. Take the heavier group for next comparison
comp 12 compare 2 balls. you will find the heavy ball

  
Login to rate this answer.
abinash kumar

Answered On : Sep 29th, 2011

8

  
Login to rate this answer.
yogita

Answered On : Oct 2nd, 2011

only once

  
Login to rate this answer.
Sumit Arora

Answered On : Oct 6th, 2011

its Answer is 8.
we divided the total number of balls in 3 parts.then then weighing any two parts(of balls).if the is in-balance then the heavy ball is present in heavy side or if their weight are equal then the heavy ball is present in third part.again divide the remaining balls in three parts and repeat this procedure until you find it.

  
Login to rate this answer.
sachin

Answered On : Oct 10th, 2011

6561/9=729
729/3=243
243/9=27
27/9=3
3/3=1

  
Login to rate this answer.
Samueal

Answered On : Jan 26th, 2012

8 times is the right answer.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.