8,671 views
1 votes
1 votes

Construct TM tht accept al string of a's and b's where each string is even length palindrome.(here qf is final state, q0 initial state and B blank symbol)

Right now this TM accepting all palindrome string.

If pink arrow term is replaced with halt then this TM will accept even length palindrome only and if green arrow terms are replaced with halt thn this TM will accept odd length palindrome only.

I am not sure if I m doing it right. Plz let me know my mistakes

1 Answer

Best answer
7 votes
7 votes

Here we have TM for Palindrome 

Here we have marked $3$ transitions as $(1),(2)$ and $(3)$ 

if we removed $(2)$ and $(3)$ from it, It will be only for Even Palindrome

if we removed $(1)$ from it, it will be for Odd palindrome

else it is for General Palindrome.

selected by

Related questions

0 votes
0 votes
0 answers
1
RahulVerma3 asked Apr 2
52 views
Is this the correct Turing machine for the language $0^n 1^n0^n$?assuming $ at the end and begining of the input tape
3 votes
3 votes
2 answers
3
3 votes
3 votes
1 answer
4