- #1
seadalton
- 4
- 0
Hello,
There is a similar thread in brain teaser's, but I can't seem to find it. So let me first apoligize for the lack of net ettiquette.
I had an interview today with the ole snookerball and scale question. First it was 8 balls, 7 of equal weight and 1 of an odd weight (could be heavier could be lighter) and I was asked to find the minimum number of measurements (turns out to be 2. Then the interviewer kicked up the heat and ask the same riddle if I had 12 balls, 11 of equal weight etc etc. WIth 12 balls the answer is 3 measurements.
So far so good. To really stump me I was then asked for a formula to determine how many measurements it would take for X Set where X number of balls where all equal weight and one ball was of an unequal weight (again could be heavier or lighter).
Dispite sweating bullets at the whiteboard I gave a weak answer of x/4 because that works for both 8 balls and 12 balls. Apparently it doesn't work for 24 balls becuase the heavy ball could be identified with 4 measurements if I had 24 balls.
Soooooooo, not being a math genius, I hope someone smatter than me (my second guess was that I could find the answer on google) can offer an algorithem to determine the minimum number of measurements it would take to distingues the odd balls of any set of balls where only 1 is of a different wieght, again, could be heavier could be lighter.
Thanks for your time.
Cheers
There is a similar thread in brain teaser's, but I can't seem to find it. So let me first apoligize for the lack of net ettiquette.
I had an interview today with the ole snookerball and scale question. First it was 8 balls, 7 of equal weight and 1 of an odd weight (could be heavier could be lighter) and I was asked to find the minimum number of measurements (turns out to be 2. Then the interviewer kicked up the heat and ask the same riddle if I had 12 balls, 11 of equal weight etc etc. WIth 12 balls the answer is 3 measurements.
So far so good. To really stump me I was then asked for a formula to determine how many measurements it would take for X Set where X number of balls where all equal weight and one ball was of an unequal weight (again could be heavier or lighter).
Dispite sweating bullets at the whiteboard I gave a weak answer of x/4 because that works for both 8 balls and 12 balls. Apparently it doesn't work for 24 balls becuase the heavy ball could be identified with 4 measurements if I had 24 balls.
Soooooooo, not being a math genius, I hope someone smatter than me (my second guess was that I could find the answer on google) can offer an algorithem to determine the minimum number of measurements it would take to distingues the odd balls of any set of balls where only 1 is of a different wieght, again, could be heavier could be lighter.
Thanks for your time.
Cheers