rec.puzzles Archive

You are given 6 cubes (A, B, C, D, E and F).

logic/weighing/six.cubes New

New entry, edited from material collected for the archive and not yet in a released version.

Problem

You are given 6 cubes (A, B, C, D, E and F).

You know that one of the cubes A, B and C weighs 2Kg, the other 4Kg and
the third 6Kg, but you do NOT know which of them weighs 2Kg, 4Kg or 6Kg.

You also know that the possible weights of the cubes D, E and F are
1Kg, 3Kg, and 5Kg.  Again you do not know the exact weights of the three
cubes.

You are also given a scale balance.

Can you find out the weight of each of the 6 cubes in only 3 weighings?
If your answer is yes then how can you achieve that?

If your answer is no then which is the minimum number of weighings
required?

-- GSTATH <anti.spam.ch92616@ntral.ntua.gr>
Show solution
If these were really the weights, I think you'd at least be able to pick
out the two light blocks without even trying, when picking them up.
If they were really 12, 14, 16, 11, 13, and 15 the problem would be
unchanged, but you won't be able to tell them apart so easily, so I'll
pretend they were, while solving the problem with your numbers anyway.

Do you have a scale (like the bathroom scale you weigh yourself on) or
a balance (two pans, shows either equal weight or which side is heavier)?

If you have a scale, clearly you can do it in 4 weighings by weighing
A, B, D, and E separately and figuring the other weights by process of
elimination.  Can it be done in three?

First weigh cubes A and D.  There are 5 possible weights: 3, 5, 7, 9, and
11 kg.  If you get a weight of 3 or 11, you know you have the two lightest
or two heaviest cubes, weigh B next and then E and get the last two weights
by process of elimination.

If you got 5 or 9 kg, weigh B and E. The same 5 weights are possible.  If
you get 3 or 11, again you know you have the two lightest or heaviest cubes;
weigh A alone to find the other weights.  If you get the same weight you got
the first time, then the remaining two cubes are the two heaviest or the two
lightest.  In the other cases (7 on 2nd weighing, or the other one out of
5 and 9), cover up the column in the table below that corresponds to
the weight you didn't get.  One of the two rows corresponds to the weights
you have; weigh block A separately to determine which case you have, and
you can find all the weights.

  5    7    9
 1,4  5,2  3,6
 3,2  1,6  5,4

If you got 7 kg the first weighing, this is the tricky case.  You can't
just weigh B and E as above, because there are 6 arrangements of the
weights that give 7 kg again, and you can't tell these apart in a single
weighing (try it -- any possible weighing you can perform has only 5
possible results, given what you knew at the beginning of the problem).
After some work, I found that you can solve this case by weighing
D, B, and E in the 2nd weighing.  There are 5 possible outcomes, 7, 9,
11, 13, and 15.  Now weigh A and E for the third weighing.  In the tables
below, which list all 12 combinations for a 7 on the first weighing, you
will see that this always determines the weights.

a d b e  2nd  3rd   a d b e  2nd  3rd   a d b e  2nd  3rd
3 4 1 2   7    5    1 6 3 4  13    5    1 6 3 2  11    3
5 2 1 4   7    9    1 6 5 2  13    3    3 4 1 6  11    9
                                        3 4 5 2  11    5
5 2 3 4   9    9    1 6 5 4  15    5    5 2 3 6  11   11
5 2 1 6   9   11    3 4 5 6  15    9

[ Editor: these tables give A and B the odd weights and D and E the
even ones, the reverse of the problem statement (e.g. first row: a=3,
d=4, b=1, e=2 gives D+B+E = 4+1+2 = 7 and A+E = 3+2 = 5). ]

In the case of a balance, it can't be done in 3 weighings because there
are only 27 possible sequences of results for the balance (3 at each
weighing) and there are 36 possible orders of the cubes to distinguish.
It might be possible to do it in 4 weighings, but I wasn't able to
figure out how.

-- Joseph W. DeVincentis <devjoe@wilma.che.utexas.edu>

----------------------------------------------------------------------

As several folks (including myself) have pointed out, at least four
weighings are necessary.  This post will demonstrate that four weighings
are sufficient.

First, weigh AD vs. BE, and then weigh AE vs. BF.  There are nine
possible results for these two experiments; here they are with the
possible weight configurations that produce them (the code here is that
AD-0 means that the first weighing found AD heavier and the second
weighing was even):

0-0:        135642        315246        351642        531246
0-AE:        315462        513264        531462
0-BF:        135426        153624        351426

AD-0:        315624        513426        531624
AD-AE:        315642        513246        513462        513624        513642        531642
AD-BF:        135624        315426        351624        531426

BE-0:        135264        153462        351264
BE-AE:        135462        153264        315264        351462        531264
BE-BF:        135246        153246        153426        153642        351246

[ Editor: each code lists the weights of A-F in order; like
DeVincentis's tables, they give A, B, C the odd weights and D, E, F the
even ones (e.g. 135642: A=1, D=6). ]

Splitting up the these remaining cases is left to the reader.  It gets
tedious to devise separate weighing strategies for each subcase, but you
have two additional weighings, which is plenty of room to differentiate.

To tackle the biggest subcase as an example, in the AD-AE case, weigh AC
vs. EF.  The worst case from that is that AC is heavier, which could be
315642, 513624, or 513642.  Weighing AF vs. BD fourth will split that
into individual cases.  If AC vs. EF were even, then it's either 513462
or 531642, and A vs. CF will determine which.  Finally, if AC vs. EF had
EF heavier, then you'd know that it must be 513246.

-- Matthew Daly <mwdaly@pobox.com>

----------------------------------------------------------------------

Matthew Daly has already pointed out that 3 weighings is insufficient.
It is possible to do it in 4 weighings.  I suspect that there is a
solution that specifies all four weighings ahead of time.  This is
not that solution.

First weigh AD vs BE and AE vs BD.

Case 1 AD < BE and AE < BD
Weigh D vs E and E vs F

Case 2 AD < BE and AE = BD
Weigh B vs DE and B vs C

Case 3 AD < BE and AE > BD
Weigh A vs B and B vs C

Case 4 AD = BE and AE < BD
Weigh B vs DE and B vs C

Case 5 AD = BE and AE > BD
Weigh A vs DE and A vs C

Case 6 AD > BE and AE < BD
Weigh A vs B and B vs C

Case 7 AD > BE and AE = BD
Weigh A vs DE and A vs C

Case 8 AD > BE and AE > BD
Weigh D vs E and E vs F

While I'm sure that there are probably nicer solutions, this one does
show that the problem is solvable with 4 weighings.

-- Kevin Green <kdg977t@cnas.smsu.edu>

----------------------------------------------------------------------

Here is a solution that is almost completely pre-specified -- there are
only two cases.

First weighing is A vs B
Second weighing is D vs E

If these results are A>B and D>E, then go to case 1
If these results are A<B and D<E, then go to case 1
If these results are A>B and D<E, then go to case 2
If these results are A<B and D>E, then go to case 2

Case 1: Third weighing is A,E vs C,F
        Fourth weighing is A,F vs C,D

Case 2: Third weighing is A,D vs C,F
        Fourth weighing is A,F vs C,E

-- Barry Wolk <wolk@ccm.umanitoba.ca>