Math puzzle

Here is the question:


Using positve intergers what is the greatest and least product of ABCD. Each number can be used more than once.

Assuming that 0 is not an option, I come up with 252525*25 for greatest.

I come up with 49491*1 as least.

Are those the best answers?

11197 is less than 494911

You have the greatest correct.

For any non-zero integer e, 25 * 25 * (25 - e) * (25 + e) will be less that 25 * 25 * 25 * 25. That’s not a proof, but it strongly suggests that 25[sup]4[/sup] is the maximum product.

97,1,1,1 and 25,25,25,25 are indeed the extreme answers.

To understand this, it might be easier to first consider the three-dimensional equivalent. You’ve got a box, with dimensions A by B by C, where A, B, and C add up to some number. I can decrease any side by 1, and increase some other side by 1, and the sum will remain the same. In face, I can get any set of sides I want, by doing this repeatedly. Let’s say that we start with a box where, without loss of generality, A is the longest side, and C is the shortest side. If I decrease side A by 1, I’ll then decrease the volume of the box by an amount (B*C). If I then increase C by 1 (bringing me back up to the same sum), I’ll increase the volume of the box by an amount (A-1)*B. As long as A-1 > C, this is a net increase in the volume of the box, and if (A-1) = C, then it’s no change at all. So if I keep on decreasing the longest side and increasing the shortest side until they differ by at most 1, then at every step, the volume will increase, until it can’t increase any more when all the sides are equal or as near as possible to equal. Likewise, if I keep making the shortest side shorter and the longest side longer, the volume will decrease, until they’re as different as possible.

With four numbers, it works the same way, except that the box is now four-dimensional.

If you’re interested, I can put together an optimization macro in Excel and send you the file. You’d be able to fiddle with the numbers to see what other combinations give.

It’s actually quite easy; set up four cells that can be changed, list the two constraints (sum and product) and then maximize (or minimize) the product.

Just let me know if you want it.

This is actually a fairly simple optimization problem with one constraint. Just use a Lagrangian multiplier and you’ll quickly conclude that an extremum occurs at A=B=C=D=25, which has to be a maximum. The minimum will occur at a boundary point which can be found by simple enumeration.

bookmarks link