MathLabs

Problem 1

Real numbers a1,a2,…,ana_1, a_2, \ldots, a_n are given. For each ii (1≤i≤n1 \le i \le n) define di=max⁡{aj:1≤j≤i}−min⁡{aj:i≤j≤n}d_i = \max\{a_j : 1 \le j \le i\} - \min\{a_j : i \le j \le n\} and let d=max⁡{di:1≤i≤n}d = \max\{d_i : 1 \le i \le n\}. (a) Prove that, for any real numbers x1≤x2≤⋯≤xnx_1 \le x_2 \le \cdots \le x_n, max⁡{∣xi−ai∣:1≤i≤n}≥d2\max\{|x_i - a_i| : 1 \le i \le n\} \ge \dfrac{d}{2}. (b) Show that there exist real numbers x1≤x2≤⋯≤xnx_1 \le x_2 \le \cdots \le x_n such that equality holds in the inequality above.
Step 4 of 5: Construct a non-decreasing candidate sequence for part (b)
In plain words

Tracking the running maximum and shifting it down by d2\dfrac{d}{2} gives a non-decreasing sequence whose distance to aia_i is controlled by di≤dd_i \le d.

Mi=max⁡{aj:1≤j≤i},xi=Mi−d2M_i = \max\{a_j : 1 \le j \le i\}, \qquad x_i = M_i - \frac{d}{2}
Detailed analysis

Define Mi=max⁡{aj:1≤j≤i}M_i = \max\{a_j : 1 \le j \le i\} and xi=Mi−d2x_i = M_i - \dfrac{d}{2}. Since Mi≤Mi+1M_i \le M_{i+1}, the sequence x1≤x2≤⋯≤xnx_1 \le x_2 \le \cdots \le x_n is non-decreasing. Moreover Mi≥aiM_i \ge a_i (as aia_i is one of the terms in the maximum) and Mi−ai≤Mi−min⁡{aj:i≤j≤n}=di≤dM_i - a_i \le M_i - \min\{a_j : i \le j \le n\} = d_i \le d, so 0≤Mi−ai≤d0 \le M_i - a_i \le d for every ii.