Table of Contents
Turing machine for Regular languages:
Regular languages can be represented through finite automata and similarly can be represented through Turing Machine.
This machine must accept all strings starting from a and ending with b. e.g, ab,aab, abab etc.
Let’s discuss the diagram;[quads id=1]
Starts the machine
Read a from input tape and write a and move Right on input tape.
Read a from input tape and write a and move Right on input tape. There is a loop of a, a, R on state 2.
If read b from input tape, then write b and move right and halts the machine by accepting the string.
If there is any a on accept state then again control moves to the state 2, enforcing the machine to not end with a.