w^R is the reverse of w and w is {0, 1}* . So the TM needs to decide a word followed by the reverse of this word followed by the word. I don't want the answer, I just want a lead to start and to get on the right track.
2.2 Solving Problems with Turing MachinesWe use a Turing machine by giving it an input string already written on the tape. The tape head is initially positioned on the leftmost non-blank character of the input. The Turing machine halts, accepting the input, if it ever enters a final or accepting state.
A Turing machine (TM) is a 7-tuple, , where Q is a finite set of states, S is a finite input alphabet, G (which contains S and has B, the blank tape symbol, as an element) is a finite tape alphabet, q0 in Q is the distinguished start state and F contained in Q is the set of accepting (final) states.
Since some time has passed and the answer probably isn't needed anymore, I guess I'll propose a solution for the benefit of future students looking for an example of how one language can be recognized by a Turing machine.
Here's the idea. We'll take as the tape alphabet {0, 1, a, b, c, d} and make a single-tape singly-infinite tape Turing machine that recognizes w w^R w. The machine will work in five phases:
Note that this is simply one easy (for me to understand, that is) way to show that there exists a Turing machine to recognize this language. Naturally, showing that there exists an algorithm to solve this in any Turing-equivalent system of computation is just as good (it proves there exists a TM)... still, this outlines the construction of one such TM. Also note that there may be a simpler, more efficient or more intuitive TM to solve this problem... again, this is only one approach.
Step 1 will work as follows:
Postcondition: Halts if tape is empty or if length is not a multiple of 3; else, the tape begins with a blank, is followed by (a+b)^2n (c+d)^n, followed by an infinite string of blanks.
Step 2 will work as follows:
Postcondition: Halts if the prefix (a+b)^2n isn't a palindrome; otherwise, leaves the tape in a state like D (c+d)^3n D*
Step 3 will work as follows
Postcondition: Tape is D (0+1)^3n D*
Step 4 and 5 work just like steps 1 and 2, except you work backwards (the tape now looks like D (c+d)^n (a+b)^2n D*, and you must check to see whether the (a+b)^2n part is a palindrome.
Any string passing both these tests must be of the form w w^R w where w is in (0+1)*.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With