I saw the following results in a book. The author said it was not difficult to prove how I felt it was difficult to prove, so I asked here. The result comes from a book that has no electronic version.Here's what I'm trying to prove.



> 
> let $x\_{1}\ge x\_{2}\ge\cdots\ge x\_{n}\ge 0,y\_{1}\ge y\_{2}\ge\cdots\ge y\_{n}\ge 0$,and such 
>  $$\sum\_{i=1}^{n}x\_{i}=\sum\_{i=1}^{n}y\_{i}=n$$
>  show that
>  $$ \prod\_{i=1}^{n}|x\_{i}-y\_{i}|<e^{\frac{n}{2}}$$
> 
> 
> 


I try let$$A=\{i|x\_{i}\ge y\_{i}\},B=\{i|x\_{i}<y\_{i}\}$$
so 
$$\prod\_{i=1}^{n}|x\_{i}-y\_{i}|=\prod\_{i\in A}(x\_{i}-y\_{i})\prod\_{i\in B}(y\_{i}-x\_{i})$$
and use AM-GM inequality we have
$$\prod\_{i\in A}(x\_{i}-y\_{i})\le\left(\dfrac{\sum\_{i\in A}(x\_{i}-y\_{i})}{|A|}\right)^{|A|}$$and 
$$\prod\_{i\in B}(y\_{i}-x\_{i})\le\left(\dfrac{\sum\_{i\in B}(y\_{i}-x\_{i})}{|B|}\right)^{|B|}$$
where $$|A|+|B|=n,\sum\_{i\in B}x\_{i}=n-\sum\_{i\in A}x\_{i},\sum\_{i\in B}y\_{i}=n-\sum\_{i\in A}y\_{i}$$
so let $$x=\sum\_{i\in A}x\_{i},y=\sum\_{i\in A}y\_{i},t=|A|$$
then we have
$$\prod\_{i=1}^{n}|x\_{i}-y\_{i}|\le \left(\dfrac{x-y}{t}\right)^t\left(\dfrac{(n-y)-(n-x)}{n-t}\right)^{n-t}=\dfrac{(x-y)^n}{t^t(n-t)^{n-t}}$$



show this nice and hard inequality with $ \prod_{i=1}^{n}|x_{i}-y_{i}|<e^{\frac{n}{2}}$
Let $x:=(x\_1,\dots,x\_n)$ and $y:=(y\_1,\dots,y\_n)$; we identify $x$ and $y$ with the corresponding functions on the set $[n]:=\{1,\dots,n\}$. Take any real $S,T\ge0$ and nonnegative integers $n\_-$ and $n\_+$ such that $n\_-+n\_+\le n$. Let $Z=Z(n,n\_-,n\_+,S,T)$ denote the set of all pairs $(x,y)\in[0,\infty)^n\times[0,\infty)^n$ such that $x\_1\le\dots\le x\_n$, $y\_1\le\dots\le y\_n$, $x\_1+\dots+x\_n\le S$, $y\_1+\dots+y\_n\le T$, the cardinality of the set $\{i\in[n]\colon y\_i\le x\_i\}$ is $\ge n\_-$, and the cardinality of the set $\{i\in[n]\colon y\_i\ge x\_i\}$ is $\ge n\_+$. 


Consider the problem of maximizing $\|x-y\|:=\sum\_1^n|x\_i-y\_i|$ over $(x,y)\in Z$. 


**Claim:** The maximum of $\|x-y\|$ over $(x,y)\in Z$ is attained when one of the functions $x,y$ is constant while the other one takes at most two values, one of which is $0$. 


*Proof.* By compactness and continuity, the maximum is attained. In the sequel, let $(x,y)$ be a point of attainment of this maximum. If $x\_i=y\_i$ for some $i\in[n]$, then we can remove this $i$, re-enumerate the coordinates of $x$ and $y$, and use induction on $n$. 
So, without loss of generality (wlog) $x\_i\ne y\_i$ for all $i$. 


Let us say that a subset $J$ of the set $[n]$ is connected if it is the intersection of $[n]$ with an interval. An $x$-run is a maximal connected nonempty set of constancy of the function $x\colon i\mapsto x\_i$. An $(y<x)$-run is a maximal connected nonempty subset $J$ of $[n]$ such that $y\_i<x\_i$ for all $i\in J$. Similarly defined are the $y$-runs and $(y>x)$-runs. Replacing the $x$- and $y$-values in each $(y<x)$-run and in each $(y>x)$-run by the corresponding arithmetic means, wlog we have that $x$ and $y$ are constant in each such run; that is, each such run is contained in an $x$-run and in a $y$-run; this condition will be assumed in the rest of this proof. 


Consider any two adjacent $(y<x)$- and $(y>x)$-runs. Wlog, we have here an $(y<x)$-run $K\_1$ followed (to the right of $K\_1$) by a $(y>x)$-run $K\_2$, of cardinalities $k\_1$ and $k\_2$, respectively (resp.). For each $j=1,2$, let $a\_j$ and $b\_j$ be the constant values of $x$ and $y$, resp., in the run $K\_j$, so that $b\_1<a\_1\le a\_2<b\_2$. 
To obtain a contradiction, suppose that, moreover, $a\_1<a\_2$. 
Let us change/vary $a\_1,a\_2,b\_1,b\_2$ by small amounts $da\_1,da\_2,db\_1,db\_2$, resp., such that $k\_1 da\_1+k\_2 da\_2=0$ and $k\_1 db\_1+k\_2 db\_2=0$, so that the sums $x\_1+\dots+x\_n$ and $y\_1+\dots+y\_n$ are unchanged. Then the change $d\|x-y\|$ of $\|x-y\|$ will be the same as the change of $k\_1(a\_1-b\_1)+k\_2(b\_2-a\_2)$, which is $k\_1(da\_1-db\_1)+k\_2(db\_2-da\_2)=2k\_2(db\_2-da\_2)$. If we now take any small enough (in absolute value) $da\_2,db\_2$ such that $da\_2<db\_2<0$ (and choose $da\_1$ and $db\_1$ so as to satisfy the conditions $k\_1 da\_1+k\_2 da\_2=0$ and $k\_1 db\_1+k\_2 db\_2=0$), then 
the resulting pair $(x+dx,y+dy)$ will satisfy the condition $b\_1+db\_1<a\_1+da\_1<a\_2+da\_2<b\_2+db\_2$ and will still be in the set $Z$ (in particular, we will have $db\_1>0$ and hence $b\_1+db\_1>0$). But then $d\|x-y\|=2k\_2(db\_2-da\_2)>0$, which is the desired contradiction. Thus, $b\_1<a\_1=a\_2<b\_2$, that is, wlog at least one of the functions $x,y$ is constant on any two adjacent $(y<x)$- and $(y>x)$-runs. 


Suppose now that there are at least three $(y<x)$- and/or $(y>x)$-runs. Then wlog there are three adjacent runs $K\_1,K\_2,K\_3$, of which $K\_1$ is the leftmost one and $K\_3$ is the rightmost one, and, moreover, $K\_1$ and $K\_3$ are $(y<x)$-runs, whereas $K\_2$ is a $(y>x)$-run. For each $j=1,2,3$, let $a\_j$ and $b\_j$ be the constant values of $x$ and $y$, resp., in the run $K\_j$ and let $k\_j$ be the cardinality of $K\_j$, so that, in view of the above consideration of any two adjacent $(y<x)$- and $(y>x)$-runs, we have here $B\_1:=b\_1<A\_1:=a\_1=a\_2<B\_2:=b\_2=b\_3<A\_2:=a\_3$. 
Let us change/vary $A\_1,A\_2,B\_1,B\_2$ by small amounts $dA\_1,dA\_2,dB\_1,dB\_2$, resp., such that $(k\_1+k\_2) dA\_1+k\_3 dA\_2=0$ and $k\_1 dB\_1+(k\_2+k\_3) dB\_2=0$, so that the sums $x\_1+\dots+x\_n$ and $y\_1+\dots+y\_n$ are unchanged. Then the change $d\|x-y\|$ of $\|x-y\|$ will be the same as the change of $k\_1(A\_1-B\_1)+k\_2(B\_2-A\_1)+k\_3(A\_2-B\_2)$, which is $k\_1(dA\_1-dB\_1)+k\_2(dB\_2-dA\_1)+k\_3(dA\_2-dB\_2)=2k\_2(dB\_2-dA\_1)$. If we now take any small enough (in absolute value) $dA\_1,dB\_2$ such that $dA\_1<dB\_2<0$ (and choose $dA\_2$ and $dB\_1$ so as to satisfy the conditions $(k\_1+k\_2) dA\_1+k\_2 dA\_2=0$ and $k\_1 dB\_1+(k\_2+k\_3) dB\_2=0$), then 
the resulting pair $(x+dx,y+dy)$ will satisfy the condition $B\_1+dB\_1<A\_1+dA\_1<B\_2+dB\_2<A\_2+dA\_2$ and will still be in the set $Z$ (in particular, we will have $dB\_1>0$ and hence $B\_1+dB\_1>0$). But then $d\|x-y\|=2k\_2(dB\_2-dA\_1)>0$, which is the desired contradiction. 


Thus, there are at most two $(y<x)$- and/or $(y>x)$-runs, and, by the above consideration of any two adjacent $(y<x)$- and $(y>x)$-runs, wlog the function $x$ is a constant (say $a\ge0$), whereas $y$ takes at most two values $b\_1,b\_2$ such that $0\le b\_1\le b\_2$. If $b\_1=b\_2=b$, then the maximum of $\|x-y\|$ over $(x,y)\in Z$ is $c:=S\vee T$, attained when one of the functions $x,y$ is the constant $c$ while the other one is $0$. 


So, wlog $0\le y\_1=\dots=y\_k=b\_1<b\_2=y\_{k+1}=\dots=y\_n$ for some $k=1,\dots,n-1$ and some $b\_1,b\_2$, and $x\_1=\dots=x\_n=a\ge0$ for some $a\in(b\_1,b\_2)$. 
If $b\_1>0$, then, replacing $y\_1$ and $y\_n$ respectively by $y\_1-h$ and $y\_n+h$ with any $h\in(0,b\_1]$ results in a greater value of $\|x-y\|$, which contradicts the maximality of $(x,y)$. So, $b\_1=0$, and the Claim is completely proved. 
$\Box$


In the OP conditions, we have $S=T=n$, so that, by the Claim, the maximum of $\|x-y\|$ is attained when $x\_1=\dots=x\_n=1$ and $0=y\_1=\dots=y\_t<y\_{t+1}=\dots=y\_n=\frac n{n-t}$, where $t\in[n-1]$ is as in the OP. So, 
\begin{equation}
 \|x-y\|\le t(1-0)+(n-t)(\frac n{n-t}-1)=2t. 
\end{equation}
So, the AM-GM reasoning in the OP yields 
\begin{equation}
 \prod\_1^n|y\_i-x\_i|\le \frac{(\|x-y\|/2)^n}{t^t(n-t)^{n-t}}\le \frac{t^n}{t^t(n-t)^{n-t}}
 =f(s)^n,
\end{equation}
where $s:=t/n$ and 
\begin{equation}
 f(s):=(\frac{s}{1-s})^{1-s}\le e^c 
\end{equation}
for $s\in(0,1)$, where $c=0.278\ldots<1/2$, as desired. 


