How to maximize function $\sum_{i=1}^{\omega}\max(0, \log(x_i))$ under the constraint that $\sum_{i=1}^{\omega}x_i = S$

315 Views Asked by At

I am trying to maximize this function: $\sum_{i=1}^{\omega}\max(0, \log(x_i))$ given the constraint that $\sum_{i=1}^{\omega}x_i = S$.

If the function was just $\sum_{i=1}^{\omega}\log(x_i)$ I could just use Jensen's inequality and say that the maximum value is when each $x_i = \frac{S}{\omega}$ and so maximum value is $\sum_{i=1}^{\omega}\log(\frac{S}{\omega}) = \omega\log(\frac{S}{\omega})$.

Alternatively I could use Lagrange multipliers and derive the same outcome.

But in my case max function introduces non-continuity at i's where $x_i = 1$, so I suppose Lagrange multipliers is not applicable here...

I would like at least to find an upper bound of the sum I gave, as tight as possible under the constraint I gave, if it's not possible to derive the maximum value

1

There are 1 best solutions below

6
On

Is $x_i$ allowed to be negative?

The optimal value will not have any $x_i \leq 1$, so you can add in another constraint $x_i \geq 1$.

Your problem is now $max(\sum log(x_i) : x_i \geq 1, \sum x_i = S)$. The objective function is now continuous in $x_i$, and you can use something like KKT conditions or steepest descent (or ascent in this case) to find the optimal value.