The Student Room Group

Problem With Balls

Here is a challenging puzzle for all you maths lovers, I came up with it myself,
kind of.
Suppose u have 12 balls, 11 of them weigh the same, whilst 1 of them is a different weight, maybe heavier, maybe lighter than the other balls.
Now, using balance scales 3 times, this odd ball may be found, and also if it is heavier or lighter can determined.
For those that want, you can try to prove this.

But here is my question,
Suppose you have N balls (N>=3), such that all of them weigh the same, except for 1 which is heavier or lighter than each of the others.
Then give a function W(N) that tells exactly what the MININUM number of weighings required is, to determine the odd ball, and if it is heavier or lighter.
So for example W(12)=3.
I'm pretty sure there is a log in there somewhere, I haven't had time to solve this myself, but would love to see someone elses proof, if possible

good luck

Scroll to see replies

Reply 1
cms271828
Here is a challenging puzzle for all you maths lovers, I came up with it myself, kind of.


This problem isn't difficult.

Say you have x balls. If x is odd then add an extra ball (with the same weight as the other [x-1] balls). If x is even then continue as follows. Divide the number of balls by two and place both halfs on either side of the scale.

Then you can tell which half has the heavier ball. Then proceed again, by splitting the second half into two, and again place both halves on either side of the scale.

This method will ensure you find the odd ball in the minimum number of weighs.

There's actually a name for this algorithm, which appears in Decision 1 Module. It's also the algorithm computers use to find a name in a given list of names.

Galois.
Reply 2
Hello mate,

Thanks for trying, but you have misunderstood the question, and I beleive
it is more difficult than you think.
from the N balls u have, all of them weigh the same, except 1 of them is a different weight, possibly heavier or lighter.
You dont have any more balls to use, just those N.
so when N=12, the minimum number of weighings u need to establish which ball is the odd one out, and whether it is heavier or lighter is 3.
it cannot be done in 2 weighings, and I have the proof to show it can be done in 3.
If you want to attempt this problem, I recommend you show how to find the odd one out with 12 balls, and say whether it is heavier or lighter, using balance scales 3 times, so there are obviously 24 different outcomes.
My question, is to find the minimum number of weighings required when you have N>=3 ball, to find the odd ball, and determine if it is heavier or lighter than the others.

Any questions, let me know.
Reply 3
this puzzle is wierd. i say that you can have 27 balls and four weighings.

27: 9 9 9
9: 3 3 3
3: 1 1 1

Where you weigh the first two elements eg. 9 9 , if they are lighter or heavier keep the 18, and if they are the same keep 9. as long as they are the same weight take the last element - and on the final weighing take both permutations and weigh both to see which is same. taking the best possible strategy and adding 1 to the final weighin the answer is 4.

this follows from the puzzle where the knowledge of whether the ball is lighter or heavier is known. and where the answer is divided into 3 each time, so the max efficiency is with n balls = 3^n.
Reply 4
Hmmmmmmmm

interesting idea, and I think your on the right lines, but maybe it is more
complex than that.
You say the max efficiency is 3^n, are you saying this is the minimum
number of weighings required.
Because I can tell you for definate that with 12 balls, 3 is minimum,
and with 13 balls, 4 is minimum
Reply 5
cms271828
Hmmmmmmmm

interesting idea, and I think your on the right lines, but maybe it is more
complex than that.
You say the max efficiency is 3^n, are you saying this is the minimum
number of weighings required.

Because I can tell you for definate that with 12 balls, 3 is minimum,
and with 13 balls, 4 is minimum


this is the max. efficiency with 3^n balls, and with the probability when you weigh the balls that you get the same weights n (or can be n or less) times being:

(1/ n^1/3 )^n
Reply 6
i have a good idea. solve the problem for n balls with the lighter or heavier ball known at first, then move onto unknown.

Also, what is the minimum for 3, or 4, or 5? (note: 2 is unsolvable.)
Reply 7
I dont understand what u mean by max efficiency, do u mean:
the minimum number of weighings required to identify the oddball, and
determine wether it is heavier or lighter????

if so, does yur formula work for n=12,and give 3.
and n=13,give 4?????????
Reply 8
i mean the best possible values of n is an integer in the form of 3^n. (since 2n cannot equal 3^n odd you are safe :smile:) Ignore the probability part for now since you are looking for the minimum number of weighings. :smile:
Reply 9
DaveManUK
i have a good idea. solve the problem for n balls with the lighter or heavier ball known at first, then move onto unknown.

if u knew the oddball was heavier or lighter, then only one weighing would be
requierd,see below
@# ##
-------
^
the # is a normal ball,and the @ is the oddball.
if leftside goes down,then @ is heavier,
up ,and @ is lighter.
yeh but which of these two is lighter or heavier? also in 'that' youre assuming you know which is lighter or heavier already - see if if was XX XX and one side
was heavier and you knew the outlier was heavier then you still wouldn't know.

@# ##
-------
^^
Reply 11
DaveManUK
i have a good idea. solve the problem for n balls with the lighter or heavier ball known at first, then move onto unknown.

Also, what is the minimum for 3, or 4, or 5? (note: 2 is unsolvable.)

ok
min for 3 balls is 2
im just working on min for 4 balls
Reply 12
DaveManUK
yeh but which of these two is lighter or heavier?

@# ##
-------
^^


in this case @ is heavier or lighter, im just replyng to whta sum1 else said,
if you knew the oddball to start with, then u only require 1 weighing.
Its the wrong way to go about this problem

to get a grasp of the problem you should try to solve it for n=12 balls, I mean, show how to find the oddball, and determine if its heavy or light, with 3 WEIGHINGS.
This should take from 30 mins to an hour, I did it in 35, but 2 ppl I know
took 4 days, so depends how good a mathematician u are.
12: 4 4 4 (split into 3.) assume (4 4 weighed are same, then the heavier or lighter lies in the last 4)

4 - requires 2 weighings.
Let (a b c d) be these four.
if weight of a=b and a=c , then d is the heavier or lighter one.
:smile: total = 3 weighings
oooh i was wrong , for 3 balls you can do with one weighing

(a b c) if a=b then c is the heavier or lighter ball.
Reply 15
DaveManUK
12: 4 4 4 (split into 3.) assume (4 4 weighed are same, then the heavier or lighter lies in the last 4)

4 - requires 2 weighings.
Let (a b c d) be these four.
if weight of a=b and a=c , then d is the heavier or lighter one.
:smile: total = 3 weighings

Dave dave dave dave dave dave dave, you havent shown which the oddball
is and if it is heavier or lighter, I recommend u number them to start with.
I give u credit for getting the first weighing correct, u need 4 against 4.
6 against 6 does not give u much information at all.
better ver of 12.

(1:5 6:10 11 12) 1:5=6:10
(any(1:10) 11 12 ) any(1:10)=11 ==> 12 is the heavier or lighter

2 weighings!!
Reply 17
DaveManUK
oooh i was wrong , for 3 balls you can do with one weighing

(a b c) if a=b then c is the heavier or lighter ball.

TRUE,BUT, what is it, heavy or lighter, u gotta say which
Reply 18
DaveManUK
better ver of 12.

(1:5 6:10 11 12) 1:5=6:10
(any(1:10) 11 12 ) any(1:10)=11 ==> 12 is the heavier or lighter

2 weighings!!

That doesnt make any sense at all,
u gotta show all 24 possible outcomes that can be obtained in 3 weighings.
In the extended question im just asking you for the number, I think it would be a bit too difficult to give the algorithm as well.
cms271828
Dave dave dave dave dave dave dave, you havent shown which the oddball
is and if it is heavier or lighter, I recommend u number them to start with.
I give u credit for getting the first weighing correct, u need 4 against 4.
6 against 6 does not give u much information at all.


If (a b c D) where D is the odd one out that you need to compare whether the first three are the same, which will imply that the last D is of a different weight.

If a=b and a=c then you will know that D is the odd one out.

Latest