A Conversation for The H2G2 Puzzle Network

Puzzle 3

Post 1

Popa_Mintin

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

Post 2

aka Bel - A87832164

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 smiley - erm
Put eight balls on either side of the scale and hope for the best, i.e. that you already have the lighter ball left smiley - rofl
I'm too tired right now, but will think about this agin later (tomorrow)

Bel

smiley - somersault


Puzzle 3

Post 3

aka Bel - A87832164

See how uncconcentrated I am ? Typos, and I meant four balls on each side, not eight smiley - silly


Puzzle 3

Post 4

Popa_Mintin

From the king of the typo... smiley - spacesmiley - spacesmiley - space welcome to the club Bel smiley - spacesmiley - spacesmiley - rose


Puzzle 3

Post 5

Icy North

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

Post 6

Icy North

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.

smiley - cheers Icy


Puzzle 3

Post 7

Popa_Mintin

Icy...

I think you'll find there is at least one flaw in this section's arguments. smiley - space ( 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. smiley - space { this indicates that ball 5 is light}
If W3R:RPH, then RES:B5L smiley - space { 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. smiley - space 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. smiley - space So I shall wait until I have a correct solution to mine if you don't mind.
Popa.


Puzzle 3

Post 8

Popa_Mintin

Icy, If I understand your puzzle correctly, I'm struggling with it. smiley - spacesmiley - biggrin

Popa.


Puzzle 3

Post 9

Icy North

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)

smiley - space If W2R:LPH, then W3: L(1) v R(2)

smiley - spacesmiley - space If W3R:LPH, then RES->B1H
smiley - spacesmiley - space Elseif W3R:RPH, then RES->B2H
smiley - spacesmiley - space Elseif W3R:BAL, then RES->B5L

smiley - space Elseif W2R:RPH, then W3: L(6) v R(7)

smiley - spacesmiley - space If W3R:LPH, then RES->B7L
smiley - spacesmiley - space Elseif W3R:RPH, then RES->B6L
smiley - spacesmiley - space Elseif W3R:BAL, then RES->B3H

smiley - space Elseif W2R:BAL, then W3: L(4) v R(1)

smiley - spacesmiley - space If W3R:LPH, then RES->B4H
smiley - spacesmiley - space Elseif W3R:RPH, then RES->undefined
smiley - spacesmiley - space Elseif W3R:BAL, then RES->B8L

Elseif W1R:RPH, then W2: L(125) v R(367)

smiley - space If W2R:LPH, then W3: L(1) v R(2)

smiley - spacesmiley - space If W3R:LPH, then RES->B2L
smiley - spacesmiley - space Elseif W3R:RPH, then RES->B1L
smiley - spacesmiley - space Elseif W3R:BAL, then RES->B5H

smiley - space Elseif W2R:RPH, then W3: L(6) v R(7)

smiley - spacesmiley - space If W3R:LPH, then RES->B6H
smiley - spacesmiley - space Elseif W3R:RPH, then RES->B7H
smiley - spacesmiley - space Elseif W3R:BAL, then RES->B3L

smiley - space Elseif W2R:BAL, then W3: L(4) v R(1)

smiley - spacesmiley - space If W3R:LPH, then RES->undefined
smiley - spacesmiley - space Elseif W3R:RPH, then RES->B4L
smiley - spacesmiley - space Elseif W3R:BAL, then RES->B8H

Elseif W1R:BAL, then W2: L(9) v R(1)

smiley - space If W2R:LPH, then RES->B9H
smiley - space Elseif W2R:RPH, then RES->B9L
smiley - space 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.

smiley - cheers Icy


Puzzle 3

Post 10

Popa_Mintin

Icy
Another valiant effort, sadly also flawed. smiley - spacesmiley - sadface

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. smiley - space Had no time to try 3A again as yet. smiley - space (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

Post 11

Icy North

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 smiley - erm

smiley - cheers Icy


Puzzle 3

Post 12

Popa_Mintin


Transposed at which point Icy? smiley - space 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! ) smiley - spacesmiley - biggrinsmiley - space 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

Post 13

Icy North

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 smiley - biggrin


W1: L(1234) v R(5678)

If W1R:LPH, then {1234H, 5678L} W2: L(125) v R(346);

smiley - spacesmiley - space If W2R:LPH, then {12H,6L} W3: L(1) v R(2);

smiley - spacesmiley - spacesmiley - spacesmiley - space If W3R:LPH, then RES->B1H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:RPH, then RES->B2H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:BAL, then RES->B6L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Endif;

smiley - spacesmiley - space Elseif W2R:RPH, then {34H,5L} W3: L(3) v R(4);

smiley - spacesmiley - spacesmiley - spacesmiley - space If W3R:LPH, then RES->B3H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:RPH, then RES->B4H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:BAL, then RES->B5L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Endif;

smiley - spacesmiley - space Elseif W2R:BAL, then {78L} W3: L(7) v R(1);

smiley - spacesmiley - spacesmiley - spacesmiley - space If W3R:LPH, then RES->undefined;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:RPH, then RES->B7L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:BAL, then RES->B8L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Endif;

smiley - spacesmiley - space Endif;

Elseif W1R:RPH, then {1234L, 5678H} W2: L(125) v R(346);

smiley - spacesmiley - space If W2R:LPH, then {34L,5H} W3: L(3) v R(4);

smiley - spacesmiley - spacesmiley - spacesmiley - space If W3R:LPH, then RES->B4L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:RPH, then RES->B3L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:BAL, then RES->B5H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Endif;

smiley - spacesmiley - space Elseif W2R:RPH, then {12L,6H} W3: L(1) v R(2);

smiley - spacesmiley - spacesmiley - spacesmiley - space If W3R:LPH, then RES->B2L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:RPH, then RES->B1L;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:BAL, then RES->B6H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Endif;

smiley - spacesmiley - space Elseif W2R:BAL, then {78H} W3: L(7) v R(1);

smiley - spacesmiley - spacesmiley - spacesmiley - space If W3R:LPH, then RES->B7H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:RPH, then RES->undefined;
smiley - spacesmiley - spacesmiley - spacesmiley - space Elseif W3R:BAL, then RES->B8H;
smiley - spacesmiley - spacesmiley - spacesmiley - space Endif;

smiley - spacesmiley - space Endif;

Elseif W1R:BAL, then {9H,9L} W2: L(9) v R(1);

smiley - spacesmiley - space If W2R:LPH, then RES->B9H;
smiley - spacesmiley - space Elseif W2R:RPH, then RES->B9L;
smiley - spacesmiley - space Elseif W2R:BAL, then RES->undefined;
smiley - spacesmiley - space Endif;

Endif;


Puzzle 3

Post 14

Popa_Mintin



Congrats Icy... smiley - spacesmiley - spacesmiley - biggrin
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. smiley - space If the pans are ballanced, the odd ball is one of the remaining three. smiley - space 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:- smiley - space Discard the six standard balls. smiley - space From the remaing three balls, place one ball in each pan. and make second weigh. smiley - space 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. smiley - space 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. smiley - space 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. smiley - space Thank you for having a go, I hope you enjoyed it smiley - spacesmiley - smiley

Popa


Puzzle 3

Post 15

Icy North

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

Post 16

Popa_Mintin



Hi Icy... smiley - spacesmiley - biggrin
I reckon I've got it cracked... eventually smiley - spacesmiley - smiley

Key: smiley - space R: Result. smiley - space W1, W2, W3, Weighings 1,2 and 3. smiley - space A, B, Scale pans. smiley - space ^ Pan Up. smiley - space ~ Balanced Pans. smiley - space ( No.s of balls in pan ) smiley - space
H = Heavy ball or group, L = Light ball or group, N = Non-standard ball. smiley - space All balls proven to be standard = 0.


R:W1 smiley - space A(0,1,2,3,4) ~ B(5,6,7,8,9) = smiley - space 0 to 9 inc. = 0
R:W2 smiley - space A(10,11,12) ~ B(0,0,0) = smiley - space 13 N
R:W3 smiley - space A^(13) B(0) = smiley - space 13 L
R:W3 smiley - space A(13) B^(0) = smiley - space 13 H

R:W2 smiley - space A^(10,11,12) B(0,0,0) = smiley - space N L. smiley - space 13 = 0
R:W3 smiley - space A(10) ~ B(11) = smiley - space 12 L. smiley - space Else 12 = 0, ^Ball = L

R:W2 smiley - space A(10,11,12) B^(0,0,0) = smiley - space N H. smiley - space 13 = 0
R:W3 smiley - space A(10) ~ B(11) = smiley - space 12 H. smiley - space Else 12 = 0, ^Ball = 0.
____________________________________________________________________

R:W1 smiley - space A^(0,1,2,3,4) B(5,6,7,8,9) = smiley - space 10,11,12,13 = 0.
R:W2 smiley - space A(1,2,5) ~ B(3,4,6) = smiley - space 7,8,or 9 L
R:W3 smiley - space A(7) ~ B(8) = smiley - space 9 L. smiley - space Else 9 = 0, ^Ball = L

R:W2 smiley - space A^(1,2,5) ~ B(3,4,6) = smiley - space 1 or 2 = L, or 6 = H
R:W3 smiley - space A(1) ~ B(2) = smiley - space 6 L. smiley - space Else 6 = 0, ^Ball = L
_________________________________________________________________

R:W1 smiley - space A(0,1,2,3,4) B^(5,6,7,8,9) = smiley - space 10,11,12,13 = 0
R:W2 smiley - space A^(1,2,5) B(3,4,6) = smiley - space 3 or 4 = H, or 5 = H
R:W3 smiley - space A(3) ~ B(4) = smiley - space 5 L. smiley - space Else 5 = 0, ^Ball = 0

R:W2 smiley - space A(1,2,5) B^(3,4,6) = smiley - space 1 or 2 = H, or 6 = L
R:W3 smiley - space A(1) ~ B(2) = smiley - space 6 = L. smiley - space 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. smiley - space I was going to comment on that but decided not to be too pedantic, and now here an I taking the same licence... smiley - spacesmiley - biggrin

Popa.


Puzzle 3A

Post 17

Icy North

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.

smiley - cheers Icy


Puzzle 3A

Post 18

Popa_Mintin

That's pretty cunning... nice job, as our American friends might say.

smiley - smiley

Popa.


Key: Complain about this post