Real numbers a1,a2,,ana_1, a_2, \ldots, a_n are given. For each ii (1in1 \leq i \leq n) define

di=max{aj:1ji}min{aj:ijn}d_i = \max\{a_j : 1 \leq j \leq i\} - \min\{a_j : i \leq j \leq n\}

and let

d=max{di:1in}.d = \max\{d_i : 1 \leq i \leq n\}.

(a) Prove that, for any real numbers x1x2xnx_1 \leq x_2 \leq \cdots \leq x_n,

max{xiai:1in}d2.()\max\{|x_i - a_i| : 1 \leq i \leq n\} \geq \frac{d}{2}. \quad (*)

(b) Show that there are real numbers x1x2xnx_1 \leq x_2 \leq \cdots \leq x_n such that equality holds in ()(*).