Problem

Source: 2019 CWMI P4

Tags: inequalities



Let $n$ be a given integer such that $n\ge 2$. Find the smallest real number $\lambda$ with the following property: for any real numbers $x_1,x_2,\ldots ,x_n\in [0,1]$ , there exists integers $\varepsilon_1,\varepsilon_2,\ldots ,\varepsilon_n\in\{0,1\}$ such that the inequality $$\left\vert \sum^j_{k=i} (\varepsilon_k-x_k)\right\vert\le \lambda$$holds for all pairs of integers $(i,j)$ where $1\le i\le j\le n$.