Construct Turing machine (TM) that replace all occurrence of 111 by 101
from sequence of 0’s and 1’s.
Answers
Answer:
this is a question of maths or other subject
Answer:
- The Turing machine will look for every occurrence of the string 110.
- Look at the Picture that has been given as attachment.
State is depicting previous two symbols as 11.
Next symbol as 0 in state will initiate the replacement process
and will replace 110 by 101.
- The Turing machine M is given by the followings:
M=(Q,Σ,Ґ,δ,q0,B,F), where
Q=, , , ,,
Σ=0,1
Ґ=0,1,B
δ=Transition function is shown using the transition diagram\.f
B=Blank symbol for the tape . F=, halting state.
- Working of the machine for input 01011101 is shown in fig below:
0101101 B |- 0101101 |- 0101101 B |- 0101101
0101101 B |- 0101101
0101111 B |- 0101101 B
0101101 B |- 010111B |- 0101101 B
(halt)