×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Find the odd ball

Find the odd ball

Find the odd ball

(OP)
This is a variation of 'The Odd Pill' thread but much tougher  to solve.

You are given 12 balls identical in appearance, however one ball is heavier or lighter than the rest. In 3 weighings, using a balance scale, find out which ball has a different weight and whether it is heavier or lighter than the rest. You are allowed to label the balls.  

RE: Find the odd ball

First you take 6 balls and weigh them.  If they are hevier you throw them out.  Else you keep them.

Then you take the six remaining balls and split them in half.  
You see which is heavier.

Then you pair one of the balls in the heavier group with one of the balls in the unknown group. And you weigh against another pair of heavier and unknown.  If the scale tips either way you have your answer.  If it is even it is the ball you have not checked.

Process of elimitnation!

\/
00|00
00|00
00|00

\/
0|0
0|0
0|0

*0<-could be the answer
---
0|0<-these two are not weighted.
---
00<-

RE: Find the odd ball

Or just weigh two of the last 3, and if the scale tips in any direction, you have your answer.

If it does not....the one you didnt weigh is the answer..

RE: Find the odd ball

I'm not following why you would throw away half of the balls if they were heavier. The problem states that one of the balls is a different weight to the others, and that you have to work out which one it is and whether it is lighter or heavier than the rest. It's got me stumped!

Geraint

The lights are on but nobody's home, my elevator doesn't go to the top. I'm not playing with a full deck, I've lost my marbles. Barenaked Ladies - Crazy

RE: Find the odd ball

I have arbitrarily decided lighter ball is odd.

The answer is reversible if it is heavier.

RE: Find the odd ball

If you try to work the problem,
you will see that the scale solves it for you.

There has to be an attempt to weigh too supposidly equal amounts to solve each step.  

Get into the problem and you can solve it.

If you dont try, you never will.

RE: Find the odd ball

CODE


Weigh any four against any other four.

Two cases:
If in balance, then the false ball is one of the remaining four (Case 1).
If not balance then the balls can be labelled H or L for possibly heavy or possibly light (Case 2).

Case1:
Weigh two of the remaining unknown balls against one unknown and one good ball.

Three cases:
If in balance, then the false ball is the remaining (12th) ball.  Weigh it against a known good ball to see whether it is light or heavy. (Case 1.1)
If balance tips left, then the balls can be labelled H, H, L and G. (Case 1.2)
If balance tips right, then the balls can be labelled L, L, H and G. (Case 1.3)

Case 1.2: weigh the H against the H.  If either one is actually heavy, that is the false ball and it is heavy.  If the scale balances, the remaining L is the false ball and it is light.

Case 1.3: similar to case 1.2 first weighing L against L.


Case2:  We have eight balls labelled H, H, H, H, and L, L, L, L for possibly light or heavy--- and 4 known good balls.

Second weighing: H, H, L against H, L, G (any of the four balls known to be good because they were not in the first weighing).
Three cases:
Balance (case 2.1)
Tips left (case 2.2)
Tips right (case 2.3)

Case 2.1:
Third weighing: Take the two possibly light balls which were not involved in the second weighing and weigh them against each other.  Either one is false and light or they balance in which case we now know the possibly heavy ball which was not involved in the second weighing is false and heavy.

Case 2.2
Third weighing: Weigh the two possibly heavy balls from the left-hand pan against each other.  Either one of them is false (and heavy) or the "L" from the right-hand pan is false (and light).

Case 2.3
Third weighing: Weigh the two possibly light balls from the right-hand pan against each other.  Either one of them is fals (and light) or the "H" from the left-hand pan is false (and heavy).


RE: Find the odd ball

>I have arbitrarily decided lighter ball is odd.

Which means that you are answering a completely different (and much simpler) problem

RE: Find the odd ball

Aaah yes I see that now.

RE: Find the odd ball

First some abbreviations: W1, W2, W3 = Weighing # 1, 2, 3 & Tag balls with characters 'A' through 'L', then
W1 ABC-DEF means: weigh balls A,B,C on left scale and D,E,F on right one. Weighing results: LU = left scale up, LD = left scale down, EQ = equilibrium.
My solution:
(Indentation for next weighing, ':' for next step, same weighing/outcome as in preceding line is left blank)

W1 ABCD-EFGH, EQ: W2 IJK-ABC EQ: W3 L-A EQ: (impossible)
                                        LU: L lighter
                                        LD: L heavier
                             LU: W3 I-J EQ: K lighter
                                        LU: I lighter
                                        LD: J lighter
                             LD: W3 I-J EQ: K heavier
                                        LU: J heavier
                                        LD: I heavier
              LU: W2 ABE-FCI EQ: W3 G_H EQ: D lighter
                                        LU: H heavier
                                        LD: G heavier
                             LU: W3 A-B EQ: F heavier
                                        LU: A lighter
                                        LD: B lighter
                             LD: W3 C-L EQ: E heavier
                                        LU: C lighter
                                        LD: (impossible)
              LD: W2 ABE-FCI EQ: W3 G_H EQ: D heavier
                                        LU: G lighter
                                        LD: H lighter
                             LU: W3 C-L EQ: E lighter
                                        LU: (impossible)
                                        LD: C heavier
                             LD: W3 A-B EQ: F lighter
                                        LU: B heavier
                                        LD: A heavier

(3 weighing outcomes are impossible, as expected:
3*3*3-3 = 12*2)

Explan. Row #10,11,12: D lighter, H heavier, G heavier:
W1 ABCD-EFGH, LU: IJKL are regular, W2 ABE-FCI EQ: ABCEF are regular, leaving DGH. W3 G-H EQ: GH are regular, so W1 means D is lighter, by the other two results of W3 D is regular, so W1 means either G or H is heavier, determined by W3.
 
Explan. Row #22,23,24:
W1 ABCD-EFGH, LD: IJKL are regular, W2 ABE-FCI LU: DGH are regular, so only one of ABCEF is irregular, compared to W1 balance was tipped other way round, and only CE switched scale, so either E is lighter or C is heavier, which is why
W3 C-L LU is impossible, and accounts for the outcome of rows 22 & 24.

I leave you guys to work out the rest, or did I give away too much already? smile

RE: Find the odd ball

A. Find the odd group, using 3 groups of 4 balls
   (let groups = G1, G2, G3)

W1:                 G1 v G2
                  /         \
              Equal       Not Equal
                |             |
            G3 is odd         |
                              |
W2:                        G1 v G3
                         /         \
                   Equal             Not Equal
                     |                  |
                  G2 is odd          G1 is odd



B. Find odd ball, using odd group determined
   (let balls = B1, B2, B3, B4)

W1:                       B1 v B2
                        /          \
                    Equal        Not Equal
                      /               \
              B3 or B4 is odd     B1 or B2 is odd
                   |                   |
                   |                   |
W2:             B1 v B3             B1 v B3
               /       \           /       \
            Equal   Not Equal   Equal   Not Equal
              |         |         |         |
Odd ball:    B4        B3        B2        B1



A. Finding the odd group took either 1 or 2 weighings

B. Finding the odd ball in the odd group took 2 weighings

Total: Either 3 or 4 weighings

Max Hugen
Australia

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close