Colouring a finite set of sticks placed on a line either in red or blue Consider a set of finitely many sticks which all have a finite length (all sticks aren't necessarily the same lengths) that are all placed on an infinitely long line such that these sticks may be overlapping partially, completely or not at all. Is it possible to colour in every stick in this set red or blue such that on every point $p$ of the line, the amount of red sticks and blue sticks differs by $-1$, $0$ or $1$?
 A: Yes, such a colouring is possible. My proof uses some basic ideas from graph theory.
Suppose $n$ sticks are placed on the real line. Number the sticks arbitrarily from $1$ to $n$, and suppose the $i^\text{th}$ stick occupies the interval $(a_i,b_i)$, that is, its left end is at $a_i$ and its right end is at $b_i$. Without loss of generality we can assume that no endpoints coincide, so that $a_1,b_1,\dots,a_n,b_n$ are $2n$ distinct points. Let $x_1,x_2,\dots,x_{2n}$ be the same $2n$ points listed in their order on the line from left to right, so that $x_1\lt x_2\lt\cdots\lt x_{2n}$. We will make the set
$$V=\{a_1,b_1,\dots,a_n,b_n\}=\{x_1,\dots,x_{2n}\}$$
the vertex set of a graph $G$. The graph has two kinds of edges: the $n$ stick edges $a_1b_1,a_2b_2,\dots,a_nb_n$, and the $n$ non-stick edges $x_1x_2,x_3x_4,\dots,x_{2n-1}x_{2n}$.
Now $G$ is a regular graph of degree $2$, since each vertex is incident with exactly two edges, one stick edge and one non-stick edge. However, $G$ is not (necessarily) a simple graph, as it may have multiple edges; for instance, if $a_1=x_1$ and $b_1=x_2$, then the vertices $x_1$ and $x_2$ are joined by two edges, forming a cycle of length $2$.
Since each vertex has degree $2$, the graph $G$ consists of one or more vertex-disjoint cycles. Moreover, each cycle has even length, since its edges are alternately sticky and non-sticky. Therefore the graph is $2$-colourable, that is, we can colour each vertex red or blue so that adjacent vertices have different colours.
Finally, we colour each stick with the colour of its left endpoint.
As we traverse the line from left to right, the quantity "red sticks minus blue sticks", initially zero, increases by one each time we pass a red vertex (either the left end of a red stick or the right end of a blue stick) and decreases by one each time we pass a blue vertex. Since $x_{2i-1}$ and $x_{2i}$ have different colours, that quantity will be $0$ whenever we have passed an even number of vertices, $\pm1$ whenever we have passed an odd number of vertices.
P.S. I've been asked to explain why I can assume that no endpoints coincide. Well, suppose we have some coincidences. Perturb the sticks slightly to get rid of the coincidences, and then find a good colouring for the perturbed arrangement. That means that the vertices partition the line into intervals where the quantity we care about is $0$ or $\pm1$. Now, if we slide the sticks back where they were, I claim the colouring is still good, because all that happens is that some of those intervals close up and disappear.
