Subscribe via feed.

Weigh hay

Posted by Chris on June 24, 2013 – 6:52 am

A farmer asked a worker to weigh 5 trusses of hay. The fool weighed them two at a time in all possible ways, and found that the weights were:
110, 112, 113, 114, 115, 116, 117, 118, 120, and 121 units.

What are the weights of the individual trusses?

This post is under “Logic, Mathemagic” and has 9 respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

9 Responds so far- Add one»

  1. 1. jan jansen Said:


  2. 2. Chris Said:

    Hi jan. That was quick. Because a similar problem nearly broke the best of us a few years back – how did you do it?

  3. 3. DP Said:

    I have the solution, but am trying to think of a way to back it up (more mathematically)…
    I’m sure Chris is going to use modulo math (or ‘maths’ if you prefer). This problem is simple enough to just solve with trial and error, but I’m sure that’s not the point.

    Because there are 5 values and 10 (unique) totals we know that each of the 5 values are also unique. (There are no 2 weights that are the same).
    There are 4 combinations with an odd total, so that tells me there is either 1 weight that has an odd value (and 4 evens) or 4 odds and 1 even.
    The lightest 2 add to 110, and are unique (so can’t be 55 and 55), so are (52,58) (53,57) or (54,56). The heaviest 2 have one odd and one even, and add to 121, so they must be (58,63) (59,62) or (60,61). Notice here that I took one of the ‘heaviest’ down to 58 and one of the ‘lightest’ up to 58. Since each of the 5 weights are unique, I stopped where they overlapped.
    58 cannot be in both sets, as there needs to also be a ‘middle’ value, so the set can now be [(53,57) or (54,56)] [57 or 58 or 59] [(59,62) or (60,61)].

    If (53,57) is chosen as the lightest values, the ‘middle’ weight would need to have an odd value (that is not also 57), so 59. If 59 is the ‘middle’ value, then the heaviest set would be (60,61). So the weights would have to be (53,57,59,60,61). This gets us close, but rather than adding to 115 (per the problem statement) we get 119. All other total values are met.

    So the lightest 2 must be (54,56), meaning the ‘middle’ weight is an even value, so 58. The remaining possibilities are (54,56,58,59,62) or (54,56,58,60,61).

    and the winner is..


  4. 4. Chris Said:

    Hi DP. Surprise – no modular arithmetic this time (although I think I might have tried that approach a few years back).

    If I’d been really with it, I would have made the results all be half pound values, so then modular arithmetic and odd/even etc., would be doomed to failure.

    Sorry, but you are making the same hash of it as myself and several others (who shall remain nameless – they know who I mean, don’t you gentlemen) had done. So you’re in good company (if I say so myself).

    You did good in making the important observation that no two of the bundles could have the same weight.

    After several days (oh the shame) a sure-fire dead-cert logical way of going it was found. i.e. I could have given you any 10 real numbers (including pi and e). I’m dying to know if jan found the trick.

  5. 5. Chuck H Said:

    I had a different method of solving this problem.

    First, I calculated the total by adding all the weights and dividing by four yielding 289. I subtracting the smallest pair sum (110) and the largest pair sum (121) to yield 58 as the middle weight. [Note that since the middle number was an integer, then all of the other four were as well since all pair sums were integers. However, that is not significant to this solution.]

    The next smallest pair sum would be min + middle, so 112-58=54 is the min. The next largest pair sum would be max + middle, so 120-58=62 is the max. Going back to the smallest pair sum, 110-54=56 as the 2nd smallest weight. Going back to the largest pair sum, 121-62=59 as the 2nd largest weight. Thus, 54, 56, 58, 59, 62.

  6. 6. Chris Said:

    Thanks Chuck. As Mr. Punch would say, “that’s the way to do it.”

  7. 7. DP Said:

    That’s pretty slick. When I did the brute-force method (first) I actually calculated 58 as the middle value, but thought I needed to find a mathematical (or purely logical) way of finding the solution, as Chris would never simply accept a correct answer. We all know he is far more interested in the method than the final value.

  8. 8. DP Said:

    I was thinking over Chuck’s solution, and had to overcome a couple of challenges. First, where did the “divide by 4″ come from? Second, can you prove that the second-smallest sum is the smallest weight plus the 3rd smallest (aka ‘middle’) weight?
    I’ll get to the first challenge second. (Why didn’t I label them the other way then?)
    Yes, it is logical that the second-smallest sum is the smallest weight plus the 3rd smallest weight (or middle weight for this problem). The same logic is applied to the second-largest sum being the largest weight plus the 3rd largest weight (also the middle weight for this problem). Chuck was ok to use this for only those 2 values.
    However, out of the 10 sums given, only 4 are produced from a known combination. I will use A, B, C, D, and E for the individual weights from here forward, and list the sums in the order A+B, A+C, A+D, A+E, B+C, B+D, B+E, C+D, C+E, D+E. The ‘middle 6’ sums could be the result of different combinations. If I gave you weights of 1, 2, 3, 4, and 5 units, then the sums would look like: 3, 4, 5, 6, 5, 6, 7, 7, 8, 9. The values are not necessarily in numerical order (as Chris did for us in the problem statement).
    Now for my first question: where did the “divide by 4” come from? Others might see this much quicker than I did, but I figured I’d lay out my thinking, since Chuck didn’t do it for me. Even though we don’t know which order the sums are listed, if we add them all together, we end up counting each individual weight 4 times, since each weight is paired with 4 other weights. [A+B] + [A+C] + [A+D] + [A+E] + [B+C] + [B+D] + [B+E] + [C+D] + [C+E] + [D+E] = 4A + 4B + 4C + 4D + 4E. Divide the ‘sum of the sums’ 4 to get A + B + C + D + E, which is the sum of the individual weights. As Chuck said, remove the known pairs (lightest pair – A+B, and heaviest pair – D+E), and you are left with the middle weight, C. Since we also know the 2nd lightest sum is A+C, subtract the now-known C value, and you get A. Go back to the lightest sum and subtract the now-known A to get B. Do the same with the 2 heaviest to get D, and the heaviest to get E.
    Thanks for the tip, Chuck.

  9. 9. Chris Said:

    Hi DP. I should have posted my prepared answer (in fact I just edited it for clarity).

    No two trusses have the same weight (otherwise we’d get duplicate weighings in the list). So we can let the weights of the trusses be a > b > c > d > e.

    Each truss must have been weighed 4 times. e.g. a+b ,a+c, a+d, a+e.
    So if add the 10 weighings, we’ll have each truss included 4 times in the sum =>
    sum = 1156 = 4(a+b+c+d+e) => a+b+c+d+e = 289.

    a+b is the heaviest pair and d+e the lightest. Now a > b => a+c > b+c, and
    b > c => a+b > a+c. So a+b > a+c > b+c => a+c is the second heaviest. Similarly for the lightest weighings. So a+b = 121, a+c = 120, d+e = 110 and c+e = 112.

    Now (a+b+c+d+e) – (a+b) – (d+e) = c = 289 – 121 – 110 = 58
    => a = 120 – 58 = 62 and e = 112 – 58 = 54
    => b = 121 – 62 = 59 and d = 110 – 54 = 56

    So the trusses weigh 54, 56, 58, 59 and 62 units.

Post a reply

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0