Our goal is to construct a deterministic one-tape Turing machine that accepts strings over Σ = {a, b} which are palindromes. A palindrome is a string which is the same when read forwards and backwards, for example abbabba. The Turing machine should operate in the following way: 1. Remember the first character of the input in the state control, and erase this character (replace it with a blank). 2. Move the head to the last (right-most) character of the input. 3. Verify that this character is the same character as the one stored in the state control. If it is, delete this character. If it is a different character, immediately halt and reject. 4. Move the head to the left-most character of the input. 5. If there are any characters left on the input, repeat from step 1. 6. If in step 1 or 3 the tape is empty (i.e. all characters of the input have been erased), halt and accept.
Our goal is to construct a deterministic one-tape Turing machine that accepts strings over
Σ = {a, b} which are palindromes. A palindrome is a string which is the same when read forwards and
backwards, for example abbabba. The Turing machine should operate in the following way:
1. Remember the first character of the input in the state control, and erase this character (replace it with
a blank).
2. Move the head to the last (right-most) character of the input.
3. Verify that this character is the same character as the one stored in the state control. If it is, delete
this character. If it is a different character, immediately halt and reject.
4. Move the head to the left-most character of the input.
5. If there are any characters left on the input, repeat from step 1.
6. If in step 1 or 3 the tape is empty (i.e. all characters of the input have been erased), halt and accept.
Step by step
Solved in 2 steps with 1 images