All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic > Weights and Scales
The Difference Scale (Posted on 2005-07-01) Difficulty: 2 of 5
You have a scale which compares two weights but instead of telling which is heavier or lighter, this scale returns the difference of the weights but will not tell which is heavier. In order for the scale to display an accurate result, the amount of weight on each side must be at least 20g and the difference can not exceed 20g. The scale will not report a result unless there is a weight on each side. If the difference exceeds 20g, the scale will report an error.

Use this scale no more than six times, sort an otherwise identical set of six coins with weights of 20, 21, 22, 23, 24, and 26 grams.

Examples:
Ex 1: If A=30 B=30 then the scale reports 0 (equal)
Ex 2: If A=31 B=29 then the scale reports 2
Ex 3: If A=29 B=31 then the scale reports 2 (undistinguishable from example 2)

See The Solution Submitted by Brian Smith    
Rating: 4.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 2 of 4 |

First, choose a coin arbitrarily and call it A.  For the first 5 trials, weigh A agains each of the other coins.  The following table shows the number of each result for each possible weight value for A:

  •  A:    1   2   3   4   5   6
  • 20g   1   1   1   1   0   1
  • 21g   2   1   1   0   1   0
  • 22g   2   2   0   1   0   0
  • 23g   2   1   2   0   0   0
  • 24g   1   2   1   1   0   0
  • 26g   0   1   1   1   1   1

In particular, note that they are all distinct, so after using the scale 5 times, we know the weight of A.  Further, each '1' in the above table determines the weight of another coin uniquely.  This means for A = 20 or 26, we're already done. 

For A = 21 or 24, there is only one ambiguity to resolve, and we know the weights of 4 out of six.  All that remains is to weigh one of the ambiguous coins against one that we already know besides A.  This result will resolve the ambiguity and solve the problem for these cases.

It remains to consider A = 22 or 23. 

If A = 23, we know the weight of A, and we know which coin weighs 21, but we have two ambiguities to resolve.   Consider weighing the two coins we know against one coin that gave us a 3 earlier, and one that gave us a 1 earlier.  Now on the left we know we have 44 (23+21), and the right is one of {20+22=42, 20+24=44, 22+26=48, 24+26=50}, so the possible results are {2, 0, 4, 6}.  Each of these results is unique, and so is each possible combined weight on the right, so this determines exactly which coins are on the right, and this solves the problem.

Finally, we have the case of A = 22.  In this case, we know which coin weighs 26.  Consider weighing this coin alone against two coins: one each that gave us 1 and 2 weighted against A.  The possible arrangements on the right are now {20+21=41, 20+23=43, 21+24=45, 23+24=47}, which means the possible results are {15, 17, 19, error}.  Again, there's no ambiguity to these results, so they determine exactly which coins are on the right, and this solves the problem.  QED


  Posted by josh on 2005-07-01 17:33:00
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (22)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information