$ s_1 $ switches to $ s_2 $ after reading a symbol $2 $ and then never leaves $ s_2 $ until the end of the computation. If the automaton ends in state $ s_1 $, the input is rejected.

From now on, we focus on the affine transitions. The computation starts in the following affine configuration: $${\langle p_0,0 \rangle},$$ where $ p_0 $ is the affine state and $ 0 $ represents the counter value.

After reading the left end-marker, $ p_0 $ goes to $ p_0 $, $ p_1 $, and $ p_2 $ with the values $1$, $1 $, and $ -1 $, respectively, without changing the counter value. Then, the affine state becomes $${\langle p_0,0 \rangle}+{\langle p_1,0 \rangle}-{\langle p_2,0 \rangle}.$$

We list the all transitions until reading the right end-marker below, in which $ c $ can be any integer representing the counter value. Remark that the counter status is never checked in these transitions.

-   When reading a symbol 0:

    -   $ {\langle p_0,c \rangle} \rightarrow {\langle p_0,c \rangle} $

    -   $ {\langle p_1,c \rangle} \rightarrow {\langle p_1,c \rangle} - \frac{1}{2} {\langle p_3,c+1 \rangle} + \frac{1}{2} {\langle p_4,c+1 \rangle} $

    -   $ {\langle p_2,c \rangle} 