Rearrangement inequality

In mathematics, the rearrangement inequality[1] states that for every choice of real numbers

x 1 x n  and  y 1 y n {\displaystyle x_{1}\leq \cdots \leq x_{n}\quad {\text{ and }}\quad y_{1}\leq \cdots \leq y_{n}}
and every permutation σ {\displaystyle \sigma } of the numbers 1 , 2 , n {\displaystyle 1,2,\ldots n} we have

x 1 y n + + x n y 1 x 1 y σ ( 1 ) + + x n y σ ( n ) x 1 y 1 + + x n y n {\displaystyle x_{1}y_{n}+\cdots +x_{n}y_{1}\leq x_{1}y_{\sigma (1)}+\cdots +x_{n}y_{\sigma (n)}\leq x_{1}y_{1}+\cdots +x_{n}y_{n}} .

(1)

Informally, this means that in these types of sums, the largest sum is achieved by pairing large x {\displaystyle x} values with large y {\displaystyle y} values, and the smallest sum is achieved by pairing small values with large values. This can be formalised in the case that the x 1 , , x n {\displaystyle x_{1},\ldots ,x_{n}} are distinct, meaning that x 1 < < x n , {\displaystyle x_{1}<\cdots <x_{n},} then:

  1. The upper bound in (1) is attained only for permutations σ {\displaystyle \sigma } that keep the order of y 1 , , y n , {\displaystyle y_{1},\ldots ,y_{n},} that is,
    y σ ( 1 ) y σ ( n ) , {\displaystyle y_{\sigma (1)}\leq \cdots \leq y_{\sigma (n)},}
    or equivalently ( y 1 , , y n ) = ( y σ ( 1 ) , , y σ ( n ) ) . {\displaystyle (y_{1},\ldots ,y_{n})=(y_{\sigma (1)},\ldots ,y_{\sigma (n)}).} Such a σ {\displaystyle \sigma } can permute the indices of y {\displaystyle y} -values that are equal; in the case y 1 = = y n {\displaystyle y_{1}=\cdots =y_{n}} every permutation keeps the order of y 1 , , y n . {\displaystyle y_{1},\ldots ,y_{n}.} If y 1 < < y n , {\displaystyle y_{1}<\cdots <y_{n},} then the only such σ {\displaystyle \sigma } is the identiy.
  2. Correspondingly, the lower bound in (1) is attained only for permutations σ {\displaystyle \sigma } that reverse the order of y 1 , , y n , {\displaystyle y_{1},\ldots ,y_{n},} meaning that
    y σ ( 1 ) y σ ( n ) . {\displaystyle y_{\sigma (1)}\geq \cdots \geq y_{\sigma (n)}.}
    If y 1 < < y n , {\displaystyle y_{1}<\cdots <y_{n},} then σ ( i ) = n i + 1 {\displaystyle \sigma (i)=n-i+1} for all i = 1 , , n , {\displaystyle i=1,\ldots ,n,} is the only permutation to do this.

Note that the rearrangement inequality (1) makes no assumptions on the signs of the real numbers, unlike inequalities such as the arithmetic-geometric mean inequality.

Applications

Many important inequalities can be proved by the rearrangement inequality, such as the arithmetic mean – geometric mean inequality, the Cauchy–Schwarz inequality, and Chebyshev's sum inequality.

As a simple example, consider real numbers x 1 x n {\displaystyle x_{1}\leq \cdots \leq x_{n}} : By applying (1) with y i := x i {\displaystyle y_{i}:=x_{i}} for all i = 1 , , n , {\displaystyle i=1,\ldots ,n,} it follows that

x 1 x n + + x n x 1 x 1 x σ ( 1 ) + + x n x σ ( n ) x 1 2 + + x n 2 {\displaystyle x_{1}x_{n}+\cdots +x_{n}x_{1}\leq x_{1}x_{\sigma (1)}+\cdots +x_{n}x_{\sigma (n)}\leq x_{1}^{2}+\cdots +x_{n}^{2}}
for every permutation σ {\displaystyle \sigma } of 1 , , n . {\displaystyle 1,\ldots ,n.}

Intuition

The rearrangement inequality can be regarded as intuitive in the following way. Imagine there is a heap of $10 bills, a heap of $20 bills and one more heap of $100 bills. You are allowed to take 7 bills from a heap of your choice and then the heap disappears. In the second round you are allowed to take 5 bills from another heap and the heap disappears. In the last round you may take 3 bills from the last heap. In what order do you want to choose the heaps to maximize your profit? Obviously, the best you can do is to gain 7 100 + 5 20 + 3 10 {\displaystyle 7\cdot 100+5\cdot 20+3\cdot 10} dollars. This is exactly what the upper bound of the rearrangement inequality (1) says for the sequences 3 < 5 < 7 {\displaystyle 3<5<7} and 10 < 20 < 100. {\displaystyle 10<20<100.} In this sense, it can be considered as an example of a greedy algorithm.

Geometric interpretation

Assume that 0 < x 1 < < x n {\displaystyle 0<x_{1}<\cdots <x_{n}} and 0 < y 1 < < y n . {\displaystyle 0<y_{1}<\cdots <y_{n}.} Consider a rectangle of width x 1 + + x n {\displaystyle x_{1}+\cdots +x_{n}} and height y 1 + + y n , {\displaystyle y_{1}+\cdots +y_{n},} subdivided into n {\displaystyle n} columns of widths x 1 , , x n {\displaystyle x_{1},\ldots ,x_{n}} and the same number of rows of heights y 1 , , y n , {\displaystyle y_{1},\ldots ,y_{n},} so there are n 2 {\displaystyle \textstyle n^{2}} small rectangles. You are supposed to take n {\displaystyle n} of these, one from each column and one from each row. The rearrangement inequality (1) says that you optimize the total area of your selection by taking the rectangles on the diagonal or the antidiagonal.

Proofs

Proof by contradiction

The lower bound and the corresponding discussion of equality follow by applying the results for the upper bound to

y n y 1 . {\displaystyle -y_{n}\leq \cdots \leq -y_{1}.}
Therefore, it suffices to prove the upper bound in (1) and discuss when equality holds. Since there are only finitely many permutations of 1 , , n , {\displaystyle 1,\ldots ,n,} there exists at least one σ {\displaystyle \sigma } for which the middle term in (1)
x 1 y σ ( 1 ) + + x n y σ ( n ) {\displaystyle x_{1}y_{\sigma (1)}+\cdots +x_{n}y_{\sigma (n)}}
is maximal. In case there are several permutations with this property, let σ denote one with the highest number of integers i {\displaystyle i} from { 1 , , n } {\displaystyle \{1,\ldots ,n\}} satisfying y i = y σ ( i ) . {\displaystyle y_{i}=y_{\sigma (i)}.}

We will now prove by contradiction, that σ {\displaystyle \sigma } has to keep the order of y 1 , , y n {\displaystyle y_{1},\ldots ,y_{n}} (then we are done with the upper bound in (1), because the identity has that property). Assume that there exists a j { 1 , , n 1 } {\displaystyle j\in \{1,\ldots ,n-1\}} such that y i = y σ ( i ) {\displaystyle y_{i}=y_{\sigma (i)}} for all i { 1 , , j 1 } {\displaystyle i\in \{1,\ldots ,j-1\}} and y j y σ ( j ) . {\displaystyle y_{j}\neq y_{\sigma (j)}.} Hence y j < y σ ( j ) {\displaystyle y_{j}<y_{\sigma (j)}} and there has to exist a k { j + 1 , , n } {\displaystyle k\in \{j+1,\ldots ,n\}} with y j = y σ ( k ) {\displaystyle y_{j}=y_{\sigma (k)}} to fill the gap. Therefore,

x j x k and y σ ( k ) < y σ ( j ) , {\displaystyle x_{j}\leq x_{k}\qquad {\text{and}}\qquad y_{\sigma (k)}<y_{\sigma (j)},}

(2)

which implies that

0 ( x k x j ) ( y σ ( j ) y σ ( k ) ) . {\displaystyle 0\leq (x_{k}-x_{j})(y_{\sigma (j)}-y_{\sigma (k)}).}

(3)

Expanding this product and rearranging gives

x j y σ ( j ) + x k y σ ( k ) x j y σ ( k ) + x k y σ ( j ) , {\displaystyle x_{j}y_{\sigma (j)}+x_{k}y_{\sigma (k)}\leq x_{j}y_{\sigma (k)}+x_{k}y_{\sigma (j)}\,,}

(4)

which is equivalent to (3). Hence the permutation

τ ( i ) := { σ ( i ) for  i { 1 , , n } { j , k } , σ ( k ) for  i = j , σ ( j ) for  i = k , {\displaystyle \tau (i):={\begin{cases}\sigma (i)&{\text{for }}i\in \{1,\ldots ,n\}\setminus \{j,k\},\\\sigma (k)&{\text{for }}i=j,\\\sigma (j)&{\text{for }}i=k,\end{cases}}}
which arises from σ {\displaystyle \sigma } by exchanging the values σ ( j ) {\displaystyle \sigma (j)} and σ ( k ) , {\displaystyle \sigma (k),} has at least one additional point which keeps the order compared to σ , {\displaystyle \sigma ,} namely at j {\displaystyle j} satisfying y j = y τ ( j ) , {\displaystyle y_{j}=y_{\tau (j)},} and also attains the maximum in (1) due to (4). This contradicts the choice of σ . {\displaystyle \sigma .}

If x 1 < < x n , {\displaystyle x_{1}<\cdots <x_{n},} then we have strict inequalities in (2), (3), and (4), hence the maximum can only be attained by permutations keeping the order of y 1 y n , {\displaystyle y_{1}\leq \cdots \leq y_{n},} and every other permutation σ {\displaystyle \sigma } cannot be optimal.

Proof by induction

As above, if suffices to treat the upper bound in (1). For a proof by mathematical induction, we start with n = 2. {\displaystyle n=2.} Observe that

x 1 x 2  and  y 1 y 2 {\displaystyle x_{1}\leq x_{2}\quad {\text{ and }}\quad y_{1}\leq y_{2}}
implies that

0 ( x 2 x 1 ) ( y 2 y 1 ) , {\displaystyle 0\leq (x_{2}-x_{1})(y_{2}-y_{1}),}

(5)

which is equivalent to

x 1 y 2 + x 2 y 1 x 1 y 1 + x 2 y 2 , {\displaystyle x_{1}y_{2}+x_{2}y_{1}\leq x_{1}y_{1}+x_{2}y_{2},}

(6)

hence the upper bound in (1) is true for n = 2. {\displaystyle n=2.} If x 1 < x 2 , {\displaystyle x_{1}<x_{2},} then we get strict inequality in (5) and (6) if and only if y 1 < y 2 . {\displaystyle y_{1}<y_{2}.} Hence only the identity, which is the only permutation here keeping the order of y 1 < y 2 , {\displaystyle y_{1}<y_{2},} gives the maximum.

As an induction hypothesis assume that the upper bound in the rearrangement inequality (1) is true for n 1 {\displaystyle n-1} with n 3 {\displaystyle n\geq 3} and that in the case x 1 < < x n 1 {\displaystyle x_{1}<\cdots <x_{n-1}} there is equality only when the permutation σ {\displaystyle \sigma } of 1 , , n 1 {\displaystyle 1,\ldots ,n-1} keeps the order of y 1 , , y n 1 . {\displaystyle y_{1},\ldots ,y_{n-1}.}

Consider now x 1 x n {\displaystyle x_{1}\leq \cdots \leq x_{n}} and y 1 y n . {\displaystyle y_{1}\leq \cdots \leq y_{n}.} Take a σ {\displaystyle \sigma } from the finite number of permutations of 1 , , n {\displaystyle 1,\ldots ,n} such that the rearrangement in the middle of (1) gives the maximal result. There are two cases:

  • If σ ( n ) = n , {\displaystyle \sigma (n)=n,} then y n = y σ ( n ) {\displaystyle y_{n}=y_{\sigma (n)}} and, using the induction hypothesis, the upper bound in (1) is true with equality and σ {\displaystyle \sigma } keeps the order of y 1 , , y n 1 , y n {\displaystyle y_{1},\ldots ,y_{n-1},y_{n}} in the case x 1 < < x n . {\displaystyle x_{1}<\cdots <x_{n}.}
  • If k := σ ( n ) < n , {\displaystyle k:=\sigma (n)<n,} then there is a j { 1 , , n 1 } {\displaystyle j\in \{1,\dots ,n-1\}} with σ ( j ) = n . {\displaystyle \sigma (j)=n.} Define the permutation
    τ ( i ) = { σ ( i ) for  i { 1 , , n } { j , n } , k for  i = j , n for  i = n , {\displaystyle \tau (i)={\begin{cases}\sigma (i)&{\text{for }}i\in \{1,\ldots ,n\}\setminus \{j,n\},\\k&{\text{for }}i=j,\\n&{\text{for }}i=n,\end{cases}}}
    which arises from σ {\displaystyle \sigma } by exchanging the values of j {\displaystyle j} and n . {\displaystyle n.} There are now two subcases:
  1. If x k = x n {\displaystyle x_{k}=x_{n}} or y k = y n , {\displaystyle y_{k}=y_{n},} then this exchange of values of σ {\displaystyle \sigma } has no effect on the middle term in (1) because τ {\displaystyle \tau } gives the same sum, and we can proceed by applying the first case to τ . {\displaystyle \tau .} Note that in the case x 1 < < x n , {\displaystyle x_{1}<\cdots <x_{n},} the permutation τ {\displaystyle \tau } keeps the order of y 1 , , y n {\displaystyle y_{1},\ldots ,y_{n}} if and only if σ {\displaystyle \sigma } does.
  2. If x k < x n {\displaystyle x_{k}<x_{n}} and y k < y n , {\displaystyle y_{k}<y_{n},} then 0 < ( x n x k ) ( y n y k ) , {\displaystyle 0<(x_{n}-x_{k})(y_{n}-y_{k}),} which is equivalent to x k y n + x n y k < x k y k + x n y n {\displaystyle x_{k}y_{n}+x_{n}y_{k}<x_{k}y_{k}+x_{n}y_{n}} and shows that σ {\displaystyle \sigma } is not optimal, hence this case cannot happen due to the choice of σ . {\displaystyle \sigma .}

Generalizations

Three or more sequences

A straightforward generalization takes into account more sequences. Assume we have finite ordered sequences of nonnegative real numbers

0 x 1 x n and 0 y 1 y n and 0 z 1 z n {\displaystyle 0\leq x_{1}\leq \cdots \leq x_{n}\quad {\text{and}}\quad 0\leq y_{1}\leq \cdots \leq y_{n}\quad {\text{and}}\quad 0\leq z_{1}\leq \cdots \leq z_{n}}
and a permutation y σ ( 1 ) , , y σ ( n ) {\displaystyle y_{\sigma (1)},\ldots ,y_{\sigma (n)}} of y 1 , , y n {\displaystyle y_{1},\dots ,y_{n}} and another permutation z τ ( 1 ) , , z τ ( n ) {\displaystyle z_{\tau (1)},\dots ,z_{\tau (n)}} of z 1 , , z n . {\displaystyle z_{1},\dots ,z_{n}.} Then
x 1 y σ ( 1 ) z τ ( 1 ) + + x n y σ ( n ) z τ ( n ) x 1 y 1 z 1 + + x n y n z n . {\displaystyle x_{1}y_{\sigma (1)}z_{\tau (1)}+\cdots +x_{n}y_{\sigma (n)}z_{\tau (n)}\leq x_{1}y_{1}z_{1}+\cdots +x_{n}y_{n}z_{n}.}

Note that, unlike the standard rearrangement inequality (1), this statement requires the numbers to be nonnegative. A similar statement is true for any number of sequences with all numbers nonnegative.

Functions instead of factors

Another generalization of the rearrangement inequality states that for all real numbers x 1 x n {\displaystyle x_{1}\leq \cdots \leq x_{n}} and every choice of continuously differentiable functions f i : [ x 1 , x n ] R {\displaystyle f_{i}:[x_{1},x_{n}]\to \mathbb {R} } for i = 1 , 2 , , n {\displaystyle i=1,2,\ldots ,n} such that their derivatives f 1 , , f n {\displaystyle f'_{1},\ldots ,f'_{n}} satisfy

f 1 ( x ) f 2 ( x ) f n ( x )  for all  x [ x 1 , x n ] , {\displaystyle f'_{1}(x)\leq f'_{2}(x)\leq \cdots \leq f'_{n}(x)\quad {\text{ for all }}x\in [x_{1},x_{n}],}
the inequality
i = 1 n f n i + 1 ( x i ) i = 1 n f σ ( i ) ( x i ) i = 1 n f i ( x i ) {\displaystyle \sum _{i=1}^{n}f_{n-i+1}(x_{i})\leq \sum _{i=1}^{n}f_{\sigma (i)}(x_{i})\leq \sum _{i=1}^{n}f_{i}(x_{i})}
holds for every permutation f σ ( 1 ) , , f σ ( n ) {\displaystyle f_{\sigma (1)},\ldots ,f_{\sigma (n)}} of f 1 , , f n . {\displaystyle f_{1},\ldots ,f_{n}.} [2] Taking real numbers y 1 y n {\displaystyle y_{1}\leq \cdots \leq y_{n}} and the linear functions f i ( x ) := x y i {\displaystyle f_{i}(x):=xy_{i}} for real x {\displaystyle x} and i = 1 , , n , {\displaystyle i=1,\ldots ,n,} the standard rearrangement inequality (1) is recovered.

See also

References

  1. ^ Hardy, G.H.; Littlewood, J.E.; Pólya, G. (1952), Inequalities, Cambridge Mathematical Library (2. ed.), Cambridge: Cambridge University Press, ISBN 0-521-05206-8, MR 0046395, Zbl 0047.05302, Section 10.2, Theorem 368
  2. ^ Holstermann, Jan (2017), "A Generalization of the Rearrangement Inequality" (PDF), Mathematical Reflections, no. 5 (2017)