Find the largest value of: $$\sqrt{x_1-1}+\sqrt{x_2-1}+\cdots\ +\sqrt{x_{2017}-1}$$ if $$x_1,x_2,...,x_{2017}\geq1$$ and $$x_1+x_2+...+x_{2017}=4034$$
Find the largest value
-
2First off, I would define $y_i = x_i-1$, which rephrases the problem to finding the largest value of $\sqrt{y_1}+\cdots + \sqrt{y_{2017}}$ where all $y_i$ are positive, and $y_1+\cdots + y_{2017} = 2017$. – 2017-02-24
-
0It is true that that's the value you get when all the $y_i$ are equal to $1$, but why would you think that that's the maximal value? – 2017-02-24
-
0Please avoid PSQs (problem statement questions), they are badly received here. Much better to show your attempts. – 2017-03-11
3 Answers
From @Authur's comment, using $y_i = x_i - 1$, the problem can be transformed to
\begin{align} \max z = \sum\limits_{i = 1}^{2017} \sqrt{y_i} & \\ \sum\limits_{i = 1}^{2017} y_i &= 2017 \\ y_i &\ge 0 \quad \forall \, i \in \{1,\dots 2017\} \end{align}
Since it's tagged as linear-algebra, let's use the Cauchy-Schwartz inequality on $\Bbb R^{2017}$ equipped with the Euclidean norm with ${\bf y} = (\sqrt{y_1},\dots,\sqrt{y_{2017}})^T$ and ${\bf z} = (1,\dots,1)^T$.
\begin{align} |{\bf y} \cdot {\bf z}| &\le ||{\bf y}|| ||{\bf z}|| \\ \sum\limits_{i = 1}^{2017} \sqrt{y_i} &\le \left( \sum\limits_{i = 1}^{2017} (\sqrt{y_i})^2 \right)^{1/2} \sqrt{2017} \\ &= \left( \sum\limits_{i = 1}^{2017} y_i \right)^{1/2} \sqrt{2017} \\ &= 2017 \end{align}
By settting $y_i = 1 \, \forall \, i \in \{1,\dots 2017\}$, we have ${\bf y} = {\bf z}$, so equality holds, and we conclude that 2017 is the required maximum.
-
0I love me some good CS inequality applications. That being said, you call yourself a GNU supporter, and you choose as your avatar the Vim logo over, I dunno, Gedit? Or just the GNU gnu? – 2017-02-24
-
0@Arthur Thanks for your comment. I really support GNU, but that doesn't stop me to be a big fan of Vim text editor [TL;DR] and to profit from it's efficient text editing experience. (Learning some GNU Emacs is good though, especially for cursor movement in bash.) Thanks to FLOSS, we can run (most) Matlab code online on [Octave online](https://octave-online.net/). I copied a Markdown logo inside to "create" sth a bit different. – 2017-02-24
There is probably a shorter proof, but here is one. Recall Jensen's inequality: if $U(\cdot)$ is a concave function and $X$ is a random variable, then $EU(X) \le U (EX)$. Let $X$ be the r.v. that takes each of the $y_i$ values (use the simpler formulation suggested by Arthur in the comments) with equal probability $p_i=1/2017$. Then Jensen's inequality reads $$\frac{\sum \sqrt{y_i}}{2017} = EU(X) \le U(EX) = \sqrt{\frac{\sum y_i}{2017} } = 1$$ so $$\sum \sqrt{y_i} \le 2017$$ for any choice of the $y_i$'s. The proposed solution achieves the upper bound and thus it is a maximum.
-
0+1 Nice use of Jensen's inequality. I've learnt sth new :) – 2017-02-24
I did a little mental experimentation. Do we want to lump, taking one large square root and a lot of smaller ones, or to split, taking a lot of fairly small roots?
Noting $4034 = 2 * 2017$
Say $n = 4, 2n = 8$
So consider $\sqrt{5-1} + \sqrt{1-1} + \sqrt{1-1} + \sqrt{1-1}$ (lumping) versus $\sqrt{2-1} + \sqrt{2-1} + \sqrt{2-1} + \sqrt{2-1} $ (splitting).
Lumping gets a result of 2 while splitting gets a result of 4.
Even without the $-1$, $\sqrt{8} = 2 \sqrt{2} < 4\sqrt{1}$
In general $\sqrt{n+1} + \sqrt{1-1} + \ldots + \sqrt{1-1} + \sqrt{1-1}\sqrt{1-1} + \sqrt{1-1} + \sqrt{1-1} < n \sqrt{1}$
You could work inductively to show that the maximum is in fact at the furthest split.
So let $x_1 = x_2 = \ldots = x_n = 2$
And the maximum 1s $2017 \sqrt{2-1} = 2017$