BrainDen.com - Brain Teasers
• 0

# Weighing machines

Go to solution Solved by DeGe,

## Question

Twelve golden eggs are nestled on the wooden shelves
and tagged according to their weights (troys)..Somehow
the caretaker would switch any two of these precious
items and forget which two should be returned on the
the right shelves. Fortunately, the weighing machines
are available..To find out where the switched eggs are,
he must use a better equipment ,that is to minimize
the weight trying. If both the digital scale and beam
balance are working ..which one would you recommend?

What is the least no. of usage?

## Recommended Posts

• 0

I would recommend to use the digital scale.
In max 5 weighings, the swapped pair of eggs can be identified:

Weigh 1 to 6 number eggs It should weigh 15

If it weighs other than 15, refer to weighings A below - max 2 more weighings needed

If weight > by Possible egg switches       1 6 & 8         2 6 & 8 5 & 7       3 6 &9 5 & 8 4 & 7     4 6 & 10 5  &  9 4 & 8 3 & 7   5 6 & 11 5  &  10 4 & 9 3 & 8 2 & 7 6 6 & 12 5 & 11 4 & 10 3 & 9 2 & 8 7 5 & 12 4 & 11 3 & 10 2 & 9 1 & 8 8 4 & 12 3 & 11 2 & 10 1 & 9   Taking worst case example where there are 5 possibilities Weigh 6 10 4 8 If weight is +5, possibilities are 6 &11, 4 &9 If weight is -5, then possibilities are 5 &10, 3 &8 If there is no difference then eggs 2 &7 are swapped Depending on the weight difference, whoose either 6 &9, or 5 &8 to weigh Depending on the next weigh difference (+5 or -5), the swapped eggs are identified

Otherwise    Weigh 2 4 6 8 10 12 It should weigh 42

If it weighs other than 42, refer to weighings "B" below - max 3 more weighings needed

If weight difference Possible egg switches         -5 1   6 7    12         -3 1   4 6    3 10    7 12   9     -1 1   2 3    4 5    6 7   8 9    10 11    12 1 2    3 4    5 8   9 10   11     3 2   5 8   11

Taking worst case example where there are 6 possibilties (-1 weigh difference)

Possbilities Possible egg switches +1 1   2 5    6 -1 3    4 7   8 0 9    10 11    12

If weight difference Weigh +1 1 & 6 -1 3 & 8 0 9 & 12

A positive or negative weight difference in this weighing identifies the swapped pair

For example if in weighing 1&6, the weight is 6, then the swapped eggs are 5 &6

If the weight is 8, then swapped eggs are 1 & 2

Otherwise    Weigh 1 2 11 12 It should weigh 26

If it weighs other than 42, refer to weighings "C" below

Weight Difference Possible egg switches     4 1   5 2   6     2 1   3 2   4     -2 10   12 9   11     -4 8    12 7   11     0 4   6 3    5 8   10 7   9

For the two possible pairs weigh any one egg out of the 4. If the weight is ok, the other pair is swapped. If the weight is not ok, you have identified the swapped pair

Otherwise   Weigh 3 4 10 It should weigh 17 If it weighs 17, then eggs 7 &9 are swapped If it weighs  (-2) 15, then eggs 8 & 10 are swapped Otherwise, it weighs 19 (+2) and the possibilites are 3&5 or 4&6 are swapped   Weigh 3 If it weighs 5, then eggs 3 & 5 are swapped Otherwise eggs 4 & 6 are swapped

##### Share on other sites
• 0

Ah the editor did not let me change the formatting while editing.

In the previous post, I copy pasted from excel. While editing it showed things fine but the final result was all messed up as you can see in the previous post.

This should look better

I would recommend to use the digital scale.
In max 5 weighings, the swapped pair of eggs can be identified:

Weigh 1 to 6 number eggs It should weigh 15

If it weighs other than 15, refer to weighings A below - max 2 more weighings needed

If weight > by      Possible egg switches

1                           6 & 7

2                           6 & 8        5 & 7

3                           6 &9         5 & 8       4 & 7

4                           6 & 10      5 & 9       4 & 8       3 & 7

5                            6 & 11     5 & 10     4 & 9       3 & 8     2 & 7

6                            6 & 12     5 & 11     4 & 10     3 & 9     2 & 8

7                           5 & 12      4 & 11     3 & 10     2 & 9     1 & 8

8                           4 & 12      3 & 11     2 & 10     1 & 9

Taking worst case example where there are 5 possibilities

Weigh 6 10 4 8

If weight is +5, possibilities are 6 &11, 4 &9

If weight is -5, then possibilities are 5 &10, 3 &8

If there is no difference then eggs 2 &7 are swapped

Depending on the weight difference, whoose either 6&9 or 5&8 to weigh

Depending on the next weigh difference (+5 or -5), the swapped eggs are identified

Otherwise    Weigh 2 4 6 8 10 12

It should weigh 42

If it weighs other than 42, refer to weighings "B" below - max 3 more weighings needed

If weight difference   Possible egg switches

-5                               1   6           7   12

-3                               1   4           6    3       10    7       12   9

-1                               1   2           3    4        5     6         7    8          9    10         11    12

1                                2    3          4    5        8    9        10   11

3                                2   5           8   11

Next, Weigh alternate weights from the weight difference

Taking worst case example where there are 6 possibilties (-1 weigh difference) - weigh 1 4 5 8

Possbilities     Possible egg switches

+1                         1   2        5    6

-1                          3    4       7   8

0                           9    10     11    12

Now, If weight difference      Weigh

+1                      1 & 6

-1                       3 & 8

0                      9 & 12

A positive or negative weight difference in this weighing identifies the swapped pair

For example if in weighing 1&6, the weight is 6, then the swapped eggs are 5 &6

If the weight is 8, then swapped eggs are 1 & 2

Otherwise    Weigh 1 2 11 12

It should weigh 26

If it weighs other than 42, refer to weighings "C" below

Weight Difference   Possible egg switches

4                                  1   5              2   6

2                                  1   3              2   4

-2                               10   12            9   11

-4                                 8    12           7   11

0                                  4   6               3    5          8   10       7   9

For the two possible pairs weigh any one egg out of the 4. If the weight is ok, the other pair is swapped. If the weight is not ok, you have identified the swapped pair

Otherwise   Weigh 3 4 10 It should weigh 17 If it weighs 17, then eggs 7 &9 are swapped If it weighs  (-2) 15, then eggs 8 & 10 are swapped Otherwise, it weighs 19 (+2) and the possibilites are 3&5 or 4&6 are swapped   Weigh 3 If it weighs 5, then eggs 3 & 5 are swapped Otherwise eggs 4 & 6 are swapped

Edited by DeGe
##### Share on other sites
• 0
• Solution

Come to think of it...

There are 12c2 = 66 combinations possible.

In each weighing there are 3 outcomes possible -> equal, left heavy, right heavy

That mean, in 3 weighings, there are 34 combinations possible; therefore all the 66 combinations can be coded in 4 weighings.

Now, just need to work out what to weigh in each weighing to make the weighing results different for all 66 combinations :-)

##### Share on other sites
• 0

Come to think of it...

There are 12c2 = 66 combinations possible.

In each weighing there are 3 outcomes possible -> equal, left heavy, right heavy

That mean, in 3 weighings, there are 34 combinations possible; therefore all the 66 combinations can be coded in 4 weighings.

Now, just need to work out what to weigh in each weighing to make the weighing results different for all 66 combinations :-)

Interesting.. if both machine type give the same minimum tries , maybe one could still be better, that is, faster or fewer solution lines

I have not tried the other type yet.

##### Share on other sites
• 0

If combinations > 3n, then n is not sufficient.

If 3n > combinations, then n might be sufficient.

I think it's possible not to be able to categorize the combinations into trees of three outcomes.

##### Share on other sites
• 0
If the caretaker remembers 5 eggs which he might have swapped two of them,
(5c2) or 10 possible combinations,how he could find the pair with 2 trials?
Edited by TimeSpaceLightForce
##### Share on other sites
• 0

If the caretaker remembers 5 eggs which he might have swapped two of them,

(5c2) or 10 possible combinations,how he could find the pair with 2 trials?

First weigh eggs 2,3 and 4. The expected weight would be 9, so if the actual weight is not 9, then you know exactly which eggs were switched using the below table

```Weight Eggs
6   1<->4
7   1<->3
8   1<->2
10   4<->5
11   3<->5
12   2<->5
```

If the weight is 10, then you need a second weighing to determine from one of 4 possible remaining scenarios: 1<->5, 2<->3, 2<->4, 3<->4.

You can weigh eggs 1, 3 and 4 and use the following table to determine the switched eggs:

```Weight Eggs
6   2<->4
7   2<->3
8   3<->4
12   1<->5
```

I started working out a similar solution for 10, but didn't have enough time to finish it yet. I'm trying to do it in 3 weighings using a digital scale, but so far, looks like it will require 4. Maybe a combination of digital/balance could be optimal. Is it allowed?

##### Share on other sites
• 0

k-man's 2 move solve:

That should also work with any other 5 eggs

and it looks like the weighing  scale has advantage

for determining 4 possible pairs with one trial.

Maybe also possible with 1 try for 5 possible pairs as example:

5,6   5,7   2,4   3,4   4,5    ?

weighing 4 & 5:

if=7       2,4

if=8       3,4

if=9       4,5

if=10     5,6

if=11     5,7

##### Share on other sites
• 0

I could only wonder how many eggs are possible with 3 trials

Lets allow the combination of scales to reduce the 66 combination into 3 trials.

3 trials is usual for weighing puzzle..

Edited by TimeSpaceLightForce
##### Share on other sites
• 0

If the caretaker remembers 5 eggs which he might have swapped two of them,
(5c2) or 10 possible combinations,how he could find the pair with 2 trials?

The solutions above seem to be for the first 5 eggs. I understood that it was any 5 eggs out of the 12. Try this then!

##### Share on other sites
• 0

At random eggs - (12,6,10,1,5)

If 1st  try [ 5 6 10 ]     ;1 & 12 aside
wt     pair
17    1<->5
16    1<->6
12    1<->10
28    12<->5
27    12<->6
23    12<->10

else 2nd  try [ 12  5 ]    :1,6 & 10 aside
wt     pair
18     5<->6
22     5<->10
17     6<->10
6      1<->12

..like k-mans procedure

Other case of Combination > 3n is 8 eggs on 3 tries.
That is (8c2) > 33 or [ 28 > 27] where solution is possible
with one machine but not with the other..
This is how this puzzle should be presented.

The swapped pair among 12eggs can be sort out both in 4
trials but favors the weighing scale because only 16 of
all possible pairs requires 4 weighings.

##### Share on other sites
• 0

I'm not going to spoiler this as I'm not providing any specific solutions. I've been fiddling around with this problem for some time and still couldn't find a generic formula for digital scale that would determine a number of weighings necessary for a given number of eggs.

However, I can definitely solve the original problem with 12 eggs in 4 weighings using a digital scale.

If limited to 3 weighings, then only up to 9 eggs (36 pairwise combinations) can be solved.

10 eggs (45 pairwise combinations) requires 4 weighings, but if we can reduce the number of combinations by 1 (down to 44) then it can be solved in 3 weighings.

So, if anyone is interested in solving this variation then try this:

Among 10 eggs two are switched, but you know that it's definitely not 1 and 2 that are switched. Find the switched pair using only 3 weighings with a digital scale.

Edited by k-man
##### Share on other sites
• 0

that's the squeeze i was looking for..nice

##### Share on other sites
• 0

Among 10 eggs two are switched, but you know that it's definitely not 1 and 2 that are switched. Find the switched pair using only 3 weighings with a digital scale.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.