# 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

#### Vaishali29 Profile Answers by Vaishali29

• Aug 30th, 2010

9 comparisons

#### khushbu.kathiriya Profile Answers by khushbu.kathiriya

• Oct 27th, 2010

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

#### monomomo Profile Answers by monomomo

• Aug 3rd, 2011

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.

#### prabhaamca11 Profile Answers by prabhaamca11

• Aug 8th, 2011

6541

#### suprabha.r Profile Answers by suprabha.r

• Sep 7th, 2011

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

#### abinash kumar

• Sep 29th, 2011

8

#### yogita

• Oct 2nd, 2011

only once

#### Sumit Arora

• Oct 6th, 2011

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.

#### sachin

• Oct 10th, 2011

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

#### Samueal

• Jan 26th, 2012

8 times is the right answer.

• Oct 23rd, 2015

The answer to this type of question is ceil ( (log3) n ). For this question it is 8.

#### Manoj Yaramsetty Profile Answers by Manoj Yaramsetty

• Jan 5th, 2016

8

#### Arman

• May 12th, 2016

Its 12

#### Arman

• May 12th, 2016

17

#### Anonymous

• Jun 7th, 2016

8

#### Ghazi Salih

• Oct 10th, 2016

12