Maximize $\prod\limits_{i=1}^n m_i$

118 Views Asked by At

Someone visits a market where one hundred different types of fruit are sold. All types cost $1$ euro per pound. The utility the buyer receives from buying $m_1$ pounds of the first type of fruit he buys, $m_2$ pounds of the second type, etc. (all integer numbers) is $\prod\limits_{i=1}^n m_i$. Here $n$ is the number of different types of fruit he buys. The buyer has $100$ euros. Which fruits shouldhe buy with which quantities to maximise his utility?


I thought about maximizing $\sum\limits_{i=1}^n \ln m_i$ instead but I don't really know how to include the ordering of the utilities that the $m_i$'s result in. Could anyone please help?

2

There are 2 best solutions below

7
On BEST ANSWER

You'd be right on track (except for a typo: $\sum \ln$ instead of $\ln \sum$) if we were looking for solutions in real numbers. By the integer constraint, an elementary approach seems fuitful (pun not intended).

First of all, if $n>100$ at least one $m_i$ is zero, hence the utility is zero, no matter what the buyer does. So we shall assume henceforth that $n\le 100$ and consider only solutions with $m_i\ge 1$ for all $i$. Since there are only finitely many possible buying strategies, the existence of a maximum is clear and we may simply look for a solution for which we cannot find an improvement.

Assume we have a solution where $\sum m_i<100$ (i.e. we do not spend all the money - in theory someting like this might indeed be optimal). Then picking any $i$ and replacing $m_i$ with $m_i+1$ still obeys the sum constraint, but increases the (positive!) utility by a factor of $\frac{m_i+1}{m_i}>1$. Hence - as one might have guessed - all optimal solutions spend all the oney, $\sum m_i=100$.

Assume we have solution where $m_i>m_j+1$ for some $i,j$. Then by replacing $m_i$ with $m_i-1$ and $m_j$ with $m_j+1$ we obtain another valid solution (the total fruit count does not change) and the (positive!) utility gets multiplied with $$\frac{m_i-1}{m_i}\cdot \frac{m_j+1}{m_j}=\frac{1-\frac1{m_i}}{1-\frac1{m_j+1}}>\frac{1-\frac1{m_i}}{1-\frac1{m_i}}=1.$$ Hence this situation does not occur for the optimal solution(s). We conclude that ther is an $m$ such that $m_i\in\{m,m+1\}$ for all $i$. More precisely, if there are exactly $k$ indices $i$ where $m_i=m+1$ then the utility is $$ (m+1)^km^{n-k}=m^n\cdot\left(1+\frac{1}{m}\right)^k$$ which is (for fixed $m$) strictly increasing with $k$, i.e. we want to maximize $k$. Then again, we have the constraint that $$100=(n-k)m+k(m+1) = nm+k $$ and of course $0\le k\le n$. A solution with $k=n$ is equivalent to the solution with $k=0$ and $m$ replaced with $m+1$, hence we may assume $0\le k<n$. Bu tthat brings us to division with remainder, which is unique: We must set $m=\lfloor \frac {100}n\rfloor$ and $k=100\mod n$.

0
On

Note: This answer forgot to take into account that the $m_i$ all have to be integers, so it's not correct...

The fruits all have the same utility, so there's no need to consider the order in which they're purchased.

It's an easy exercise to show that the maximum product of $n$ positive numbers with a given sum is obtained when the numbers are all equal. Using that, the buyer can obtain utility 100 if he or she purchases only 1 kind of fruit, $50\cdot50$ if he or she purchases 2 kinds, and so on. There are only 100 possibilities, and you could find the largest by computing them all. Or you could maximize the product $\left(\frac{100}{k}\right)^k$ using calculus and compare the result of using integer values of $k$ nearest the maximum.