0% found this document useful (0 votes)
32 views

Tafl Unit 5

Tafl

Uploaded by

26dsmuknu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Tafl Unit 5

Tafl

Uploaded by

26dsmuknu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

54EST Sem-4)

Turing Machines & Recursive Function tofAutomata& Formal Languages


Discuss the halting
problem of a Turing
OR
machine. Theory Theory
3
5-25 E (CSTT-Sem-)
Whatt computers cannor cannot eompute is determined by the law of
physics alone, and not by pure mathematies,
Turing Chureh's Thesis and 6 Recursively enumerable langunge :
Explain in detail about the
Enumerable languages. AKTU 2021-22, Recur
Markssivelyi
L TMdefinesatwo classes of languages such as recursively enumerable
OR language and recursive language
nen astring belonging to S runs on TM then it results in three
Write short notes on :
states
Church's Thesis
Language,
ii. Recursive and Recursive Enumerable A. Acceptance of string.
AKTU 2022-23, Marks h Loops forever on receiving string.
0
e Rejects the given string.
Answer
he language L is called recursively enumerable language ifthere
8.
e a turing machine T that accepts every valid strings in L and
a. Halting problem :
L The description of aTuring machine Mand an input w, does either rejects or loops for every stringsinthe complement ofL L).
when started in the initial configuration g,", perform a computati Recursive enumerable language is also called recognizable.
that eventually halts. semidecidable, Turing-acceptable or Turing-recognizable because
2. Now we ask whether Mapplied to w, or simply (M, w), halts or do a TMMcan recognize a string in the language and not able to decide
not halt. ifa string is not in the language.
3. The domain of this problem is to be taken as the set of all Turine Recursive language :
machines and all w; that is, we are looking for a single Turin Alanguage Lover input set Eis called recursive if there is aTM that
machine that, given the description of an arbitrary Mand w. will accepts every valid strings in Land rejects every strings in L.
prediet whether or not the computation ofM applied to wwill halt
b Church's thesis : 2. Recursive language is also called decidable language because a TM
can decide membership in these languages.
1 Church thesis states that any algorithm that can be performed on 8 Every recursive language is recursively enumerable language.
any computing machine can be performed on a Turing machine as
well. 4. Not all recursively enumerable languages are recursive. That means
2 An algorithm requiring polynomial time was considered as an every TM which accepts the enumerable langunge must have some
efficient algorithm; a strengthened version of the Church-Turing strings for which it loops forever.
thesis was enunciated.
3
Que 5.21.Write short notes on the following :
Any algorithmic process can be simulated efficiently by a Turing
machine. i Halting problem of Turing Machine
Recursive language
4. But a challenge to the strong Church-Turing thesis arose
analog computation,
from iüi. Variants of Turing Machine AKTU2017-18, Marks 10|
5. Certain types of analog computers had solved some problems Answer
efficiently whereas these problems had no efficient solution on
Turing machine. Halting problem of Turing Machine : Refer Q. 5.20, Page 5-23E,
6 But when the presence of noise was taken into Unit-5.
of the analog computerssdisappeared. account, the power i. Recursive lang :Refer Q. 5.20, Page 5-23E, Unit-5.
Strong Church-Turing thesis : iii. Variants of Machine : Refer Q. 5.9, Page 5-14E,
1. Any algorithmic process can be Refer Q.5.10, Page 5-14E, Refer Q.6.11, Page 5-15E, Unit-5.
deterministie turing machine. simulated efficiently using a non Que 6.22. Prove that every recursively enumerable language
2 Computers are physical objects, and computations are physical
processes. where complement is closed must be recursive.
5-10E (CSIT-Sem-4) Turing Machines & Recursive
12. According to step 3, change first right "e to "Z. Input tape and Tu
Machine behavior is given below :
FunctionTh Theoryof Automata & Formal Languages 5-11 E (CSIT-Sem-4)

(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)

Step 5: Repeat step 1 to


4 until no more "a". "b" and Function The fAutomata &
Theoryof Formal Languages 5-9 E (CSIT-Sem-4)
5.
input tape.
Turing Machine:
remain int 9.
ding to step 4, move left to
Machine behavior is given below :
leftmost "a. Input tape and Turing
B. Construction of
Language "aabbee"
Let us construct Turing Machine for
RW Head
1.
According tostep 1, change "a" to "X":
State change from 4, to 41 ..******
Read/Write head moves toward right. Input tape
3. Input tape and Turing Machine behavior is given below : (a, a, L)
RW Head (a, a, R)
(Y, Y, L)
(b, b, R) (b, b, L)
Xabb|eSS.. (a, X, R)b, Y, R)e,2, LI
Input tape 93)
X, X, R)
4 According to step 2, change first right"b" to "y: 10 Again according to step 1, replace leftmost "a" with "x,
State change from q, to gg:
RW Head
Read/Write head moves toward right.
5. Input tape and Turing Machine behavior is given below: xxYb|ZsS
RW Head Input tape
(a, a, L)
(Y, Y, R) Y. Ý, L)
Input tape (a, a, R) (b, b, R) b, b, L)
(a, a, R)

(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)

stringu=#.1 (B. B, R (B. B. L)


Let us pass the 0lg,-#0g,# Va, a, R)
-,0#-#0g,#
AROAGABbB. L
-#Yh#
machine for the language
(A, A, R)

Que 5.5.Design Turing (B, B. Ri


(a. a. LI
L- (a b | n> 0).
Answer (B. B, R
L= lat B|n >0),
For language
replaced by 'A'symbol
First two 'a'symbols vill be simply
(4,, R)
a

b. tsvmbol in the given input string uw is 'a' then


Now, if the lettmos.se
it by 'A' and move encounter aleftmost 'b in w. Chang
B and move backwards.
Repeat (b) with the leftmost 'a'. Ifwe movee back and forth and nos
remains, move toa final state. Fig. 55.1.
sta
d Strings which are not in the formn an+" do not reach final L. Where,
We construct the Turing machine M
as follows : Oue 5.6.Design a Turing Machine for the language
M=(Q, , r, 5, 4,, #, F) L=(abe |nz1). AKTU 2021-22, Marks 10
OR
language :
F= l) Design a Turing Machine for the
L= la" b e | n >=1)
L= la, b| |AKTU 2022-23, Marks 10
r= la, b,A, B, #)
Transition dingram for this Turing machine is given in Fig. 5.5.1.
Answer
The transitíon table will be: equal number of a's, b's and
Given language (L= a"b'e) will generateL="aabbce"
Table 5.5.1. as given below :
e's. So, consider an input-tape which hold
A R/W Head

(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".

You might also like