Theory of Automata Formal Languages RCS403 PDF
Theory of Automata Formal Languages RCS403 PDF
Theory of Automata Formal Languages RCS403 PDF
B. TECH
(SEM IV) THEORY EXAMINATION 2017-18
THEORY OF AUTOMATA AND FORMAL LANGUAGES
Time: 3 Hours Total Marks: 70
Note: Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
SECTION B
Fig.1
c. Reduce the given grammar G=({S,A,B},{a,b},P,S) to Chomsky Normal Form.
Where P is defined as:
S→ bA | aB
A→ bAA | aS | a
B → aBB | bS | b
d. What is Push Down Automata (PDA)? Design the PDA for the language
L = {wcwR│w{a,b}*}
e. Define Turing Machine (TM). Construct the TM for the language
L = {anbn│n>0}.
SECTION C
3. Attempt any one part of the following: 7x1=7
(a) Describe Mealy and Moore machines with example. Convert the given Mealy
machine as shown in Fig. 2 into Moore Machine.
Fig. 2
(b) Construct the minimum state automata equivalent to DFA described by Fig. 3
Fig. 3
4. Attempt any one part of the following: 7x1=7
p
(a) State Pumping Lemma for regular sets. Show that the set L={a | p is a prime} is
not regular.
(b) Discuss closure properties i.e. concatenation, union, intersection, complement
of regular languages.
5. Attempt any one part of the following: 7x1=7
(a) Discuss inherent ambiguity of context free languages with suitable example.
Construct the context free grammar that accepts language L={aibjck| i = j or j =
k; i, j, k are positive integers}.
(b) Define parse tree. Find parse tree for the string abbcde considering the
productions-
SaAcBe
AAb
Ab
Bd
Is this ambiguous? Justify.
6. Attempt any one part of the following: 7x1=7
(a) Differentiate between deterministic PDA (DPDA) and non-deterministic PDA
(NPDA) with suitable example. Also discuss two stack PDA with example.
(b) Construct a PDA equivalent to the following CFG productions:
S→aAA, A→aS│bS│a