-1
$\begingroup$

Construct a Turing machine for M = {wvw| v, w ∈ {a, b}*, reversal(v) = w}.

I tried to imagine that I will have to divide the string into 3 equal parts and check if the first and last part are identical, and that first two parts form a palindrome. But not sure how to proceed with this to construct the turing machine.

$\endgroup$
0
$\begingroup$

So, I can grant that your idea is right. Divide the string into 3 equal parts; for example, if you have aabbaaaab, divide the strings like this: aab baa aab. In case it isn't possible, directly reject it. Otherwise for the next step, check if the concatenation of the first two substrings forms a palindrome; if it doesn't, stop and reject, but if so, then proceed further. In the last step, just check if the first and last substrings match, if so, accept, else reject. With all these in mind, the following should work:

Turning Machine

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.