Find maximum of $\sum_{k=1}^{100}x_k^2$ when $x_1+x_2\le100$ , $x_3+x_4+\dots+x_{100}\le100$ and $x_1\ge x_2\ge x_3\ge \dots \ge x_{100}\ge0$

163 Views Asked by At

Question: \begin{align} &x_1\ge x_2\ge x_3\ge \dots \ge x_{100}\ge0\space(x_k\in\mathbb R, 1\le k\le100)\\ &x_1+x_2\le100\\ &x_3+x_4+\dots+x_{100}\le100\\ &\text{Find maximum of }S=\sum_{k=1}^{100}x_k^2 \end{align}

What I tried so far is:

Statement-1) $x_1+x_2=100$ when $S$ is maximized ($S=S_{max}$).

(proof)

Assume $x_1+x_2=M (M<100)$ when $S$ is maximized. Then if $x_1$ is replaced by $x_1 + (100-M)$ then $S>S_{max}$, so contradicts.

Statement-2) $x_3=x_4=\dots=x_{100}$ OR $x_3+x_4+...+x_{100}=100$ when $S=S_{max}$.

(proof)

Assume $i$ exists such that $x_i > x_{i+1} (3≤i<100)$ AND $x_3+x_4+...+x_{100}=M<100$ when $S=S_{max}$. Then if $x_{i+1}$ is replaced with $x_{i+1}+\min(x_i-x_{i+1}, 100-M)$ then $S>S_{max}$, so contradicts.

i) $x_3=x_4=...=x_{100}$

\begin{align} &x_1=100-a, x_2=a, x_3=x_4=...=x_{100}=b\space (98b≤100, b≤a, a≤50)\\ &S = (100-a)² + a² + 98b² = 2a²-200a+10000+98b² = 2(a-50)²+5000+98b²\\ \end{align}

If $a≤\frac{100}{98}$,

For a given $a$, $S$ is maximized when $b$ is at its maximum ($=a$). And then $$S_{max}=2(a-50)²+5000+98a² = 100\left(\left(a-\frac12\right)²-\frac14+100\right)=10000\space (a=100)$$

If $a≥\frac{100}{98}$,

$S$ is maximized when $a=b=\frac{100}{98}$, but $S<10000$ in this case.

ii) $x_3+x_4+...+x_{100}=100$

And I don't know how to tackle this case ii).

(*) I believe the maximum is $10000$ when either $x_1=100$ or $x_1=x_2=x_3=x_4=50$.

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

We make $x:=x_2$ the anchor variable. Then $0\leq x\leq 50$, and $x_1=100-x$; furthermore $x_k\leq x$ for all $k\geq3$. Assume that an allowable $x>0$ has been chosen.

Note that when $x>u\geq v>0$ then for small $\delta>0$ we have $$u+\delta\leq x,\quad v-\delta\geq0, \qquad (u+\delta)+(v-\delta)=u+v\ ,$$ and above all $$(u+\delta)^2+(v-\delta)^2=u^2+v^2+2\delta(u-v+\delta)>u^2+v^2\ .$$ This shows that we can replace $u$, $v$ by $u+\delta$, $v-\delta$ no harm done, and thereby increase $S$.

It follows that, given $x$, the optimal choice of the $x_k$ for $k\geq 3$ is given by $$x_k=x\quad (3\leq x\leq n+2),\qquad x_{n+3}=100-nx\ ,$$ whereby $n$ is given by $$n=\left\lfloor{100\over x}\right\rfloor\geq2\ .\tag{1}$$ In this way we obtain $$S(x)=(100-x)^2+(n+1)x^2+(100-nx)^2\ .$$ The function $S:\>x\mapsto S(x)$ is in fact continuous, since the discontinuities introduced by $(1)$ are buffered by $x_3$. A given value $n\geq2$ occurs when $n\leq{100\over x}<n+1$, or $${100\over n+1}<x\leq{100\over n}\ .\tag{2}$$ Since $x^2$ appears with a positive coefficient in $S(x)$ the function $S$ is convex in each of the intervals $(2)$, hence cannot have a maximum at an interior point of one of these intervals. It is therefore sufficient to consider the $x$-values ${100\over n}$ for $n\geq2$. In this way we are reduced to $$\hat S(n):=S\left({100\over n}\right)=10^4\left(\left(1-{1\over n}\right)^2+{n+1\over n^2}\right)=10^4\left(1-{1\over n}+{2\over n^2}\right)\qquad(n\geq2)\ .$$ It is easy to check that $\hat S(n)$ is maximal $(=10^4)$ at $n=2$; but we also have $\lim_{n\to\infty}\hat S(n)=10^4$. The latter limit corresponds to the choice $x=0$, which is not covered by the above formalism.

To sum it all up: You have correctly guessed the optimal configurations under the given conditions.