Suppose $a_1 \ge \cdots \ge a_n$ and $b_1 \ge \cdots \ge b_n$ are two sequences of positive real numbers. Then show $\sum a_ib_{\pi(i)}$ is maximum when $\pi=id$. Here, $\pi \in S_n$.
I understand that there are many sums of products, one due to each permutation. I have to find the one that gives the maximum value. I do not have any idea how to proceed. Can anyone give a hint?