TITLE: 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$
QUESTION [8 upvotes]: 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.

REPLY [3 votes]: 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$.