Exercise 3. Consider 2017 lines in the plane, which intersect pairwise at distinct points. Let $E$ be the set of these intersection points.

We want to assign a color to each point in $E$ such that any two points on the same line, whose segment connecting them contains no other point of $E$, are of different colors.

How many colors are needed at a minimum to achieve such a coloring?
Solution to Exercise 3 The minimum $m$ sought is $m=3$ and, with what follows, it will be quite evident that the result remains true for $n \geq 3$ lines.

First, we note that, in the obtained configuration, there is at least one non-subdivided region that is a triangle. Indeed, three non-concurrent lines and two never parallel lines form a triangle. Now, any line that crosses a triangle divides it into two polygons, at least one of which is a triangle. Therefore, starting from three of the given lines and "adding" the other 2014 one by one, we are assured of the existence of such a triangular region in the final configuration. The three vertices of such a triangle must be of different colors, which implies that $m \geq 3$.

To conclude, we will construct an adequate coloring with three colors. We start by noting that, since there is only a finite number of intersection points, we can choose an orthogonal coordinate system in which these points have distinct x-coordinates. We then number the points $M_{1}, M_{2}, \ldots, M_{k}$ according to increasing x-coordinates (where $k=\frac{2017 \times 2016}{2}$). For any $i$, the point $M_{i}$ has at most four neighbors, and if it belongs to a segment joining two of its neighbors, only one of these two neighbors has an x-coordinate less than that of $M_{i}$. This ensures that, for any $i \leq k$, among the neighbors of $M_{i}$, at most two have indices less than $i$. We can then color the $M_{i}$ in the order of the numbering according to the following procedure: we color $M_{1}$ green and $M_{2}$ red. And, for all $i$ such that $2 \leq i \leq k-1$, if we assume that the points $M_{1}, M_{2}, \ldots, M_{i}$ have been colored either green, red, or blue so that no two adjacent points are (yet) the same color, then, according to the previous remark, at most two neighbors of $M_{i+1}$ have already been colored, leaving one color free for $M_{i+1}$.