Source: Mathematical Puzzles of Sam Loyd, 1960, #5, #23.
Part 1 ; in pints: 64 48 36 27. Seems like Sam Loyd probably worked in a bank; the puzzle is a "re-wording" of what happens to a savings account being credited regularly with interest; the value of such easily determined at any period n with the most basic of the financial formulae: F = P(1 + i)^N, where: F = Future value od account P = Present Value (or the initial deposit) N = Number of periods (coincides with the interest credits) i = the periodic interest rate To stay in the milk business, I'll change the formula to: B = E(1 + m)^D [B = milk at Beginning, E = milk at End, m = the milk "rate" delivered, D = the number of Deliveries). Now since we're looking for the milk delivered, then m = (B / E)^(1 / N) - 1; since our milkman starts with 256 pints, ends with 81 pints: m = (81 / 256)^(1 / 4) - 1 = -25% (a poor savings account!); Looking at it in "bank statement format": Milk Milk left Begin 256 D #1 -64 192 D #2 -48 144 D #3 -36 108 D #4 (End) -27 81 Of course, we can go in reverse (switch B and E) to get a milk rate of 33 1/3%, which really means a Beginning milk deposit of 81 pints earning milk at a rate of 33 1/3%: Milk Milk left Begin 81 #1 27 108 #2 36 144 #3 48 192 #4 64 256 Really, all "kinds of scenarios" can be worked out; example: if we try D = 6 in above formula, we get an Ending amount of 15.1875 pints; so to "integerize(?)" the scenario, you simply start with 2,560,000 pints, your 6 deliveries being: 640000 480000 360000 270000 202500 151875.
Part 2: 2 moves. Since the 4quart pail is symmetrical, 4quart (puzzle doesn't say it isn't), then . .A Honest John can do it in 2 moves: . . (if he's not shaking from a hangover!) . . 1- fill the 4quart pail B....... 2- pour milk into the 5quart pail by tilting the 4quart pail, until a new milk level AB is created. But I'm sure I won't get a passing mark for that, so here's how I did it in 9 moves; for those interested who may want to buy 1 or 3 quarts, here you go too: move ten ten five four ten ten five four ten ten five four 1 10 5 5 0 10 5 5 0 10 5 5 0 2 10 5 1 4 10 5 1 4 10 5 1 4 3 10 9 1 0 10 9 1 0 10 9 1 0 4 6 9 1 4 10 9 0 1 6 9 1 4 5 7 9 0 4 10 4 5 1 7 9 0 4 6 7 9 4 0 10 4 2 4 7 9 4 0 7 7 8 5 0 10 8 2 0 3 9 4 4 8 7 8 1 4 6 8 2 4 3 9 5 3 9 10 8 1 1 6 10 2 2 8 9 0 3 10 8 4 5 3 11 10 4 3 3 unless someone can beat 11 for 3 quarts, sorry you 3quarters but you'll have to wait a little longer.[KD: A note on the above: Denis mixes the values for quarts and gallons. In essence, he's replaced the 10-gallon (40-quart) with 10-quart containers, but the underlying math still works, since it's just subtracting from their total volume.]