Flat PQP
Flat PQP
Flat PQP
PART- B
(Answer all the questions: 05 X 10 = 50 Marks)
2 Define DFA and regular expression. DFA accepts all Strings corresponding to the expression 10M
1"01(0+11)". Also explain how to convert a regular expression to DFA.
OR
3 (a) Discuss Chomsky's Hierarchy of formal languages. 5M
(b) Explain briefly about DFA and NFA. 5M
4 Prove that the language L= {a" b" |n>=1) is not regular using pumping lemma with procedure. 10M
OR
5 (a) Construct a DFA for the regular expression consisting of any number of a's and b's. 5M
(b) Explain about the identity rules of regular expression. 5M
6 Simplify the following context free grammar. (Here, Astands for epsilon (¬)). S’TUJV 10M
T’ aTblA
U’cU| A
V’aVcW
OR
7 (a) What is linear grammar? Explain in detail with example. 4M
(b) Explain the closure properties of context free languages. 6M
PART- B
(Answer all the questions: 05 X 10 = 50 Marks)
2 (a) Explain the procedure for conversion of NFA to DFA. 4M
(b) Prove That for every NFA there exists an equivalent DFA which accepts the same language. 6M
OR
3 (a) Construct NFA without [ for a given NFA with E where g0 and g2 are the initial and final states 5M
respectively.
C
q0 q0 q1
q1 q1 q2
q2 e q2
(b) Construct a Moore machine to determine the residue modulo 3 of the input treated as a binary 5M
number.
4 (a) Convert ((01)+. (0 + 1"))" into Finite Automata. 5M
(b) State and Prove Ardens Theorem. 5M
OR
5 (a) State and Prove Pumping Lemma for Regular Sets. 5M
(b) Obtain a CFG to obtain the balanced set of parentheses (i.e. every left parenthesis should 5M
match with the corresponding right parentheses) using the symbols ('and ).
6 (a) Define Chomosky's classification of grammar. 5M
(b) Explain Normal Forms and convert the following grammar into GNF S>(S)/SoS/-S/p/q. 5M
OR
Contd. in Page 2
Page 1 of 2
www.android,previousquestionpapers.com / www.previousquestionpapers.com | https:/helegram.me/jntua
7 (a) Define CNF and convert the following Grammar into CNF 6M
S >aAB / Aba
A ’aA la/Ba
B’ ab /bc.
(b) Write the procedure for conversion of CNF to GNF. 4M
B.Tech llI Year ISemester (R20) Regular &Supplementary Examinations January 2024
FORMAL LANGUAGES AND AUTOMATA THEORY
(Common to Information Technology and Computer Soence &Engineering)
Max. Marks. 70
Time: 3 hours
PART-A
(Compulsory Question)
(Q Q:)
OR
3 (a) Design a Moore Machine to count number of substrings 101 in a given string over alphabet 5M
E(0, 1).
(b) Let Lbe a set accepted by a NFA show that there exists a DFA hat accepts L. 5M
0 1
q &
Q, are final stales.
Contd. In Page 2
Page 1 of 2
Code: 20A05503 R20
from
(a) Define Chomsky Nornal Form (CNF)? Write procedure to construct equivalent CNF
5M
6
grammar.
5M
(b) Convert the following grammar to Chomsky Normal Form (CNF).
S ABA
A’ aA|¬
B’ bB|¬.
OR
5M
7 (a) Define ambiguous grammar? Show that the following grammar is ambiguous?
S’ aSbS| a | bSaS | b|e
(b) Write the closure properties of context free languages with an example. 5M
10 Design a TM for the language L= (a' b" c|m, n, >= 1). Write the acceptance for the input 10M
string aaabbbbbccc.
OR
11 (a) Discuss in brief about types of Turing Machines (TM). 5M
(b) llustrate post correspondence problem with an example. 5M
Page 2 of 2