Working on:
Richard Johnsonbaugh. (2018). Discrete Mathematics, 8/e (p. 590)
I am studying finite-state machines, and I have the following definition in my book:
Definition 12.1.8
Let $M = (I, O, S, f , g, \sigma )$ be a finite-state machine. An input string for $M$ is a string over $I$.
The string
$$y_1 \cdots y_n$$
is the output string for $M$ corresponding to the input string
$$\alpha = x_1 \cdots x_n$$  if there exist states
$\sigma_0, \dots, \sigma_n \in S$ such that:
$\sigma_0 = \sigma$
$\sigma_i = f(\sigma_{i-1}, x_i)$ for $i = 1, \dots, n$
$y_i = g(\sigma_{i-1}, x_i)$ for $i = 1, \dots, n$
Then, I have to do the following exercise:
Example 12.1.9
Find the output string corresponding to the string:
$$aababba$$
I proceed as follows:
For $i = 1$, I get:
$\sigma_1 = f(\sigma_{0}, x_1)$
$y_1 = g(\sigma_{0}, x_1)$
So, $y_0 = 0$. T
hen for $i = 2$, I get
$\sigma_2 = f(\sigma_{1}, x_2)$
$y_2 = g(\sigma_{1}, x_2)$
So, $y_1 = 0$. But now for $i = 3$, I don't have a state $\sigma_2 \in S$. So, how can I proceed calculation from here ?