Turing machine as Copier
TAPE movement for string "111":
Explanation of TAPE movement
- Input will be given as "B B B 1 1 1 B B B"
- First convert all '1' to 'X' : "B B B X X X B B B"
- Then mark 'X'(rightmost) as '1' and also mark BLANK as '1' : "B B B X X 1 1 B B"
- Repeat step 3 till all 'X' are finished
- Point TAPE head to start of string
State Transition Diagram
We have designed state transition diagram for adder as follows:
- First convert all '1' to 'X'
- Reach BLANK(in right) and move one step left, and convert 'X' to '1' and move right, convert BLANK to '1'
1. In step 2, while going towards BLANK(in right) we can get '1's on the way so pass them using self loop
2. In step 2, while going towards 'X'(in left) we can get '1's on the way so pass them using self loop.
- Finally when going towards 'X'(in right) if we do not get any 'X'(means all X are finished), so if we get BLANK then stop