5
$\begingroup$

The following is an algebraic problem I encountered in my research direction.

Let $x_1, \dots, x_n \ge 0 $ be non-negative real numbers satisfying $\sum\limits_{i=1}^n x_i = S,$ where $S \ge 0 $ is fixed. Consider the function $$ F(x_1, \dots, x_n) = \sum_{i=1}^n \left( x_i^3 - x_i^2 \right).$$ What is the minimum value of $F$ under the given constraints, and what is the structure of the minimizer?


It appears that when all the values are identical, the minimum should be selected; however, I have been unable to formally verify this using the method of Lagrange multipliers.

Any comments, corrections, or references would be much appreciated!

$\endgroup$
6
  • 3
    $\begingroup$ I doubt whether a general solution exists, because the minimum seems $S$-dependent. For example, when $n=2$, $F(1,1)=0<F(0,2)=4$ if $S=2$, but $F\left(\dfrac{1}{4},\dfrac{1}{4}\right)=-\dfrac{3}{32}>F\left(0,\dfrac{1}{2}\right)=-\dfrac{1}{8}$ if $S=\dfrac{1}{2}$. $\endgroup$ Commented Nov 13 at 15:10
  • $\begingroup$ @JCQ You said is right. The minimum value can be represented by S since S is fixed. This is an algebraic problem I encountered in my research, In fact, I have considered the two-dimensional case. What I hope to prove is that the minimum values are either all the same or only one is not zero. $\endgroup$ Commented Nov 13 at 15:20
  • $\begingroup$ Using Lagrange multipliers, you find that the only candidate in the (relative) interior of the simplex $\sum x_i = S$ is the point with all coordinates $S/n$. Then go on to the boundary. By symmetry, you can assume $x_1 \geqslant x_2 \geqslant \ldots \geqslant x_n$, so the boundary case corresponds to the $n-1$ case. $\endgroup$ Commented Nov 13 at 15:25
  • $\begingroup$ @DermotCraddock I only obtained that the extreme point is one of the roots of a quadratic equation with one variable, but I couldn't prove their equality. $\endgroup$ Commented Nov 13 at 15:33
  • $\begingroup$ Hum, that's what I get for not taking out pen and paper. $3x_i^2 - 2x_i$ must be constant (i.e. independent of $i$), so if $S < \frac{2}{3}n$, there's a possibility that we have two groups, $k$ indices with $x_i = \frac{1}{3} + \alpha$ and $n-k$ with $x_i = \frac{1}{3} - \alpha$. $\endgroup$ Commented Nov 13 at 15:56

4 Answers 4

3
$\begingroup$

Some thoughts.

Let $X_0 = (x_1, x_2, \cdots, x_n)$ be a (global) minimizer with the largest number of zeros among all the (global) minimizers. We claim that the non-zero elements of $X_0$ are all equal. Assume, for the sake of contradiction, that $x_i > x_j > 0$ for some $i, j$. If $x_i + x_j \le \frac23$, we have \begin{align*} x_i^3 - x_i^2 + x_j^3 - x_j^2 &= (x_i + x_j)^3 - (x_i + x_j)^2 + x_ix_j (2 - 3x_i - 3x_j)\\ &\ge (x_i + x_j)^3 - (x_i + x_j)^2. \end{align*} Thus, if we replace $x_i, x_j$ with $x_i + x_j, 0$, we get another (global) minimizer. However, this contradicts the fact that $X_0$ has the largest number of zeros. If $x_i + x_j > \frac23$, letting $u := \frac{x_i+x_j}{2}$, we have \begin{align*} x_i^3 - x_i^2 + x_j^3 - x_j^2 &= 2(u^3 - u^2) + \frac14(3x_i + 3x_j - 2)(x_i - x_j)^2\\ &> 2(u^3 - u^2). \end{align*} Thus, if we replace $x_i, x_j$ with $\frac{x_i+x_j}{2}, \frac{x_i+x_j}{2}$, we get a strictly smaller objective value. This contradicts the optimality of $X_0$. The claim is proved.

Thus, we can assume that $x_1 = \cdots = x_k, \, x_{k+1} = \cdots = x_n = 0$ for some $1 \le k \le n$. We have $$\sum_{i=1}^n (x_i^3 - x_i^2) = \frac{S^3}{k^2} - \frac{S^2}{k}.$$ Thus, we have $$\min \sum_{i=1}^n (x_i^3 - x_i^2) = \min_{1 \le k \le n} \left(\frac{S^3}{k^2} - \frac{S^2}{k}\right).$$

We split into three cases.

(1) If $S \le \frac23$, we have $$\frac{S^3}{k^2} - \frac{S^2}{k} - (S^3 - S^2) = \frac{S^2(k^2-1)(1- \frac{1}{k+1} - S)}{k^2} \ge 0.$$ The minimum is $S^3 - S^2$.

(2) If $S \ge \frac{n(n-1)}{2n-1}$, we have $$\frac{S^3}{k^2} - \frac{S^2}{k} - \left(\frac{S^3}{n^2} - \frac{S^2}{n}\right) = \frac{S^2(n^2-k^2)(S - \frac{n}{1+n/k})}{k^2n^2} \ge 0.$$ The minimum is $\frac{S^3}{n^2} - \frac{S^2}{n}$.

(3) If $\frac23 < S < \frac{n(n-1)}{2n-1}$, we have $$\frac{S^3}{2^2} - \frac{S^2}{2} - (S^3 - S^2) = - \frac14 S^2(3S-2) < 0,$$ and $$\frac{S^3}{(n-1)^2} - \frac{S^2}{n-1} - \left(\frac{S^3}{n^2} - \frac{S^2}{n}\right) = - \frac{(2n-1)S^2(\frac{n(n-1)}{2n-1} - S)}{n^2(n-1)^2} < 0.$$ Thus, the minimum occurs at some $m \in \{2, 3, \cdots, n-1\}$. We have $$\frac{S^3}{k^2} - \frac{S^2}{k} - \left(\frac{S^3}{m^2} - \frac{S^2}{m}\right) = \frac{S^2(m^2-k^2)(S - \frac{m}{1+m/k})}{k^2m^2}.$$ Thus, the minimum occurs at $m$ if and only if $$\frac{m}{1+m/(m-1)} \le S \le \frac{m}{1+m/(m+1)},$$ or equivalently $$S - \frac12 + \frac12\sqrt{4S^2+1} \le m \le S + \frac12 + \frac12 \sqrt{4S^2+1}.$$ Thus, the minimum occurs at $m = \lceil S - \frac12 + \frac12\sqrt{4S^2+1} \rceil$ as @Christophe Boilley pointed out in comment.

$\endgroup$
4
  • $\begingroup$ Moreover, $\frac{S^3}{k^2}-\frac{S^2}k$ is quasiconvex wrt $k$, and the minimum is attained for $k=\min\left(n, \left\lceil\frac{2S-1+\sqrt{1+4S^2}}2\right\rceil\right)$. $\endgroup$ Commented Nov 18 at 10:40
  • $\begingroup$ @ChristopheBoilley Thanks. I will check it. $\endgroup$ Commented Nov 18 at 11:30
  • $\begingroup$ @ChristopheBoilley I got the same solution as yours. Did you use a similar approach? $\endgroup$ Commented Nov 18 at 14:32
  • 1
    $\begingroup$ Yes, but I didn't split into 3 cases. I just calculated the difference between ranks $k$ and $k+1$, then I got the last formula, and taken the min with $n$ in the case the optimum goes beyond. $\endgroup$ Commented Nov 18 at 14:51
2
$\begingroup$

For $n=1$, clearly $x_1=S$; for $n=2$, we can also show that $x_1=x_2=S/2$. So we'll take $n\ge 3$ from now on. The theory of Lagrange multipliers says that the minima of your function (for fixed $n$ and $S$) must be found among the saddle points of $$ G(\mathbf{x}, \lambda) = F(\mathbf{x}) + \lambda \left(\sum_i x_i - S\right), $$ where $F(\mathbf{x})=\sum_i (x_i^3 - x_i^2)$ is what you want to minimize. Since $$ \frac{\partial G}{\partial x_i} = \frac{\partial F}{\partial x_i} + \lambda = 3x_i^2 - 2x_i + \lambda = 0, $$ we have $$ x_i = \frac{2 \pm \sqrt{4 - 12\lambda}}{6} = \frac{1\pm\sqrt{1-3\lambda}}{3} $$ for each $i$ (and so $\lambda \le 1/3$). Moreover, we need $$ \frac{\partial G}{\partial \lambda} = \sum_i x_i - S = 0. $$ If $0 \le k \le n$ of the $x_i$ are equal to $(1+\sqrt{1-3\lambda})/3$, and the remaining $n-k$ are equal to $(1-\sqrt{1-3\lambda})/3$, then this latter constraint gives $$ k(1 + \sqrt{1-3\lambda}) + (n-k)(1-\sqrt{1-3\lambda})=n + (2k-n)\sqrt{1-3\lambda}=3S, $$ or $$ \lambda = \frac{1}{3}\left(1 - \left(\frac{3S-n}{2k-n}\right)^2\right). $$ After some algebra, then, each $x_i$ satisfies $$ x_i^3 - x_i^2 = x_i^2(1-x_i) = \frac{1}{27}\left(-2 \pm (2+3\lambda)\sqrt{1-3\lambda}\right), $$ depending on the chosen sign for that $i$; and if $k$ are positive and the rest are negative, we finally arrive at $$ \begin{eqnarray} F(\mathbf{x}) &=& -\frac{2n}{27} + \frac{2k-n}{27}(2 + 3\lambda)\sqrt{1-3\lambda} \\ &=& -\frac{2n}{27}+\frac{1}{27}\left(3 - \left(\frac{3S-n}{2k-n}\right)^2\right)(3S-n)\cdot\text{sgn}(2k-n). \end{eqnarray} $$ This needs to be minimized over $k \in \{0,1,\ldots,n\} \setminus \{n/2\}$. We'll always choose $k>n/2$ or $k<n/2$ depending on the sign of the resulting contribution to $F$, so in fact we can minimize $$ F(\mathbf{x}) = -\frac{2n}{27} - \frac{1}{27}\cdot\left|3 - \left(\frac{3S-n}{2k-n}\right)^2\right|\cdot\left|3S-n\right| $$ over $0 \le k < n/2$. So we want the maximum of the term $$ \left|3 - \left(\frac{3S-n}{2k-n}\right)^2\right|, $$ which can occur when $k=0$, or when $|2k-n|=1$ (or $k=(n\pm 1)/2$, if $n$ is odd), or when $|2k-n|=2$ (or $k=n/2 \pm 1$, if $n$ is even). Putting everything together, the structure of the minimizer is just going to depend on $\alpha \equiv |3S-n|$, and on $n$. We have $$ F_{\text{min}} = -\frac{2n}{27} - \frac{\alpha}{27} \max({ |3-\alpha^2 / n^2|, |3- \alpha^2 / P^2 |}), $$ where $P=1$ if $n$ is odd and $P=2$ if $n$ is even. If the first term is the maximum, then all $x_i$ are equal. If the second term is the maximum, then the $x_i$ assume two different values, with about half equal to each. When is $|3-\alpha^2/n^2| \ge |3 - \alpha^2/P^2|$? Certainly this holds whenever $\alpha \le P\sqrt{3}$. It also holds when $\alpha < P\sqrt{6}$ and $n \ge (P\alpha) / \sqrt{6P^2 - \alpha^2}$. These are the cases where all $x_i$ are equal. In all other cases... specifically, $\alpha \ge P\sqrt{6}$, or $\alpha > P\sqrt{3}$ and $n < (P\alpha)/\sqrt{6P^2-\alpha^2}$... the $x_i$ assume two distinct values.

$\endgroup$
4
  • 2
    $\begingroup$ Your first statement is false for $S<\frac23$. In this case the minima are at $(x_1,x_2)=(0,S)$ and $(x_1,x_2)=(S,0)$. $\endgroup$ Commented Nov 14 at 1:13
  • $\begingroup$ I have questions. Let $n = 5, S = 3/2$. The solution is $x_1 = x_2 = x_3 = 1/2, x_4 = x_5 = 0$. In your $\frac{\partial G}{\partial x_i} = \frac{\partial F}{\partial x_i} + \lambda = 3x_i^2 - 2x_i + \lambda = 0$, what if $i = 4, 5$? $\endgroup$ Commented Nov 19 at 4:08
  • $\begingroup$ Yes, my answer doesn’t handle the non-negativity constraint correctly… we need to handle cases where some of the $x_i$ are zero. Other answers do this more clearly. This one should be correct as long as $n$ is interpreted as the number of nonzero $x_i$ (which must be minimized over). $\endgroup$ Commented Nov 19 at 18:00
  • $\begingroup$ @mjqxxxx Yes, perhaps we can consider that all the non-zero $x_i$ satisfy the system. OR if we use the KKT conditions, we can get that all non-zero $x_i$ are equal. $\endgroup$ Commented Nov 19 at 22:55
2
$\begingroup$

Note that we can express the sum $F(x_1,\cdots,x_n)=\sum (x_i^3 - x_i^2)$ in terms of elementary symmetric polynomials. Specifically,

$$ F=e_1^3-e_1^2+(2-3e_1)e_2+3e_3. $$

From the constraint we know that $e_1=S$. Therefore we just need to minimize

$$ (2-3S)e_2+3e_3. $$

If $S<2/3$, we want $e_2$ and $e_3$ as small as possible. Note that $e_2=e_3=0$ when all but one variable is $0$, that is,

$$ x_i=\begin{cases} S, & i=j,\\ 0, & i\neq j. \end{cases} $$

where $1\leq j\leq n$ can be any integer.

If $S=2/3$, we want $e_3=0$, which means at most two variables are non-zero. These two variables can take any non-negative values that satisfy $x_{j_1}+x_{j_2}=S$.

If $S>2/3$, we have a tradeoff between $e_2$ and $e_3$.

We observe that: $$ x^3 - x^2 + \frac{1}{4}x = x\left(x^2 - x + \frac{1}{4}\right) = x\left(x - \frac{1}{2}\right)^2 \ge 0, $$

thus, for all $x\ge 0$: $$ x^3 - x^2 \ge -\frac{1}{4}x, $$ where equality is reached when $x=0$ or $x=1/2$.

Summing over all $i$: $$ F = \sum (x_i^3 - x_i^2) \ge -\frac{1}{4} \sum x_i = -\frac{S}{4}. $$

When $S$ is a multiple of $1/2$ and $S\le n/2$ we can set $2S$ variables to $1/2$ and the others to $0$.

fderiv

(The red curve is $f(x) = x^3-x^2+x/4$ and the blue line is its derivative.)

Otherwise, if $S \ge n/2$, assigning $x_i = 1/2$ to all $n$ variables is insufficient, leaving leftover $r = S - n/2 > 0$. The sum $\sum f(x_i)$ is minimized when all variables are equal (“spreading out” $r$ across all variables). The minimal value is then

$$ F = n f(S/n) - \frac{S}{4} = S \left(\frac{1}{2} - \frac{S}{n}\right)^2 - \frac{S}{4}. $$

If $S <n/2$, we can assign $x_i = 1/2$ to as many variables as possible, say $k = \lfloor 2S \rfloor$, and set the rest to zero. The remaining sum $r = S - k/2 \le 1/2$ needs to be distributed across variables. We only need to compare two strategies (I obtained this from the graph; might need to rigorously prove it later):


EDIT: This part is wrong. See the other answers for counterexample.


  1. Distribute $r$ across all variables with value $1/2$ to make them $1/2+r/k$.
  2. Put all of $r$ into one variable with value $0$ to make it $r$.

The minimum values are:

$$ F_A = kf(1/2 + r/k) -\frac{S}{4}=r^2\left(\frac{1}{2k}+\frac{r}{k^2}\right) -\frac{S}{4} $$

and

$$ F_B=f(r) -\frac{S}{4}=\frac{r}{4}-r^2+r^3 -\frac{S}{4}. $$

$F_A \le F_B$ iff $r\le r_k$ where

$$ r_k=\frac{k\big(2k-\sqrt{4k+5}+1\big)}{4(k^2-1)}\qquad (k\ge2). $$

$\endgroup$
2
$\begingroup$

For any $a\ge0$, let $D=\{(x,y)\in[0,c]^2: x\le y,\ x+y=a\}$ and $g:D\ni(x,y)\mapsto x^3-x^2+y^3-y^2$. The value of $g$ is then identical to the value of the univariate quadratic function $x\mapsto(3a-2)(x^2-ax) + (a^3-a^2)$. Since the latter function is strictly concave when $a<\frac23$ and convex when $a\ge\frac23$, we see that

  1. $g(x,y)$ has a unique global minimum at $(x,y)=(0,a)$ if $a<\frac23$;
  2. $g(x,y)$ has a global minimum at $(x,y)=(\frac{a}{2},\frac{a}{2})$ if $a\ge\frac23$.

Now suppose $n\ge2$, $S>0$ and $\mathbf x$ is a global minimum of your $F$. Reindex the $x_i$s so that $x_1\le\cdots\le x_n$. There are two possibilities:

  • There exists a maximum index $i_0\ge2$ such that $x_{i-1}+x_i<\frac23$ for every $i\le i_0$. Since the $x_i$s are arranged in ascending order, the sum of any pair of distinct elements in $\{x_1,\ldots,x_{i_0}\}$ is $<\frac23$. Therefore, by (1), at most one element in this set is nonzero and this element must be $x_{i_0}$. Thus $x_1=\cdots=x_{i_0-1}=0$ and by the definition of $i_0$, the sum of any two distinct elements in $\{x_{i_0},\ldots,x_n\}$ is $\ge\frac23$.
  • The sum of any pair of distinct elements in $\{x_1,\ldots,x_n\}$ is $\ge\frac23$.

In either case, $\{x_1,\ldots,x_n\}$ can be partitioned into two multisets $X$ and $Y$, where $X$ is either empty or a multiset containing only zero values, and $Y$ is a non-empty multiset in which the sum of any pair of distinct elements is $\ge\frac23$. So, by (2), we can keep modifying the elements of $Y$ by taking pairwise average without changing the objective function value. In the limit, all elements in $Y$ will be identical to $\frac{S}{m}$ where $m=|Y|$. In other words, $F$ always achieves its global minimum at some point of the form $$ \mathbf x=\bigg(\,\underbrace{\frac{S}{m},\ldots,\frac{S}{m}}_{m\text{ terms}},0,\ldots,0\bigg), $$ with $F(\mathbf x)=\frac{S^3}{m^2}-\frac{S^2}{m}$. For an $\mathbf x$ of this form, since the differentiable function $t\mapsto\frac{S^3}{t^2}-\frac{S^2}{t}$ on $(0,\infty)$ is strictly decreasing on $(0,2S)$ and strictly increasing on $(2S,\infty)$, the minimum possible value of $F(\mathbf x)$ can only be achieved when $m$ is the nearest integer in $\{1,\ldots,n\}$ to $2S$ from the left or from the right. So, if we put $$ m_1=\min\{\max\{1,\lfloor 2S\rfloor\},n\} \quad\text{and}\quad m_2=\min\{\max\{1,\lceil 2S\rceil\},n\}, $$ then \begin{align*} \min F(\mathbf x) &= \min\left\{ F\left(\frac{S}{m_1},\ldots,\frac{S}{m_1},0,\ldots,0\right),\ F\left(\frac{S}{m_2},\ldots,\frac{S}{m_2},0,\ldots,0\right) \right\} \\ &=\min\left\{ \frac{S^3}{m_1^2}-\frac{S^2}{m_1},\ \ \frac{S^3}{m_2^2}-\frac{S^2}{m_2} \right\}. \end{align*}

E.g. when $n=3$ and $S=\frac89$, $\min F(\mathbf x)=\min\{F(\frac89,0,0),F(\frac49,\frac49,0)\}=-\frac{160}{729}$, which is approximately $-0.219479$ (to six dec. places).

$\endgroup$
2
  • $\begingroup$ Beware that you don't optimize over discrete $m$ by taking the nearest integer of the optimal $t$. You should calculate the sign of $u_{m+1}-u_m$ where $u_m=\frac{S^3}{m^2}-\frac{S^2}m$. $\endgroup$ Commented Nov 18 at 11:52
  • $\begingroup$ @ChristopheBoilley The values of $u_{m_1}$ and $u_{m_2}$ (not $u_m$ and $u_{m+1}$, as we need $1\le m\le n$) have already been compared in the last line of the displayed formula. $\endgroup$ Commented Nov 18 at 12:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.