How would you draw a state diagram for a DFA over the alphabet $\{0,1\}$ that recognizes the following language:
$$\{w=w_1w_2\ldots w_n\in\Sigma^*\mid(w_1-w_2+\ldots+(-1)^{k-1}w_k\bmod4=0\text{ for }k\geq0\text{ and }w_i\in\{0,1\}\}$$
I don't really know where to start. I am confused as to what that $\bmod 4$ is there for. Also, What would be the regular expression that would describe this language? Thanks for the help.
I'll give you the DFA, you can figure out why it works
$$Q=\{1,-1\}\times\{0,1,2,3\}$$$$\Sigma=\{0,1\}$$$$\delta((a,b),s)=(-a,b+as\bmod4)$$$$q_0=(1,0)$$$$F=\{1,-1\}\times\{0\}$$