Construct a turing machine which accepts a string with ‘aba’ as its substring.

Construct a turing machine which accepts a string with ‘aba’ as its substring.
A.
B.
C.
D.
 
Answer: C
Explanation: The language consist of strings with a substring ‘aba’ as fixed at its end and the left part can be anything including epsilon. Thus the turing machine uses five states to express the language excluding the rejection halting state which if allowed can modify the graph as:
 

Tìm kiếm

Back
Top