Question: Question 2 Given the pscudo - code of a Turing Machine M below, answer the following questions. Note that the input alphabet is { 0
Question
Given the pscudocode of a Turing Machine M below, answer the following questions. Note that the input alphabet is
On input string w:
Put the input on tape and place the tape head on the first symbol of the input.
Repeat the following until no more s left on tape.
a Replace the leftmost with
b Scan right until a occurs. If therg are no is reject.
c Replace the leftmost I with
d Scan right until a occurs. If there are no s reject.
e Replace the leftmost with
f Return tape head to lefthand end of tape, and go to stage
If all symbols on the tape are blank, reject.
If all symbols on the tape are or blank, accept; othervise, reject.
Answers:
a Describe the language that is recognized.
b Find and specify the worst case time complexity of the algorithm. Justify your answer.
Time complexity:
Justifieation:
c Find and specify the space complexity of the algorithm. Justify your answer.
Space complexity:
Justification:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
