enter image description here

Three baskets and some balls are given to you. You are supposed to put these balls into these baskets by writing some positive numbers on the balls. But:

  • The numbers you are supposed to write on them have to be positive integer number,
  • In each basket, the numbered balls have to be distinct. (That also means you can put the same number in different baskets actually.)
  • The sum of the numbers on the balls in all baskets has to be at most $31$.
  • You do not have to put balls in every basket.

What is the maximum value of the multiplication of the numbers written on the balls?

  • $\begingroup$ The rule: "You may not put any ball in any basket" is confusing, can you clarify this? $\endgroup$
    – Green
    Commented Oct 11, 2017 at 19:43
  • 2
    $\begingroup$ To restate the problem: you are to maximize the product of a series of integers such that: (1) all integers are positive; (2) their sum is <= 31; (3) no integer may appear in the series more than 3 times. $\endgroup$
    – Prune
    Commented Oct 12, 2017 at 0:06

1 Answer 1


To make the product of the ball values as large as possible one needs to split up the 'budget' of $31$ into as many pieces as possible greater than $1$. Why $> 1$? Because balls with $1$ on them contribute to the sum but don't increase the product. Why as many as possible? Because $2 \cdot N \ge 2 + N$ (for $N \ge 2$), i.e. the total product will increase more by an additional factor of $2$ than by one of the factors being increased by $2$.
Edit: With regard to ffao's comment, I should add that there is exactly 1 case where the maximum number of factors is not the optimum, namely $2 \cdot 2 \cdot 2 < 3 \cdot 3$. In the final solution one will see that further 'finetuning' by replacing three $2$s by two $3$s is not possible, because there are already three $3$s (one for each basket) used.

So let's start with filling $2$s into each basket. The product is $8$ so far and the sum is $6$. Continuing with $3$s in each basket we have a product of $216$ and a sum of $15$. Next would be 3 $4$s, resulting in a product of $13824$ and a sum of $27$. But as the rest 'budget' to fill up to $31$ is just $4$, this can not be used to write another number on a ball. Instead one needs to use this to increase the existing numbers.

This increase should be spread among as many numbers as possible because $\left( N_1 + 1 \right) \left( N_2 + 1 \right) > N_1 \left( N_2 + 2 \right)$ for $N_1$, $N_2 \ge 2$. So let's first promote two $4$s to $5$s. Then we have a rest budget of $2$ from which we can promote a $2$ to $4$.

In total we then have in the baskets:
1. basket: $2, 3, 4, 5$
2. basket: $2, 3, 4, 5$
3. basket: $3$
Sum is exactly $31$ and product is $43200$.

  • 2
    $\begingroup$ "As many as possible" needs more justification. For example, 3*3 > 2*2*2. $\endgroup$
    – ffao
    Commented Oct 11, 2017 at 21:29
  • $\begingroup$ @ffao Thank you for pointing that out. I have added this to my answer. $\endgroup$
    – A. P.
    Commented Oct 11, 2017 at 21:54
  • $\begingroup$ The sum of the baskets shown is 36. Did you mean:$$(1): 3, 4, 5\\(2): 2, 3, 5\\(3): 2, 3, 4$$ That matches your description and has the indicated sum and product. $\endgroup$ Commented Oct 11, 2017 at 23:07
  • $\begingroup$ @PaulSinclair You're right. One $5$ was too much. $\endgroup$
    – A. P.
    Commented Oct 12, 2017 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.