Proof (regular language is computable)
Let $L\subseteq \mathbb{W}$ be a regular language and let $D = (Σ, Q, δ, q_0, F)$ be a deterministic automaton that accepts $L$. We will describe a register machine $\hat M = (Σ, \hat Q, P)$ that takes $w$ as an input in register 0, mimics the computation of $D$, and outputs $a$ if $w\in L$ and $ε$ if $w\not\in L$. For each state $q\in Q$ of the automaton, $M$ will have a subset $Q_q \subseteq \hat Q$ of states.
-
Move the content of register 0 into register 1 in reverse order.
-
Move into $Q_{q_0}$.
For each $q\in Q$, $Q_q$ performs the following operations:
-
Read and remove the final letter in register 1, if exists.
-
If register 1 is empty,
-
in case $q\not\in F$, empty register 0 and halt;
-
in case $q\in F$, empty register 0, add $a$ to register 0, and halt.
-
-
If the removed letter is $b$:
-
Compute $q' = δ(q,b)$.
-
Move into $Q_{q'}$.
-