Tafl Unit 5
Tafl Unit 5
(2, 2, L)
(a, a, L)
RW Head (Y, Y, R) (Z, 2, R) (Y, Y, L)
(a, a, R) (b, b, R) (b, b, L)
. . ***********
Input tape a, X, R ) b , Y, R) c,2, L)
(Z, Z, L)
(a, a, L) (X, X, R)
(Y, Y. R) (Z, Z, R) Y, Y, L)
(a, a, R) (b, b, R) (b, b, L) (Y, Y, R)| RW Head
(a, X, R)
91 ,Y, R) (%) (Z, Z, R)xxYY|Z2|ss ..........***.
(Y, Y, R) Input tape
(X, X, R)
($, $, L)
13. At this point all "a", "b and "c are replaced with "X, and t
respectively. (46) Final state
4. Asthe Read/Write head is pointing Xat q, and moving toward right &.
to reach at special symbol "$" consume all "X", "Y and 2 as eho
below :
PART-2
Techniques for Turing Machine Construction.
(2, 2, L)
(a, a, L)
(Y, Y, R) (Z, Z, R) (Y, Y, L) Que 5.7. How to construct complex turing machine ?
(a, a, R) (b, b, R) (b, b, L)
Answer
Complex turing machine can be constructed by using simple turing machines.
to hang. Then Tm,
(X, X, R) 1. Suppose Tm, is a turing machine that is not knownas follows
can be made part of a large turing machine Tm
it near the right
(Y, Y, R)
RW Head Tm prepares some string as input to Tm,. placing
control to Tm, with
end of non-blank portion of the tape, passes
and finally
read/write head just beyond the end of that string computing.
(4)\2, 2, R)
r,Y, R) retrieves control from Tm, when Tm, has finished its
the operational
Input tape It is guaranteed that Tm, will never interfere with
computation of Tm.
15. Finally, by using special symbol $", the Read/Write head moves towar until
to another will not be pursuedinitial
the last symbol of given language as given below and language is
2 The connection from one machine
other machine is then started from its
acepie the first machine halts; the
as they were lef by the first
state with the tape and head position following figure:
machine. This can be shown by the
Turing Machines & Recursive
6-8E (CSIT-Sem-4)
(a, X, R)
oa, X,R ) ,Y,R),z, L)
(x, X, R)
6. According to step 3, change first right "e to "Z":
State change from 42 to g 11. Again according to step 2, replace first right "b" with "Y".
i. Read/Write head moves toward left.
7. Input tape and Turing Machine
behavior is given below : RW Head
RW Head
xxYY2|e|ss
*****.......
******. Input tape
Input tape (a, a, L)
(a, a, R) (Y, Y, R) (Z, Z, R) (Y, Y, L)
(b, b, R)
(a, a, R) (b, b, R) (b, b, L)
(98)14, X, R)
G%a, X, R) (e, 2, L)
8
Now repeat the step 1 to 4 to 43
"E respectively. replace all "a","b and "c with "X,Y ana
(X, X, R)
Turing Machines & Recursive Fu
56E(CSTTSem
unctin TAutomata & Formal I Languages
TheoryofA
5-7 E (CSTT-Sem-4)
(9,A, R)
q,.A, R)
(9,A, R) (qs, B, R) Input tape
4, a, R),B, L) (a, B, R) A Algorithm for language u"be: Algorithm for given langunge in
(a, A, R) ( B, L) Turing Machine to accept is shown below
(q, B, R) (a ,R) 1. Step1:Change "a" to "X".
ehange "b to Y;
2. Step 2 : Move right to first "b. If "b found then
otherwise simply reject the language.
found then change "e to "Z:
d. Step 3 : Move right to first "c. If "
otherwise simply reject the language.
4. Step 4: Move left to leftmost "a".