in Theory of Computation
8,568 views
1 vote
1 vote

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

in Theory of Computation
8.6k views

1 comment

I think if pink is removed then it will odd

if green is removed then it will even .
1
1

1 Answer

7 votes
7 votes
Best answer

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