Subscribe via feed.

Barrel of beer

Posted by Chris on June 21, 2013 – 1:27 pm

A man bought 6 barrels of booze. 5 contained wine and one contained beer. The sizes of the barrels were 15, 16, 18, 19, 20 and 31 gallons (luvvly jubbly). He sold a number of barrels of wine to one customer, and later sold some more barrels of wine to another customer. The second customer bought twice as much as the first.

How much beer was in the beer barrel?

(Use brain, not brawn, for this one.)

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

8 Responds so far- Add one»

  1. 1. DP Said:

    20 gallons

    The first customer bought 33 gallons of wine (the 15 and 18 gallon barrels), the second 66 gallons of wine (the 16, 19, and 31 gallon barrels), leaving only the 20 gallon beer barrel.

  2. 2. JohnP24 Said:

    I agree with DP.

  3. 3. Chris Said:

    So, DP, how did you do it, and are you sure there is no other answer?

  4. 4. DP Said:

    Knowing there are 6 barrels, 1 of which is beer, that means 5 have to add up to 3 times the first person’s order (A+B=A+2A=3A). Therefore, using 5 of the possible barrels, we need a total volume that is divisible by 3. The only possible 5-barrel combination that is divisible by 3 is: 15,16,18,19,31.

    This is my way of showing tha tthe 20 gallon barrel is full of beer.

    I then go on…
    Seeing a minimum of 15 gal and maxium of 31, I knew the first person got 2 barrels and the second got 3. A quick proof of that is that the first person cannot have only 1 barrel, as: 31*2 < 15+16+18+19.
    The second person’s order must add to twice that of the first person’s, so we need a combination of 3 barrels that is divisible by 2. These are: 15,16,19 / 15,18,19 / 15,16,31 / 15,18,31 / 16,19,31 / and 18,19,31.
    The ONLY remaining combination where [3 barrels] = 2 * [the other 2 barrels] is my solution:
    [16+19+31] = 2*[15+18]

  5. 5. Chris Said:

    Hi DP. Not bad. There is an easier way though.

  6. 6. Chris Said:

    As DP said, the amount of wine sold must be divisible by 3 and more than 1 barrel must have been sold to each customer (a fact that I strictly should have included in the problem definition Later: in fact, I had done so). Now looking at the barrel sizes mod 3 => 15+16+18+19+20+31 = 0+1+0+1+2+1 = 2 (mod 3). This immediately tells us that the beer barrel is the one whose mod is 2, because it’s the only barrel that can be removed from the list that leaves a quantity divisible by 3.

    Although not required, if the barrels sold to the first customer added to r (mod 3), then those sold to the second customer must add to 2r (mod 3). So the first customer must have had barrels matching 0+1, and the second matching 0+1+1, or the first customer must have had 0 or 0+0 and the second 1+1+1 = 0 (mod 3) (in fact this is the right combination), or 0+1+1+1. Although this reduces the number of potential combinations, it doesn’t directly give us the extra information. We could note that whatever the second bought it must = 0 (mod 2). But this lot seems like more effort than direct trial and error. i.e. it isn’t slick, and that’s why it wasn’t asked for in the question.

    i.e. it is probably easiest to note that after removing the 20 gallons of beer, you are left with 99 gallons of wine, and therefore the first customer got 33 gallons and the second 66.

  7. 7. Werner Said:

    If the problem is taken as is and ‘a number of barrels’ may be interpreted as ‘1′ then 2 more solutions (with three variations each) are possible.
    Customer 1 buys 18, customer 2 buys 16 and 20. The beer is either 15, 19 or 31.
    Customer 1 buys 19, customer 2 buys 18 and 20. The beer is either 15, 16 or 31.

  8. 8. Chris Said:

    Hi Werner. Thanks for that – I hadn’t noticed those possibilities. In fairness, the number sold to the first customer was given as a plural, so at least two barrels was implied.

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