Skip to main content
added 9 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(u,v):=\frac2{\frac1u+\frac1v}=\frac{2uv}{u+v} \end{equation*} for $u>0$ and $v>0$, and, by continuity, $H(u,v):=0$ for $u\ge0$ and $v\ge0$ with $u v=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s_{00}+s_{01}+s_{10}+s_{11}\le1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, with $\xi:=\sum_{i\in I\cup J}x_i$$\xi:=\frac1n\,\sum_{i\in I\cup J}x_i$, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+\xi, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+\xi r, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+\xi\frac{2r}{1+r}. \end{alignat*} So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+\xi\frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that the equality in (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{11}=0$ and hence, by (2), $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$, we get from (2): \begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{4(1-s_{01})(1-s_{10})}{(2-s_{01}-s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10} \le2(1-\tfrac mn)\tfrac mn=L^*_n, \end{equation*} where $m:=\lfloor n/2\rfloor$; the latter inequality follows because $(1-u)u$ is decreasing in $|u-1/2|$ for $u\in[0,1]$.

The inequality in (0) turns into the equality if $(x_i,y_i)=(1,0)$ for $i=1,\dots,m$ and $(x_i,y_i)=(0,1)$ for $i=m+1,\dots,n$.

The entire proof is now complete.

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(u,v):=\frac2{\frac1u+\frac1v}=\frac{2uv}{u+v} \end{equation*} for $u>0$ and $v>0$, and, by continuity, $H(u,v):=0$ for $u\ge0$ and $v\ge0$ with $u v=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s_{00}+s_{01}+s_{10}+s_{11}\le1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, with $\xi:=\sum_{i\in I\cup J}x_i$, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+\xi, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+\xi r, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+\xi\frac{2r}{1+r}. \end{alignat*} So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+\xi\frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that the equality in (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{11}=0$ and hence, by (2), $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$, we get from (2): \begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{4(1-s_{01})(1-s_{10})}{(2-s_{01}-s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10} \le2(1-\tfrac mn)\tfrac mn=L^*_n, \end{equation*} where $m:=\lfloor n/2\rfloor$; the latter inequality follows because $(1-u)u$ is decreasing in $|u-1/2|$ for $u\in[0,1]$.

The inequality in (0) turns into the equality if $(x_i,y_i)=(1,0)$ for $i=1,\dots,m$ and $(x_i,y_i)=(0,1)$ for $i=m+1,\dots,n$.

The entire proof is now complete.

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(u,v):=\frac2{\frac1u+\frac1v}=\frac{2uv}{u+v} \end{equation*} for $u>0$ and $v>0$, and, by continuity, $H(u,v):=0$ for $u\ge0$ and $v\ge0$ with $u v=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s_{00}+s_{01}+s_{10}+s_{11}\le1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, with $\xi:=\frac1n\,\sum_{i\in I\cup J}x_i$, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+\xi, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+\xi r, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+\xi\frac{2r}{1+r}. \end{alignat*} So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+\xi\frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that the equality in (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{11}=0$ and hence, by (2), $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$, we get from (2): \begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{4(1-s_{01})(1-s_{10})}{(2-s_{01}-s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10} \le2(1-\tfrac mn)\tfrac mn=L^*_n, \end{equation*} where $m:=\lfloor n/2\rfloor$; the latter inequality follows because $(1-u)u$ is decreasing in $|u-1/2|$ for $u\in[0,1]$.

The inequality in (0) turns into the equality if $(x_i,y_i)=(1,0)$ for $i=1,\dots,m$ and $(x_i,y_i)=(0,1)$ for $i=m+1,\dots,n$.

The entire proof is now complete.

deleted 314 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(s,t):=\frac2{\frac1s+\frac1t}=\frac{2st}{s+t} \end{equation*}\begin{equation*} h_i:=H(x_i,y_i),\quad H(u,v):=\frac2{\frac1u+\frac1v}=\frac{2uv}{u+v} \end{equation*} for $s>0$$u>0$ and $t>0$$v>0$, and, by continuity, $H(s,t):=0$$H(u,v):=0$ for $s\ge0$$u\ge0$ and $t\ge0$$v\ge0$ with $s t=0$$u v=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ s:=\tfrac1n|I\cup J|,\quad s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*}\begin{gather*} I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s+s_{00}+s_{01}+s_{10}+s_{11}=1$$s_{00}+s_{01}+s_{10}+s_{11}\le1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+s a, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+s r a, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+s a \frac{2r}{1+r}, \end{alignat*} where $a:=\frac1{|I\cup J|}\,\sum_{i\in I\cup J}x_i$ if $I\cup J\ne\emptyset$ and $a:=1/2$ if with $I\cup J=\emptyset$.$\xi:=\sum_{i\in I\cup J}x_i$, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+\xi, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+\xi r, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+\xi\frac{2r}{1+r}. \end{alignat*} So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+s a \frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*}\begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+\xi\frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that the equality in (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{10}+s_{11}=0$$s_{11}=0$ and hence, by $s_{10}=s_{11}=s_{10}=0$ and(2), $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$, we get from (2): \begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{(1-s_{01})(1-s_{10})}{(2-s_{01} s_{10})^2}\ge0. \end{equation*}\begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{4(1-s_{01})(1-s_{10})}{(2-s_{01}-s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10}=H(1-s_{10},s_{10}). \end{equation*}\begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10} \le2(1-\tfrac mn)\tfrac mn=L^*_n, \end{equation*} It remains to usewhere $m:=\lfloor n/2\rfloor$; the following very simple

Lemma: If $k$ and $l$ are nonnegative integers such that $k+l\le n$, then \begin{equation*} H(\tfrac kn,\tfrac ln)\le H(\tfrac mn,\tfrac{n-m}n)=L^*_n, \end{equation*} where \begin{equation*} m:=\lfloor n/2\rfloor. \tag{3} \end{equation*}

(Thislatter inequality follows because (i)$(1-u)u$ is decreasing in $H(\tfrac kn,\tfrac ln)\le H(\tfrac kn,\tfrac{n-k}n)$ and$|u-1/2|$ for $u\in[0,1]$.

The inequality in (ii0) turns into the equality if $H(s,1-s)$ is decreasing in$(x_i,y_i)=(1,0)$ for $|s-1/2|$$i=1,\dots,m$ and $(x_i,y_i)=(0,1)$ for $s\in[0,1]$$i=m+1,\dots,n$.)

The entire proof is now complete.

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(s,t):=\frac2{\frac1s+\frac1t}=\frac{2st}{s+t} \end{equation*} for $s>0$ and $t>0$, and, by continuity, $H(s,t):=0$ for $s\ge0$ and $t\ge0$ with $s t=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ s:=\tfrac1n|I\cup J|,\quad s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s+s_{00}+s_{01}+s_{10}+s_{11}=1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+s a, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+s r a, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+s a \frac{2r}{1+r}, \end{alignat*} where $a:=\frac1{|I\cup J|}\,\sum_{i\in I\cup J}x_i$ if $I\cup J\ne\emptyset$ and $a:=1/2$ if $I\cup J=\emptyset$. So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+s a \frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that equality (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{10}+s_{11}=0$ and hence $s_{10}=s_{11}=s_{10}=0$ and $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$, we get from (2): \begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{(1-s_{01})(1-s_{10})}{(2-s_{01} s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10}=H(1-s_{10},s_{10}). \end{equation*} It remains to use the following very simple

Lemma: If $k$ and $l$ are nonnegative integers such that $k+l\le n$, then \begin{equation*} H(\tfrac kn,\tfrac ln)\le H(\tfrac mn,\tfrac{n-m}n)=L^*_n, \end{equation*} where \begin{equation*} m:=\lfloor n/2\rfloor. \tag{3} \end{equation*}

(This follows because (i) $H(\tfrac kn,\tfrac ln)\le H(\tfrac kn,\tfrac{n-k}n)$ and (ii) $H(s,1-s)$ is decreasing in $|s-1/2|$ for $s\in[0,1]$.)

The entire proof is now complete.

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(u,v):=\frac2{\frac1u+\frac1v}=\frac{2uv}{u+v} \end{equation*} for $u>0$ and $v>0$, and, by continuity, $H(u,v):=0$ for $u\ge0$ and $v\ge0$ with $u v=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s_{00}+s_{01}+s_{10}+s_{11}\le1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, with $\xi:=\sum_{i\in I\cup J}x_i$, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+\xi, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+\xi r, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+\xi\frac{2r}{1+r}. \end{alignat*} So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+\xi\frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that the equality in (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{11}=0$ and hence, by (2), $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$, we get from (2): \begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{4(1-s_{01})(1-s_{10})}{(2-s_{01}-s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10} \le2(1-\tfrac mn)\tfrac mn=L^*_n, \end{equation*} where $m:=\lfloor n/2\rfloor$; the latter inequality follows because $(1-u)u$ is decreasing in $|u-1/2|$ for $u\in[0,1]$.

The inequality in (0) turns into the equality if $(x_i,y_i)=(1,0)$ for $i=1,\dots,m$ and $(x_i,y_i)=(0,1)$ for $i=m+1,\dots,n$.

The entire proof is now complete.

added 180 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(s,t):=\frac2{\frac1s+\frac1t}=\frac{2st}{s+t} \end{equation*} for $s>0$ and $t>0$, and, by continuity, $H(s,t):=0$ for $s\ge0$ and $t\ge0$ with $s t=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ s:=\tfrac1n|I\cup J|,\quad s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s+s_{00}+s_{01}+s_{10}+s_{11}=1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+s a, \\ &Ay=&&s_{01}&& &+&s_{11}&&+s r a, \\ &Ah=&& && &&s_{11}&&+s a \frac{2r}{1+r}, \end{alignat*}\begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+s a, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+s r a, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+s a \frac{2r}{1+r}, \end{alignat*} where $a:=\frac1{|I\cup J|}\,\sum_{i\in I\cup J}x_i$ if $I\cup J\ne\emptyset$ and $a:=1/2$ if $I\cup J=\emptyset$  . So So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+s a \frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that equality (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{10}+s_{11}=0$ and hence $s_{10}=s_{11}=s_{10}=0$ and $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$ and the expression $1-s_{00}-s_{01}-s_{10}-s_{11}$ for $s$, we get from (2): \begin{equation*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{equation*}\begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{(1-s_{01})(1-s_{10})}{(2-s_{01} s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10}=H(1-s_{10},s_{10}). \end{equation*} It remains to use the following very simple

Lemma: If $k$ and $l$ are nonnegative integers such that $k+l\le n$, then \begin{equation*} H(\tfrac kn,\tfrac ln)\le H(\tfrac mn,\tfrac{n-m}n)=L^*_n, \end{equation*} where \begin{equation*} m:=\lfloor n/2\rfloor. \tag{3} \end{equation*}

(This follows because (i) $H(\tfrac kn,\tfrac ln)\le H(\tfrac kn,\tfrac{n-k}n)$ and (ii) $H(s,1-s)$ is decreasing in $|s-1/2|$ for $s\in[0,1]$.)

The entire proof is now complete.

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(s,t):=\frac2{\frac1s+\frac1t}=\frac{2st}{s+t} \end{equation*} for $s>0$ and $t>0$, and, by continuity, $H(s,t):=0$ for $s\ge0$ and $t\ge0$ with $s t=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ s:=\tfrac1n|I\cup J|,\quad s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s+s_{00}+s_{01}+s_{10}+s_{11}=1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+s a, \\ &Ay=&&s_{01}&& &+&s_{11}&&+s r a, \\ &Ah=&& && &&s_{11}&&+s a \frac{2r}{1+r}, \end{alignat*} where $a:=\frac1{|I\cup J|}\,\sum_{i\in I\cup J}x_i$ if $I\cup J\ne\emptyset$ and $a:=1/2$ if $I\cup J=\emptyset$  . So, equality (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{10}+s_{11}=0$ and hence $s_{10}=s_{11}=s_{10}=0$ and $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$ and the expression $1-s_{00}-s_{01}-s_{10}-s_{11}$ for $s$, we get \begin{equation*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{equation*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{(1-s_{01})(1-s_{10})}{(2-s_{01} s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10}=H(1-s_{10},s_{10}). \end{equation*} It remains to use the following very simple

Lemma: If $k$ and $l$ are nonnegative integers such that $k+l\le n$, then \begin{equation*} H(\tfrac kn,\tfrac ln)\le H(\tfrac mn,\tfrac{n-m}n)=L^*_n, \end{equation*} where \begin{equation*} m:=\lfloor n/2\rfloor. \tag{3} \end{equation*}

(This follows because (i) $H(\tfrac kn,\tfrac ln)\le H(\tfrac kn,\tfrac{n-k}n)$ and (ii) $H(s,1-s)$ is decreasing in $|s-1/2|$ for $s\in[0,1]$.)

The entire proof is now complete.

$ \newcommand{\R}{\mathbb{R}} \newcommand{\la}{\lambda} \newcommand{\p}{\partial} \newcommand{\PP}{\mathcal{P}}$ Let $x:=(x_1,\dots,x_n)\in[0,1]^n$, $y:=(y_1,\dots,y_n)\in[0,1]^n$, $h:=(h_1,\dots,h_n)$, \begin{equation*} h_i:=H(x_i,y_i),\quad H(s,t):=\frac2{\frac1s+\frac1t}=\frac{2st}{s+t} \end{equation*} for $s>0$ and $t>0$, and, by continuity, $H(s,t):=0$ for $s\ge0$ and $t\ge0$ with $s t=0$. Let $Az:=\frac1n\sum_1^n z_i$ for $z:=(z_1,\dots,z_n)$. Then the result in question can written as \begin{equation*} L:=L(x,y):=H(Ax,Ay)-Ah\le L^*_n:= \left\{ \begin{alignedat}{2} &\frac12&&\text{ if $n$ is even}\\ & \frac12-\frac1{2n^2}&&\text{ if $n$ is odd}, \end{alignedat} \right. \tag{0} \end{equation*} with equality for some $x,y$ in $[0,1]^n$.

The maximum of $L(x,y)$ over all $(x,y)\in[0,1]^n\times[0,1]^n$ is attained. In what follows, let $(x,y)$ be such a maximizer.

With $[n]:=\{1,\dots,n\}$, $p$ and $q$ in $\{0,1\}$, and $|K|:=(\text{cardinality of $K$)}$, let
\begin{gather*} I_p:=\{i\in[n]\colon x_i=p\},\quad J_q:=\{i\in[n]\colon y_i=q\},\\ I:=\{i\in[n]\colon 0<x_i<1\},\quad J:=\{i\in[n]\colon 0<y_i<1\},\\ s:=\tfrac1n|I\cup J|,\quad s_{pq}:=\tfrac1n|I_p\cap J_q|, \end{gather*} so that $s+s_{00}+s_{01}+s_{10}+s_{11}=1$.

If $Ax=0$, then $x=0$ and hence $h=0$ and $L=0$, which makes the inequality in (0) trivial. So, without loss of generality (wlog), $Ax>0$. Similarly, wlog $Ay>0$. So, \begin{equation*} r:=Ay/Ax\in(0,\infty). \tag{1} \end{equation*}

Let $\p_u$ denote the partial derivative with respect to a variable $u$. Then
\begin{equation*} \p_u H(u,v)=2\Big(\frac v{u+v}\Big)^2 \end{equation*} for $u>0$ and $v>0$. So, for any $i\in I$ \begin{equation*} \frac n2\,\p_{x_i}L =\Big(\frac r{r+1}\Big)^2-\Big(\frac{y_i}{x_i+y_i}\Big)^2=0, \end{equation*} because $(x,y)$ is a maximizer of $L$. So, $y=rx>0$ on $I$. Similarly, $y=rx>0$ on $J$, and hence $y=rx>0$ on $I\cup J$. So, \begin{alignat*}{5} &Ax=&& &&s_{10}&+&s_{11}&&+s a, \tag{Ax}\\ &Ay=&&s_{01}&& &+&s_{11}&&+s r a, \tag{Ay}\\ &Ah=&& && &&s_{11}&&+s a \frac{2r}{1+r}, \end{alignat*} where $a:=\frac1{|I\cup J|}\,\sum_{i\in I\cup J}x_i$ if $I\cup J\ne\emptyset$ and $a:=1/2$ if $I\cup J=\emptyset$. So, \begin{align*} L&=\frac{2 Ax\,Ay}{Ax+Ay}-Ah \\ &=Ax\frac{2r}{1+r}-\Big(s_{11}+s a \frac{2r}{1+r}\Big) \\ &=(s_{10}+s_{11})\frac{2r}{1+r}-s_{11}. \tag{2} \end{align*} It also follows from (Ax) and (Ay) that equality (1) can be rewritten as \begin{equation*} s_{01}+s_{11}=r(s_{10}+s_{11}). \end{equation*} So, if $s_{10}+s_{11}=0$, then $s_{10}+s_{11}=0$ and hence $s_{10}=s_{11}=s_{10}=0$ and $L=0$. So, wlog $s_{10}+s_{11}>0$ and hence $r=\frac{s_{01}+s_{11}}{s_{10}+s_{11}}$. Using this expression for $r$, we get from (2): \begin{align*} L=M:=\frac{2 s_{01} s_{10} + (s_{01}+ s_{10})s_{11}}{s_{01} + s_{10} + 2 s_{11}}. \end{align*} Next, \begin{equation*} \p_{s_{11}}M:=\frac{(s_{01}-s_{10})^2}{(s_{01} + s_{10} + 2 s_{11})^2}\ge0. \end{equation*} So, wlog one may replace $s_{11}$ by its largest possible value, $1-s_{01}-s_{10}$: \begin{equation*} L=M\le N:=M|_{s_{11}=1-s_{01}-s_{10}}= \frac{(1-s_{01})s_{01}+(1-s_{10})s_{10}}{2-s_{01}- s_{10}}. \end{equation*} Further, \begin{equation*} (\p_{s_{01}}+\p_{s_{10}})N= \frac{(1-s_{01})(1-s_{10})}{(2-s_{01} s_{10})^2}\ge0. \end{equation*} So, if we increase $s_{01}$ and $s_{10}$ by the same amount, while keeping $s_{01}+s_{10}\le1$, the value of $N$ may only increase. So, \begin{equation*} L\le N|_{s_{10}=1-s_{01}}=2(1-s_{10})s_{10}=H(1-s_{10},s_{10}). \end{equation*} It remains to use the following very simple

Lemma: If $k$ and $l$ are nonnegative integers such that $k+l\le n$, then \begin{equation*} H(\tfrac kn,\tfrac ln)\le H(\tfrac mn,\tfrac{n-m}n)=L^*_n, \end{equation*} where \begin{equation*} m:=\lfloor n/2\rfloor. \tag{3} \end{equation*}

(This follows because (i) $H(\tfrac kn,\tfrac ln)\le H(\tfrac kn,\tfrac{n-k}n)$ and (ii) $H(s,1-s)$ is decreasing in $|s-1/2|$ for $s\in[0,1]$.)

The entire proof is now complete.

deleted 7 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
added 39 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
added 1 character in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
deleted 17 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
deleted 6232 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
edited body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
deleted 9 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
deleted 17 characters in body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
edited body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
edited body
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading
Source Link
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229
Loading