A Conversation for The H2G2 Puzzle Network
Puzzle 3
Popa_Mintin Started conversation Feb 14, 2005
Hopefully this will appear as a new puzzle.
Contents of the puzzle:
9 x Pool Balls.
1 x Simple balance scale.
Each pool ball is exactly the same physical size and colour. Eight of them are identical in weight, the other, however has come from a different batch and it’s weight is slightly different to the others.
The scale is of the type usually used to depict the Zodiac sign Libra, with two pans suspended from a pivoted beam. The pans are each big enough to accommodate at least five of the pool balls.
The Problem:-
You have to identify the odd ball, and state whether it is lighter or heavier than the other eight. You may, however, use the scales only three times.
Popa.
Puzzle 3
aka Bel - A87832164 Posted Feb 19, 2005
Hi, took me a while to find this one - where did you find it ?
I once knew the answer to this one, but can'z recall it now
Put eight balls on either side of the scale and hope for the best, i.e. that you already have the lighter ball left
I'm too tired right now, but will think about this agin later (tomorrow)
Bel
Puzzle 3
Icy North Posted Mar 1, 2005
OK Popa,
Let's assume that
1. the balls are numbered 1 to 9,
2. Exactly one ball is a dud.
1st weighing: Left-hand pan holds balls 1,2 & 3, Right-hand pan holds balls 4,5 & 6. Let's use some shorthand: W1: L(1,2,3) v R(4,5,6)
If the result of Weighing 1 is "leftpan heavy" [shorthand: W1R: LPH], then W2: L(1,4) V R(2,5)
If W2R:LPH, then W3: L(1) v R(2)
If W3R:LPH, then we have the result Ball 1 is heavy [shorthand: RES: B1H]
If W3R:Scales Balanced [shorthand: W3R:BAL] then this is undefined.
If W3R:RPH, then RES:B5L
If W2R:RPH, then W3: L(1) v R(2)
If W3R:LPH, then RES: undefined
If W3R:RPH, then RES:B2H
If W3R:BAL, then RES:B4L
If W2R:BAL, then W3: L(3) v R(1)
If W3R:LPH, then RES:B3H
If W3R:RPH, then RES: undefined
If W3R:BAL, then RES:B6L
If W1R:RPH, then repeat W2 and W3 logic above, replacing "light" with "heavy" and vice versa throughout.
If W1R:BAL, then W2: L(7,8) v R(1,2)
If W2R:LPH, then W3: L(7) v R(8)
If W3R:LPH, then RES:B7H
If W3R:RPH, then RES:B8H
If W3R:BAL, then RES: undefined
If W2R:RPH, then W3: L(7) v R(8)
If W3R:LPH, then RES:B8L
If W3R:RPH, then RES:B7L
If W3R:BAL, then RES: undefined
If W2R:BAL, then W3: L(9) v R(1)
If W3R:LPH, then RES:B9H
If W3R:RPH, then RES:B9L
If W3R:BAL, then RES: undefined
QED
I hope this makes sense (but I somehow doubt it - It would look better with indentation).
Anyway, can I set one for you, Popa? - see next posting...
Puzzle 3A
Icy North Posted Mar 1, 2005
OK Popa,
I want you to do exactly the same as in your puzzle, but with the following differences:
a) There are now 13 balls (numbered 1 to 13)
b) You also have a standard ball (marked zero). This is the correct weight.
c) No more than one of the balls may be heavy or light (as in your puzzle), but there is also the possibility that there is no dud.
Icy
Puzzle 3
Popa_Mintin Posted Mar 2, 2005
Icy...
I think you'll find there is at least one flaw in this section's arguments. ( Copy and paste, then add comments )
If the result of Weighing 1 is "leftpan heavy" [shorthand: W1R: LPH], then W2: L(1,4) V R(2,5)
If W2R:LPH, then W3: L(1) v R(2)
If W3R:LPH, then we have the result Ball 1 is heavy [shorthand: RES: B1H]
If W3R:Scales Balanced [shorthand: W3R:BAL] then this is undefined. { this indicates that ball 5 is light}
If W3R:RPH, then RES:B5L { this in not possible. in W2R ball 2 was in the light pan }
As this is wrong, using the same logic in the following arguments these are also wrong.
Thank you for trying, at least you had a go. Please do have another try.
I'm not entirely sure I follow your puzzle, but if I answer it I'd be liable to give away the answer to mine. So I shall wait until I have a correct solution to mine if you don't mind.
Popa.
Puzzle 3
Icy North Posted Mar 2, 2005
You're quite right Popa, There was a big flaw in my 2nd weighing. Rather than patch it up, I've completely re-written the lot.
W1: L(1234) v R(5678)
If W1R:LPH, then W2: L(125) v R(367)
If W2R:LPH, then W3: L(1) v R(2)
If W3R:LPH, then RES->B1H
Elseif W3R:RPH, then RES->B2H
Elseif W3R:BAL, then RES->B5L
Elseif W2R:RPH, then W3: L(6) v R(7)
If W3R:LPH, then RES->B7L
Elseif W3R:RPH, then RES->B6L
Elseif W3R:BAL, then RES->B3H
Elseif W2R:BAL, then W3: L(4) v R(1)
If W3R:LPH, then RES->B4H
Elseif W3R:RPH, then RES->undefined
Elseif W3R:BAL, then RES->B8L
Elseif W1R:RPH, then W2: L(125) v R(367)
If W2R:LPH, then W3: L(1) v R(2)
If W3R:LPH, then RES->B2L
Elseif W3R:RPH, then RES->B1L
Elseif W3R:BAL, then RES->B5H
Elseif W2R:RPH, then W3: L(6) v R(7)
If W3R:LPH, then RES->B6H
Elseif W3R:RPH, then RES->B7H
Elseif W3R:BAL, then RES->B3L
Elseif W2R:BAL, then W3: L(4) v R(1)
If W3R:LPH, then RES->undefined
Elseif W3R:RPH, then RES->B4L
Elseif W3R:BAL, then RES->B8H
Elseif W1R:BAL, then W2: L(9) v R(1)
If W2R:LPH, then RES->B9H
Elseif W2R:RPH, then RES->B9L
Elseif W2R:BAL, then RES->undefined
There is a much easier way to solve this, which allows you to weigh up to 13 balls (hence my puzzle), which I'll explain later. Let me know if you need a hint.
Icy
Puzzle 3
Popa_Mintin Posted Mar 2, 2005
Icy
Another valiant effort, sadly also flawed.
Icy: W1: L(1234) v R(5678)
Pop: If W1R:LPH then:- 1,2,3 or 4 = Heavy OR 5,6,7 or 8 = Light. 9 = Standard.
Icy: If W1R:LPH, then W2: L(125) v R(367)
Pop: If W2R:LPH then:- 1 or 2 = Heavy OR 6 or 7 = Light. 3 and 5 = Standard.
Icy: If W2R:LPH, then W3: L(1) v R(2)
Icy: If W3R:LPH, then RES->B1H
Icy: Elseif W3R:RPH, then RES->B2H
Pop: OK.
Icy: Elseif W3R:BAL, then RES->B5L
Pop: if W3R:BAL, then:- 6 or 7 = Light. (but which ? )
Icy, you're trying too hard, it's much more simple than this. Had no time to try 3A again as yet. (also, in order for the smiley space to work, there has to be at least one character before it, other than the normal ASCII 32 space. Oh, and as with all smilies, there has to be a (normal) space before the < and after the > ).
Popa
Puzzle 3
Icy North Posted Mar 2, 2005
The trouble is this is 20% working out (using diagrams), and 80% transcribing into plain-text.
After a while mistakes creep in, and it's doubly frustrating as it wastes your time too.
OK, I think I transposed balls 5 and 7 when interpreting the results of the weighings. Does that fix it?
Maybe I'll stick to Eagle Eye - it's much safer
Icy
Puzzle 3
Popa_Mintin Posted Mar 3, 2005
Transposed at which point Icy? But I don't think so anyway.
And you're dead right about the complications of describing what you're trying to do, I had a go at writing up my solution and it took a lot longer than I thought it would. But not as much writing as yours does. (actually, that may not be true, it could well be as much as yours! ) And as for wasting my time, not at all... it's interesting to see if there's another way.
Please don't stop trying.
Popa
Puzzle 3
Icy North Posted Mar 3, 2005
You're right of course. It was more than a simple transposition of two balls.
This time, I've included after each weighing result, the possible solutions in curly brackets, e.g. {45H, 6L} means that we know either ball 4 is heavy, ball 5 is heavy or ball 6 is light. I've also added some Endif statements to help any old BASIC programmers out there to understand this. This brings it all back - I haven't written anything in BASIC since the 1980's. If I have to write this again, it will be in COBOL, so be warned
W1: L(1234) v R(5678)
If W1R:LPH, then {1234H, 5678L} W2: L(125) v R(346);
If W2R:LPH, then {12H,6L} W3: L(1) v R(2);
If W3R:LPH, then RES->B1H;
Elseif W3R:RPH, then RES->B2H;
Elseif W3R:BAL, then RES->B6L;
Endif;
Elseif W2R:RPH, then {34H,5L} W3: L(3) v R(4);
If W3R:LPH, then RES->B3H;
Elseif W3R:RPH, then RES->B4H;
Elseif W3R:BAL, then RES->B5L;
Endif;
Elseif W2R:BAL, then {78L} W3: L(7) v R(1);
If W3R:LPH, then RES->undefined;
Elseif W3R:RPH, then RES->B7L;
Elseif W3R:BAL, then RES->B8L;
Endif;
Endif;
Elseif W1R:RPH, then {1234L, 5678H} W2: L(125) v R(346);
If W2R:LPH, then {34L,5H} W3: L(3) v R(4);
If W3R:LPH, then RES->B4L;
Elseif W3R:RPH, then RES->B3L;
Elseif W3R:BAL, then RES->B5H;
Endif;
Elseif W2R:RPH, then {12L,6H} W3: L(1) v R(2);
If W3R:LPH, then RES->B2L;
Elseif W3R:RPH, then RES->B1L;
Elseif W3R:BAL, then RES->B6H;
Endif;
Elseif W2R:BAL, then {78H} W3: L(7) v R(1);
If W3R:LPH, then RES->B7H;
Elseif W3R:RPH, then RES->undefined;
Elseif W3R:BAL, then RES->B8H;
Endif;
Endif;
Elseif W1R:BAL, then {9H,9L} W2: L(9) v R(1);
If W2R:LPH, then RES->B9H;
Elseif W2R:RPH, then RES->B9L;
Elseif W2R:BAL, then RES->undefined;
Endif;
Endif;
Puzzle 3
Popa_Mintin Posted Mar 4, 2005
Congrats Icy...
That all checks out (Well I fast tracked the W1R:RPH making the assumption that it was the same logic as W1R:LPH, and that 'Undefined' = Not possible).
I wonder why you tested 7 against 1 though, since only 7 or 8 could be the odd ball in that weighing, and you knew whether it was heavy or light on both occasions.
In case you'd like to know my method, it follows:-
Place 3 balls in each pan, and use first weigh. If the pans are ballanced, the odd ball is one of the remaining three. Else, we have three balls, one of which could be heavy, and three balls, one of which could be light.
Take the case first weigh is ballanced:- Discard the six standard balls. From the remaing three balls, place one ball in each pan. and make second weigh. If the pans are ballanced, the third ball is the odd ball, and using the third weigh to test it with any other ball will determine if it's heavy or light.
If the pans don't balance, the third ball is a standard ball, swap it with (say) the ball which was in the upper pan (i.e. could be a light ball) and use the third weigh, if the pans ballance then the swapped ball is indeed light, or if not, the ball in the down pan is heavy.
Take the case the first weigh is not ballanced, the three untested balls must all be standard balls. Swap these three balls with the three balls in (say) the upper pan. (i.e. one of which could be a light ball). and make the second weighing. If the pans ballance then a light ball is indeed one of the swapped three, else, one of the balls in the down pan is heavy.
Take the three balls with the odd ball amongst them, knowing that the odd ball is either heavy or light since this has been determined, place one ball in each pan and make the third weighing, if ballanced, the third ball is the odd one, or if not the odd ball is displayed in the scales.
A good effort Icy. Thank you for having a go, I hope you enjoyed it
Popa
Puzzle 3
Icy North Posted Mar 4, 2005
Thanks Popa,
Your logic is neater than mine.
I actually found this easier to solve for 13 balls than 9. Would you like to know how?
Icy
Puzzle 3A
Popa_Mintin Posted Mar 4, 2005
Hi Icy...
I reckon I've got it cracked... eventually
Key: R: Result. W1, W2, W3, Weighings 1,2 and 3. A, B, Scale pans. ^ Pan Up. ~ Balanced Pans. ( No.s of balls in pan )
H = Heavy ball or group, L = Light ball or group, N = Non-standard ball. All balls proven to be standard = 0.
R:W1 A(0,1,2,3,4) ~ B(5,6,7,8,9) = 0 to 9 inc. = 0
R:W2 A(10,11,12) ~ B(0,0,0) = 13 N
R:W3 A^(13) B(0) = 13 L
R:W3 A(13) B^(0) = 13 H
R:W2 A^(10,11,12) B(0,0,0) = N L. 13 = 0
R:W3 A(10) ~ B(11) = 12 L. Else 12 = 0, ^Ball = L
R:W2 A(10,11,12) B^(0,0,0) = N H. 13 = 0
R:W3 A(10) ~ B(11) = 12 H. Else 12 = 0, ^Ball = 0.
____________________________________________________________________
R:W1 A^(0,1,2,3,4) B(5,6,7,8,9) = 10,11,12,13 = 0.
R:W2 A(1,2,5) ~ B(3,4,6) = 7,8,or 9 L
R:W3 A(7) ~ B(8) = 9 L. Else 9 = 0, ^Ball = L
R:W2 A^(1,2,5) ~ B(3,4,6) = 1 or 2 = L, or 6 = H
R:W3 A(1) ~ B(2) = 6 L. Else 6 = 0, ^Ball = L
_________________________________________________________________
R:W1 A(0,1,2,3,4) B^(5,6,7,8,9) = 10,11,12,13 = 0
R:W2 A^(1,2,5) B(3,4,6) = 3 or 4 = H, or 5 = H
R:W3 A(3) ~ B(4) = 5 L. Else 5 = 0, ^Ball = 0
R:W2 A(1,2,5) B^(3,4,6) = 1 or 2 = H, or 6 = L
R:W3 A(1) ~ B(2) = 6 = L. Else 6 = 0, ^Ball = 0
___________________________________________________________________
I'm using the same assumption as you did, that the balls don't roll around in the pans, so each ball's identity is maintained. I was going to comment on that but decided not to be too pedantic, and now here an I taking the same licence...
Popa.
Puzzle 3A
Icy North Posted Mar 5, 2005
Popa,
That looks pretty good to me.
My solution has the benefit that you can fix your three wighings at the outset - they are not conditional on earlier results:
The three weighings are:
W1: L(1,2,3,4,5) v R(6,7,8,9,0)
W2: L(1,5,8,9,13) v R(2,6,11,12,0)
W3: L(1,3,7,12,0) v R(2,5,9,10,11)
Results of three combined weighings (L=Left Pan Heavy, R=Right Pan Heavy, B=Balanced):
LLL => RES:B1H (i.e. if all three weighings are "left pan heavy" then Ball 1 is heavy)
LLB => RES:B6L
LLR => RES:B5H
LBL => RES:B3H
LBB => RES:B4H
LBR => RES:B7L
LRL => RES:B9L
LRB => RES:B8L
LRR => RES:B2H
BLL => RES:B11L
BLB => RES:B13H
BLR => RES:B12L
BBL => RES:B10L
BBB => RES:No dud
BBR => RES:B10H
BRL => RES:B12H
BRB => RES:B13L
BRR => RES:B11H
RLL => RES:B2L
RLB => RES:B8H
RLR => RES:B9H
RBL => RES:B7H
RBB => RES:B4L
RBR => RES:B3L
RRL => RES:B5L
RRB => RES:B6H
RRR => RES:B1L
When I first saw your puzzle, I could see that 3 weighings with each of three outcomes leads to 3³ or 27 results, i.e. you could accommodate up to 13 balls either light or heavy, or none heavy.
I set up these outcomes in a grid, allocated the results in turn to one of the outcomes, and allocated the ball to the correct pan for each weighing. You have to be careful that you have the same number of balls in each pan, so there's a bit of juggling to do, but it's not difficult.
Icy
Key: Complain about this post
Puzzle 3
- 1: Popa_Mintin (Feb 14, 2005)
- 2: aka Bel - A87832164 (Feb 19, 2005)
- 3: aka Bel - A87832164 (Feb 19, 2005)
- 4: Popa_Mintin (Feb 20, 2005)
- 5: Icy North (Mar 1, 2005)
- 6: Icy North (Mar 1, 2005)
- 7: Popa_Mintin (Mar 2, 2005)
- 8: Popa_Mintin (Mar 2, 2005)
- 9: Icy North (Mar 2, 2005)
- 10: Popa_Mintin (Mar 2, 2005)
- 11: Icy North (Mar 2, 2005)
- 12: Popa_Mintin (Mar 3, 2005)
- 13: Icy North (Mar 3, 2005)
- 14: Popa_Mintin (Mar 4, 2005)
- 15: Icy North (Mar 4, 2005)
- 16: Popa_Mintin (Mar 4, 2005)
- 17: Icy North (Mar 5, 2005)
- 18: Popa_Mintin (Mar 5, 2005)
More Conversations for The H2G2 Puzzle Network
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."