Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!

# marble puzzle

ankur rathi
Ranch Hand
Posts: 3830
You have 12 marbles, all looks same but one is either lighter or heavier. You have �two wing weight pane�. Now in three trials, you have to find the odd one.

[ April 20, 2007: Message edited by: ankur rathi ]

Ryan McGuire
Ranch Hand
Posts: 1061
4
If I recall correctly, I first solved this puzzle (with donuts instead of marbles ) when I was 12. Here I'll start you off:

Step one:
Weigh donuts... I mean marbles A, B, C and D against E, F, G and H.

Ryan McGuire
Ranch Hand
Posts: 1061
4
For those who think this is too easy, let me add a twist to the problem.

Restriction: You have to know what weighings you will do before you start the whole experiment. In other words, you can not use the results of the first weighing to decide which donuts/marbles to weigh in the second or third one.

Here I'll start you off:

Step one:
Weigh donuts... I mean marbles A, B, C and D against E, F, G and H.

I went through quite a few donuts trying to figure this one out.

Jim Yingst
Wanderer
Sheriff
Posts: 18671
I first heard this with coins, back in college. It's not that the original puzzle is too easy, but it's pretty familiar here. Ryan's revision does offer a new challenge. One solution:

1. Weigh abcd (left) vs. efgh (right)
2. Weigh aeij (left) vs. bcfk (right)
3. Weigh chil (left) vs. abgj (right)

Write > if the left is heavier than the right, < if the right is heavier than the left, and = if they balance. Concatenate these three symbols and look up the result below. A + means the given coin/donut/marble is heavier, and a - means it's lighter. An x means the result is impossible.

<<<: x
<<=: f+
<<>: a-
<=<: g+
<==: d-
<=>: h+
<><: c-
<>=: e+
<>>: b-
=<<: i-
=<=: k+
=<>: j-
==<: l-
===: x
==>: l+
=><: j+
=>=: k-
=>>: i+
><<: b+
><=: e-
><>: c+
>=<: h-
>==: d+
>=>: g-
>><: a+
>>=: f-
>>>: x

So if you get 1. left is heavier, 2. right is heavier, 3. they balance, that's ><=, which maps to e-, which means coin/donut/marble e is lighter.

Ranch Hand
Posts: 65
Hi,

Divide 12 marbles in 6-6. put 6 in one side and remaing six in another let us say if one marble is lesser weigth pick the 6 marbles from the less weigth side and divide six in to 3-3 and weigth again continue the process until 1-1-1 is left. put any 2 out of 3 marbles if they are same reamining marble is weigth less, if any of them is weigth less that will be the weigth less one.

Ex:-

1) 6-6 ( rule out the weigth one)
2) 3-3 ( rule out the weigth one)
3) 1-1-1 ( rule out the original one.)

Ryan McGuire
Ranch Hand
Posts: 1061
4
How would your method determine if a marble is too heavy?
[ May 09, 2007: Message edited by: Ryan McGuire ]

ankur rathi
Ranch Hand
Posts: 3830
Hi,

Divide 12 marbles in 6-6. put 6 in one side and remaing six in another let us say if one marble is lesser weigth pick the 6 marbles from the less weigth side and divide six in to 3-3 and weigth again continue the process until 1-1-1 is left. put any 2 out of 3 marbles if they are same reamining marble is weigth less, if any of them is weigth less that will be the weigth less one.

Ex:-

1) 6-6 ( rule out the weigth one)
2) 3-3 ( rule out the weigth one)
3) 1-1-1 ( rule out the original one.)

That�s a kind of universal trick for this kind of problem. But this trick will not work for this problem until we know that the odd marble is either heaver or lighter than others.