# Try out the ODDBALL logic test?

Discussion in 'Intelligence & Machines' started by Alan McDougall, Jul 15, 2010.

Not open for further replies.
1. ### nirakar( i ^ i )Registered Senior Member

Messages:
3,383
Just find out which eleven are not lighter or heavier.

Knowing that either one of this group of 6 balls are light or one of the other group of six balls is heavy is not useful enough to use one of your precious three weighings to find out.

At that pace of getting clues from weighings you would need more than three weighings to identify the odd ball.

3. ### StryderKeeper of "good" ideas.Valued Senior Member

Messages:
13,102
Post 41 contains a working solution, I wrote it using HTML/Javascript and corrected errors that I'd made with the actual solution that Alan eventually posted. I was about 92% solved in my initial solution, the problem however was making sure that the 3 weigh-ins didn't have balls being tested incorrectly.

I ruled out using a CASE method for multiple branches of weighing in because fundementally this "Logic problem" is a programming one. Using CASE would increase the overall coding overhead with such elongated branch structures and make the code un-necessarily complex. The skill of programming usually implies trying to simplify the overall program to gain the desired results while being simple to understand.

5. ### dsdsdsValued Senior Member

Messages:
1,677
I haven't solved it yet and have to give up for a while.

It seems impossible with only 3 weigh-ins, that in All cases you will have 3 or less balls remaining with knowledge of weight after the second weigh-in. So you have to use (i thing you guys called it) matrix approach where you have 3 independent weigh-ins and analyze the 3 results to pick out the oddball. Instead of concentrating on eliminating on as much balls as possible with every weigh-in, I think I should concentrate on creating a matrix of tests that, after analyzed together, would reveal the solution. Tough!

7. So far i am still trying to figure out how people are so sure one side contains a light ball or if the other side contains a heavy ball.

yet people still think they solved it.

Last edited: Aug 28, 2010
8. ### nirakar( i ^ i )Registered Senior Member

Messages:
3,383
My post 103 would take 33 lines of code to solve the puzzle. I am not familiar with the term case method but I guess I used case method.

I copied your white text in a box box trick. I did not know how to do that.

All I saw in your white box at http://sciforums.stryderunknown.co.uk/12balls.html was "..... A is Lighter than the others" Was I supposed to see HTML/Javascript code?

I assume the tests below can identify any of the 24 possibilities but I did not test it.
Test 1:A B C D / E F G H...... I J K L

Test 2:A D H I / B C K L...... E F G J

Test 3:C G I L \ A B E J...... D F H K

I did test post 62 by captain Kremmen
1 2 3 4 ^5 6 7 8 A B C D- E F G H
1 4 8 9 ^2 3 11 12 A D H I- B C K L
3 7 9 12 ^1, 2 5 10 C G I L- A B E J

Which after translating numbers to letters I see is the same pattern as You used so then I tested your pattern.

9. ### Alan McDougallAlan McDougallRegistered Senior Member

Messages:
410
The solution does not lay with "luck" such as by just assuming that the "ball is lighter" it might be likewise be amongst the balls in the lower pan and be heavier

Remember it might also amongst the balls in "the lower pan" and it might be heavier or be amongst be might be lighter and be amongst the balls in the higher pan and be lighter

This leaves you with just two more trails to solve the puzzle

I assure you this puzzle can be solved with the Libra type scale

Last edited: Aug 30, 2010
10. That is what i am asking. With three weighings how do you know if one side contains a lighter ball or the other contains a heavy ball?

Who has solved it?

Examine this:

Q: is it lighter or heavier?
___________________________

(from a "pro solution given" respondent)

A: Just find out which eleven are not lighter or heavier.

Knowing that either one of this group of 6 balls are light or one of the other group of six balls is heavy is not useful enough to use one of your precious three weighings to find out.

At that pace of getting clues from weighings you would need more than three weighings to identify the odd ball.

My analysis: The question i am asking is how do you know the side you are deciing contains the odd ball when the other side can actually contain the odd ball. The reason is the outcome (how the scale reacts) will be EXACTLY the same afa movement but only difference is, obviously, one side will go up and one down but remeber, this will not tell you which side contasins the light ball or the heavy ball.

We know there is a difference but we cannot tell lighter or heavier. Three weighing and it cannot be done..for that one reason. In fact i say it is impossible not accounting for getting lucky and then it is a game of chance.

___________________________

Is it not a given that a "test ball" needs to be determined to weigh against the odd ball?

Last edited: Aug 30, 2010
11. ### dsdsdsValued Senior Member

Messages:
1,677
Obviously, finding out if oddball is lighter or heavier requires knowledge of weight of whatever is on the other side of the scale. It makes the problem harder but not impossible. A quick google search reveals many other forums & groups tackling this problem and claiming solutions. Although we must be careful what people claim on the web, with the sheer number of (apparently) serious discussions being had over a long period, there is a very high likelihood that this problem is solvable. There's no trick in the question and no one trying to fool you. Just because you (and I) haven't solved it yet, does not make it impossible.

12. ### Alan McDougallAlan McDougallRegistered Senior Member

Messages:
410
http://www.mathsisfun.com/pool_balls_solution.html

The Problem Pool Balls - Solution

The Problem:
You have 12 balls identical in size and appearance but 1 is an odd weight (could be either light or heavy).

You have a set scales (balance) which will give 3 possible readings: Left = Right, Left > Right or Left < Right (ie Left and Right have equal weight, Left is Heavier, or Left is Lighter).

You have only 3 chances to weigh the balls in any combination using the scales. Determine which ball is the odd one and if it's heavier or lighter than the rest. How do you do it?

The solution
Number the balls 1, 2, 3, ... 10, 11, 12

Start off with them in 3 groups: [1, 2, 3 and 4], [5, 6, 7 and 8] and [9,10,11 and 12]
Weigh 1, 2, 3 and 4 vs 5, 6, 7 and 8 with 3 possible outcomes:

1. If they balance then 9,10,11,12 have the odd ball, so weigh 6,7,8 vs 9,10,11 with 3 possible outcomes:
1a If 6,7,8 vs 9,10,11 balances, 12 is the odd ball. Weigh it against any other ball to determine if heavy or light.
1b If 9,10,11 is heavy then they contain a heavy ball. Weigh 9 vs 10, if balanced then 11 is the odd heavy ball, else the heavier of 9 or 10 is the odd heavy ball.
1b If 9,10,11 is light then they contain a light ball. Weigh 9 vs 10, if balanced then 11 is the odd light ball, else the lighter of 9 or 10 is the odd light ball.

2. If 5,6,7,8 > 1,2,3,4 then either 5,6,7,8 contains a heavy ball or 1,2,3,4 contains a light ball so weigh 1,2,5 vs 3,6,12 with 3 possible outcomes:
2a If 1,2,5 vs 3,6,12 balances, then either 4 is the odd light ball or 7 or 8 is the odd heavy ball. Weigh 7 vs 8, if they balance then 4 is the odd light ball, or the heaviest of 7 vs 8 is the odd heavy ball.
2b If 3,6,12 is heavy then either 6 is the odd heavy ball or 1 or 2 is the odd light ball. Weigh 1 vs 2, if balanced then 6 is the odd heavy ball, or the lighest of 1 vs 2 is the odd light ball.
2c If 3,6,12 is light then either 3 is light or 5 is heavy. Weigh 3 against any other ball, if balanced then 5 is the odd heavy ball else 3 is the odd light ball.

3. If 1,2,3,4 > 5,6,7,8 then either 1,2,3,4 contains a heavy ball or 5,6,7,8 contains a light ball so weigh 5,6,1 vs 7,2,12 with 3 possible outcomes:
3a If 5,6,1 vs 7,2,12 balances, then either 8 is the odd light ball or 3 or 4 is the odd heavy ball. Weigh 3 vs 4, if they balance then 8 is the odd light ball, or the heaviest of 3 vs 4 is the odd heavy ball.
3b If 7,2,12 is heavy then either 2 is the odd heavy ball or 5 or 6 is the odd light ball. Weigh 5 vs 6, if balanced then 2 is the odd heavy ball, or the lighest of 5 vs 6 is the odd light ball.
3c If 7,2,12 is light then either 7 is light or 1 is heavy. Weigh 7 against any other ball, if balanced then 1 is the odd heavy ball else 7 is the odd light ball.

Last edited: Aug 31, 2010