In this turing machine number of a that equal to the number of b and c .pda cannot do this because in pda only one comparision is possible using stack so turing machine is used to count equal number of b and c.
To check all the 'a's, 'b's and 'c's are over add loops for checking 'Y' and 'Z' after "we get 'X' followed by 'Y'"
To reach final state(qf) just replace BLANK with BLANK and move either direction.
For example
In state q0
aabbcc
a convert into x and reach on state q1
xabbcc
b convert into y and reach on state q2
xaybcc
c convert into z and reach on state q3
xaybzc
Now move on left without changing any symbol
Again reach on q0 and repeat same
xxyyzz
To check all the 'a's, 'b's and 'c's are over add loops for checking 'Y' and 'Z' after "we get 'X' followed by 'Y'"
To reach final state(qf) just replace BLANK with BLANK and move either direction.
0 Comments