MathDB
Binary-valued function

Source: Turkey National Mathematical Olympiad 2019, Problem 5

December 23, 2019
functionalgebracombinatorics

Problem Statement

Let f:{1,2,,2019}{1,1}f:\{1,2,\dots,2019\}\to\{-1,1\} be a function, such that for every k{1,2,,2019}k\in\{1,2,\dots,2019\}, there exists an {1,2,,2019}\ell\in\{1,2,\dots,2019\} such that iZ:(i)(ik)0f(i)0. \sum_{i\in\mathbb{Z}:(\ell-i)(i-k)\geqslant 0} f(i)\leqslant 0. Determine the maximum possible value of iZ:1i2019f(i). \sum_{i\in\mathbb{Z}:1\leqslant i\leqslant 2019} f(i).