in Theory of Computation edited by
385 views
0 votes
0 votes
$\text{Exercise 8}:$ Give an implementation of the macroinstruction

                                                                         $\text{searchright} (a,q_i,q_j),$

which indicates that the machine is to search its tape to the right of the current position for the first occurrence of the symbol $a.$ If an $a$ is encountered before a blank, the machine is to go into state $q_i$, otherwise it is to go into state $q_j.$

$\text{Exercise 9}:$ Use the macroinstruction in the previous exercise to design a Turing machine on $\Sigma =\{a,b\}$ that accepts the language $L (ab^*ab^*a).$

$\text{Exercise 10}:$ Use the macroinstructions searchright in Exercise 8 to create a Turing machine program that replaces the symbol immediately to the left of the leftmost $a$ by a blank. If the input contains no $a$, replace the rightmost nonblank symbol by a $b.$
in Theory of Computation edited by
385 views

Please log in or register to answer this question.

Related questions