We have a sequence $a_0,a_1,a_2,...,a_9$ so that each member is $1$ or $-1$. Is it possible: $a_0a_1+a_1a_2+...+a_8a_9+a_9a_0=0$ 
We have a sequence $a_0,a_1,a_2,...,a_9$ so that each member is $1$ or $-1$. Is it possible: $$a_0a_1+a_1a_2+...+a_8a_9+a_9a_0=0$$

This problem was given on contest, but I don't know how to solve it. 
Clearly we must have $5$ terms $a_ia_{i+1}$ equal $-1 $ and other $5$ equal $1$. I have created a graph in which $a_i$ is connected with $a_{i+1}$ (modulo 10) if their product is -1. So we have $5$ edges and we can write handshake lemma $$\sum_{i=0}^9 d_i=10$$
where $d_i \in \{0,1,2\}$, but all this is usless. 
I tried to find a configuration but failed every time. Any idea? For sure there must be simple argumentation why this does not hold or simple configuration why it does. Just don't see.
 A: No assignment of the $a_i$ will satisfy the given constraint, and the "simple argumentation" is as follows.
$$\begin{matrix}
a_0&a_1&a_2&a_3\\
a_9&&&a_4\\
a_8&a_7&a_6&a_5
\end{matrix}$$
The ten terms of the sum are products of consecutive values in the above loop. The $a_i$ form alternating runs of $+1$ and $-1$, and since this is a loop, there must be an even number of runs, thus an even number of boundaries between runs, hence an even number of $-1$ terms in the sum.
But we require exactly five $-1$ terms in the sum for it to be zero. Thus, no assignment of the $a_i$ can satisfy the sum.
A: The sum is congruent to $2 \pmod 4.$ This is the case if all the variables are set to $+1.$ If we negate any single variable compared with whatever it was, we change the sum by either $0$ or $ \pm 4,$ in any case keeping the same value $\pmod 4$
A: The hint. 
Take the product of these ten addends.
I got that it's impossible.
A: Letting $a_i = 2 b_i -1 $ (with $b_i\in \{0,1\}$), each term of the sum has the form $$a_i a_{i+1}= 4 b_i b_{i+1}-2b_i -2b_{i+1}+1$$ 
(the sum in the index $_{i+1}$ is assumed to be cyclic, of course).
Hence summing over all the terms we want
$$ 4 P -4 S +10=0 \iff 2 (P-S) =5$$
with $P= \sum  b_i b_{i+1}$ and $S=\sum b_i$. Because both $P$ and $S$ are integers, the equality cannot be true.
BTW, this shows that, in general, the equality can only be true if the number of elements is divisible by $4$.
A: Consider the cycle of length $10$ with the vertices numbered from $0$ to $9$ along the cycle. Now collapse together every run of consecutive vertices sharing the same value of the corresponding variable $a_n$. You will get a pentagon with the vertices of alternating signs, which is impossible. 
A: Hint $\,\ $ The sum as a function of $\,a_i\,$ is $\,\color{#0a0}{f(a_i)} = (\overbrace{a_{i-1}+a_{i+1}}^{\large \rm \color{#c00}{odd\,\  +\,\ odd}})\,a_i + k\ $ so by the Lemma its value $\!\bmod 4\,$ is invariant under $\,a_i\to -a_i\,$ so is the same as when all $\,a_i = 1,\,$ so $\,\equiv 10\equiv 2\pmod{\!4}$
Lemma $\  f(a) \equiv f(-a)\, \pmod{\! 4}\,\ $ if   $\ \color{#0a0}{f(x)}\, =\, \color{#c00}{2j}\, x + k,\ $ for $\ a,j,k\in\Bbb Z$ 
Proof $\ \ \ \ f(a)\,-\,f(-a)\, =\, (2ja+k)-(-2ja+k)\, =\, 4ja\,\equiv\, 0\pmod{\!4}$ 
