Professional Documents
Culture Documents
Nikhil V 1BI18CS099 ATCI TM ASS
Nikhil V 1BI18CS099 ATCI TM ASS
Nikhil V 1BI18CS099 ATCI TM ASS
ASSIGNMENT
NIKHIL V
1BI18CS099
Step1: From the state q0 on a take symbol 0 is replace by x and move right side and go to the state q1.
Step2: From state q1 on the tape symbol 0 or y move towards right side and stay in same state q1.
the state q1.
Step3: From the state q1 on a tape symbol 1 replace by y and move towards left and go to the state q2.
Step4: From the state q2 on the tape symbol or 0 or y move towards left side stay in same state q2.
Step5: From the q2 on the occurrence of tape symbol of x move towards right side and go to the state q0.
Step6: From the state q0 on a tape symbol of y move towards right side and to the state q3.
Step7: From the state q3 on the tape symbol y move towards right side and stay in same state q3
Step8: From the state q3 on the tape symbol blank(b) move towards right and go to final state q4. (here [] is
treated as blank symbol)
Testing for the turing machine for input string 0011
On the occurrence of tape symbol 0 it replace in start state to x and moves to the state q1.
On any numbers of 0’s it remains in the state q1 and moves towards right
On an tape symbol 1 it is replace by y and moves left and goes to the state q2
In the state q2 on take symbol remains in same State and moves towards left side in tape.
In the state q2 on take symbol x moves towards right side in take and go to the state q0.
The above loop gets repeated until we have tape symbol pointed to alphabet y and current state is q0
On the take symbol y and the tm is in the state q0 moves to the state q3 and the r/w head move towards right.
On the take symbol y and the tm is in the state q3 remains in same state and the r/w head move towards right
Finally on occurrence of the blank on take symbol and the present state is q3 the machine goes to the final
state q4 . the string 0011 is accepted by the machine.