Can you give me 2 tape turing machine logic for a*nb*ma*nb*m where n,m>=0. Give the turing machine also, and explain the logic. Please give the time complexity ?
Start of Computation :
The tape contains the input string w, the tape head is on the
leftmost symbol of w, and the Turing machine is in the start state
Q0
Basic Idea :
The tape head reads the leftmost symbol of w, which is a and at
start only we will make it Blank. Then we will traverse to make
leftmost b a $ and replace rightmost c by a Blank, we will do this
zigzag pattern of replacing b by $ and c by Blank till all b are
not replaced by $.After this we will traverse back in left
direction till we get leftmost a and replacing all $ by b in the
traversal. After this we have reduced our string into form
an-1bmcnm-m so we can figure if
all a’s are replaced by blankand if the string belongs to Language
L then there will be no c’s left hence it will get accepted.
Meanings of symbols used:
R, L – direction of movement of one unit on either side.
B-Blank,
a, b, c -symbols whose combination string is to be tested.
$-Temporarily symbol to replace b.
Working Procedure :
Get Answers For Free
Most questions answered within 1 hours.