| Chomsky Hierarchy | ||
Example : The language To show that L is accepted by an LBA. we need to construct a TM to accept L such that during computation on any input w, the read-write head moves neither beyond the right of the rightmost symbol of w nor beyond the left of the leftmost symbol of w. The outline of the TM M accepting L is given below. On initial state q0, M replaces the first a by X and change state to q1 and the head moves to the right looking for the first b, skipping all other symbols. This b is then replaced by Y and changes state to q2 and the head moves to the right searching for the first c skipping all other symbols. This c is then replaced by Z and changes state to q3 and the head moves to the left searching for the first X, skipping all other symbols. On reading X in state q3 the head moves to the right (one cell) changing state to q0 again to repeat the same process i.e match each a, b and c and replace them by X, Y and Z, respectively, with the same sequence of state changes. |
||