Consider $n$ pairs of positive integers, $(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n)$. Make a permutation $(a_1, b_1), (a_2, b_2), \dots, (a_n, b_n)$ of these pairs, such that for all $x_i, y_i$, a pair $a_j, b_j$ also exists and such that,

$$max\left(a_1 + b_1, a_1 + a_2 + b_2, a_1 + a_2 + a_3 + b_3, \dots, \left(\sum_{i=1}^n a_i\right) + b_n\right)$$

is minimized.

I thought about arranging the pairs such that

$$a_1 + b_1 \geq a_2 + b_2 \geq \dots \geq a_n + b_n$$

but it can be seen that this does not work by considering the pairs, $(100, 5), (1, 10)$

$$max(100 + 5, 100 + 1 + 10) = 111$$

But,

$$max(1 + 10, 100 + 5 + 1) = 106$$

which is smaller.

EDIT: Another solution might be obtained by considering sub-problems of this. If we know the optimum way to permute $i-1$ pairs, can we find the optimum permutation for $i$ pairs?