Let be the set of positive integers. A partition of is a way of writing as a sum of positive integers, called parts. For example, is a partition of , with parts , , and . Partitions are unique up to rearrangement: and are the same partition, but and are different partitions.
This post discusses the following problem:
Let be a positive integer. Find a partition of whose parts have maximum product.
For example, the parts in have product , while the parts in have product . Our goal is to find a product-maximising partition for arbitrary .
Let be a partition of . If then (since ) and because the are strictly positive.1 Thus, replacing the partition with delivers a greater product. Since the can be rearranged arbitrarily, it follows that product-maximising partitions contain no parts equal to one. Similarly, if then so we can obtain a greater product by replacing with . It follows that product-maximising partitions contain no parts greater than four. But and , so we can replace each four with two twos without reducing the parts’ product. Thus, we can obtain a product-maximising partition using only twos and threes. Finally, if a partition contains three twos then we should replace them with two threes, since but .
To summarise, we can obtain a product-maximising partition using only twos and threes, with as many threes as possible. Letting for some and , the maximum product we can obtain is We can approximate this solution by relaxing the integrality constraint on the . For any given , we can find the vector that solves where is the set of positive real numbers. This vector has for each , so that .2 If there was no integrality constraint on then we could maximise by choosing , where is Euler’s constant. But must be an integer, so we should round it to the nearest integer in whatever direction delivers the greatest value of . Doing so delivers an estimate of , where and are the floor (“round down”) and ceiling (“round up”) functions.
The table below compares and for various . Since , the partition of using twos and as many threes as possible is a feasible, but not necessarily optimal, solution to . Thus for each . The multiplicative error grows exponentially with because the exponent of grows (increasingly linearly) with , amplifying the error in the approximation to each part in the partition underlying .
2 | 2 | 2 | 1.00 |
3 | 3 | 3 | 1.00 |
4 | 4 | 4 | 1.00 |
5 | 6 | 6.25 | 1.04 |
10 | 36 | 39.06 | 1.09 |
50 | 8.61×107 | 9.70×107 | 1.13 |
100 | 7.41×1015 | 9.47×1015 | 1.28 |
500 | 3.19×1079 | 7.66×1079 | 2.40 |
1,000 | 1.01×10159 | 5.86×10159 | 5.78 |
-
If then by convention. ↩︎
-
One can derive using the method of Lagrange multipliers. ↩︎