1-x $.

A (realtime) affine finite automaton (AfA) [@DCY16A] $ A $ is a 5-tuple $$A = (S,\Sigma,\{M_\sigma \mid \sigma \in {\widetilde{\Sigma}}\},s_I,S_a),$$ where $ S = \{s_1,\ldots,s_n\} $ is a finite set of states, $ \Sigma $ is a finite set of input symbols, $M_\sigma$ is the $ n\times n $ affine transition matrix for symbol $\sigma \in {\widetilde{\Sigma}}$, $ s_I \in S $ is the initial state, and $ S_a \subseteq S $ is a finite set of accepting states.

We consider a one-to-one correspondence between the set of configurations (i.e., the set of states $ S $) and the standard basis of an $n$-dimensional real vector space. Then, any affine state is represented as an $n$-dimensional real vector such that the summation of all entries is equal to 1. For a given input $w \in \Sigma^*$, $A$ starts its computation in the initial affine state $ v_0 $, where the $I$-th entry is 1 and the others are zeros. Then, it reads $ {\tilde{w}}$ symbol by symbol from the left to the right and for each symbol the affine state is changed as follows: $$v_j = M_{{\tilde w}[j]} v_{j-1},$$ where $ 1 \leq j \leq |{\tilde{w}}| $. To 