IMO 1987 LL FIN11

Let S \subset[0, 1] be a set of 5 points with {0, 1} \subsetS. The graph

IMO 1987 LL FIN11

Origin: FIN

Problem

Let S \subset[0, 1] be a set of 5 points with {0, 1} \subsetS. The graph of a real function f : [0, 1] \to[0, 1] is continuous and increasing, and it is linear on every subinterval I in [0, 1] such that the endpoints but no interior points of I are in S. We want to compute, using a computer, the extreme values of g(x, t) = f(x+t)−f(x) f(x)−f(x−t) for x −t, x + t \in[0, 1]. At how many points (x, t) is it necessary to compute g(x, t) with the computer?