Prove that some configuration on $99$-gon is im/possible. The sides of a $99$-gon are initially colored so
that consecutive sides are red, blue, red, blue, $\,\ldots, \,$
red, blue, yellow. We make a sequence of modifications in the
coloring, changing the color of one side at a time to one of the
three given colors (red, blue, yellow), under the constraint that
no two adjacent sides may be the same color. By making a sequence
of such modifications, is it possible to arrive at the coloring in
which consecutive sides are red, blue, red, blue, red, blue, $\,
\ldots, \,$ red, yellow, blue?
 A: Consider $\nu =$ the number of (yellow, red) pairs minus the number of (red, yellow) pairs in the configuration. $\nu=1$ for the initial configuration, and $\nu=-1$ for the desired configuration. The constraint on modifications effectively requires that when we make a modification of a side, its two neighboring sides should have the same color; thus modifications don't change $\nu$. Therefore passing from a $\nu=1$ configuration to a $\nu=-1$ one is impossible.
A: Let the colors be $0$, $1$, $-1$, modulo $3$. An admissible coloring $(x_k)_{1\leq k\leq N}$ ($N=99$ here) of the edges induces a coloring $(y_k)_{1\leq k\leq N}$ of the vertices by taking differences $y_k:=x_k-x_{k-1}\in\{1,-1\}$. Now one of your operations amounts to, e.g., $$\ \ldots b,r,b,\ldots\qquad\to\qquad \ldots b,y,b,\ldots\ $$ on the edges. This means that in the sequence $(y_k)_{1\leq k\leq N}$ an adjacent $\pm$ pair is reversed: $$\ \ldots1, -1,\ldots\qquad\to\qquad \ldots-1, 1,\ldots\ ,$$ or conversely. This transformation leaves $s:=\sum_{k=1}^N y_k$ invariant. 
Your two sequences differ by a transformation
$$\ \ldots r,b,y,r,\ldots\qquad\to\qquad \ldots r,y,b,r,\ldots\ ,$$and this gives rise to
$$\ldots 1,1,1,\dots\qquad \to\qquad\ldots-1,-1,-1,\ldots\ ,$$
or conversely. Here $s$ has changed by $6$.
