Among all collections, X, of positive integers whose sum is 28, what is the largest product that the integers in X can form Among all collections, X, of positive integers whose sum is 28, what is the largest product that the integers in X can form
My approach:-
I am not able to come up with some well organized approach , started with some random checks like if I use 14 times 2 , I end up with product $2^{14}$, if I break it in 14,14 the value becomes much lesser $14^2$ , but checking like this would be too much cumbersome, what would be a nice organized and efficient manner to tackle this problem
 A: To summarize the discussion in the comments:
For any $n$, not just $28$, consider an optimal partition.  Clearly, that partition can not contain any integer $k≥5$ since $k=(k-2)+2$ and $$(k-2)\times 2=2k-4>k$$.
Similarly, there is no reason to include a $4$ since we can replace $4$ by $2,2$ without changing the produce.
It follows that there is an optimal partition consisting only of $1's,2's,3's$.
Now, the optimal partition can not have two $1's$, clearly.
Similarly, it can not have three $2's$, since $2+2+2=3+3$ and $3^2>2^3$.
Thus we only need to consider partitions with no $2's$ or with one or two $2's$.
In the present example, that means that we only need to  consider the partitions:  $$\{3,3,3,3,3,3,3,3,3,1\}\quad \&\quad \{3,3,3,3,3,3,3,3,2,2\}$$ and the second one wins.
This procedure generalizes quite easily.
As @TonyK points out in the comments, for $n>1$, there is no reason to have a $1$ in the optimal partition.  $\{1,2\}$ should be replaced by $3$, and $\{1,3\}$ should be replaced by $\{2,2\}$.  Hence, for any $n$, there is only one partition to consider, and the form just depends on $n\pmod 3$.
