Rearrangement Inequality — Definition, Formula & Example
The Rearrangement Inequality is the rule that when you multiply numbers from two lists in pairs and add the products, the total is largest when you pair big with big. It is smallest when you pair big with small.
Let and be real numbers, and let be any permutation of . Then . If both sequences are strictly increasing, the upper bound is attained only by the identity permutation, and the lower bound only by the reversing permutation.
Key Formula
Where:
- = First list of real numbers, sorted in increasing order
- = Second list of real numbers, sorted in increasing order
- = Any permutation (reordering) of the indices 1 through n
- = The second list in reverse order, which gives the opposite pairing
How It Works
The standard proof uses an exchange argument. Suppose a pairing has but matches with a larger -value than . Swap those two -values. The sum changes by , so it never decreases. Repeating such swaps sorts the pairing into the similarly ordered one without lowering the sum, so that pairing is the maximum. Applying the same result to gives the minimum. The numbers do not need to be positive.
Worked Example
Problem: A store sells three kinds of nuts at $2, $3, and $5 per pound. You will buy 1, 4, and 6 pounds, using one amount for each kind. Which assignment costs the most, and which costs the least?
Step 1: Sort both lists. Prices are 2, 3, 5 and amounts are 1, 4, 6. Match them in the same order for the maximum cost.
Step 2: Match them in opposite order for the minimum cost.
Step 3: Check a mixed assignment. It must land between the two extremes.
Answer: Buying 6 pounds of the $5 nuts, 4 pounds of the $3 nuts, and 1 pound of the $2 nuts costs the most, $44. Reversing the amounts costs the least, $29. Every other assignment costs between $29 and $44.
Why It Matters
Competition math uses the Rearrangement Inequality to give short proofs of the AM-GM inequality, Chebyshev's sum inequality, and Nesbitt's inequality. The same exchange argument justifies greedy algorithms in computer science, such as ordering jobs to minimize total weighted completion time.
Common Mistakes
Mistake: Pairing the numbers in the order the lists are written, without sorting them first.
Correction: The inequality concerns order by size, not by position. Sort both lists in increasing order before you match them. Only then does same-order pairing give the maximum.
