# Maximum product for multisets with same sum

Given a positive number N, among all multisets (containing only positive numbers) with sum N, is there a reliable method for determining the set with the maximum product? For example, for N = 5, the following are some possible sets, with their products (i.e. all their elements multiplied together).

{ 5 }              : product = 5^1 = 5
{ 1, 1, 1, 1, 1 }  : product = 1^5 = 1
{ 0.5, 1, 1.5, 2 } : product = 1.5
{ 2.5, 2.5 }       : product = 6.25


I'm looking for a reliable method, for any given N, to find the multiset which produces the maximum product.

Hint: for positive numbers, the product is maximised for the same sum when the terms are all equal. This follows from the AM GM inequality.

Based on comments below, it seems you want to also maximise $f(n)=\left(\dfrac{N}n\right)^n$ among $n \in \mathbb N$. For this, you may note that the corresponding continuous function is monotone or unimodal and has a maximum at $x = N/e$. Hence, look for the maximum among $\lfloor N/e\rfloor$ and $\lceil N/e \rceil$.

• I kind of figured that would be the case (although I wasn't certain). None the less, I can't figure out, generally, how to get exactly what that term should be. – Benjamin Lindley Sep 27 '14 at 11:39
• $N/n$ where $n$ is the number of elements. – Macavity Sep 27 '14 at 11:41
• But n is unknown (to me). So, assuming you are correct, my question becomes simply, "How do I determine n?". – Benjamin Lindley Sep 27 '14 at 11:42