R16 Question Papers Flat
R16 Question Papers Flat
R16 Question Papers Flat
PART- A
U
(25 Marks)
1.a) Define the central concepts of Automata Theory. [2]
SE
b) Write down the applications of finite automata. [3]
c) Construct a regular grammar for L= {0n11/n 1}. [2]
d) Explain the applications of the pumping lemma. [3]
e) Define ambiguity in CFG with an example. [2]
D
f) Write short notes on Parse Trees. [3]
g) Construct CFG to generate string with any numbers of 1’s. [2]
h) Write about the programming techniques for Turing Machines. [3]
22
i) Define undecidability. Give an example of an undecidable problems. [2]
j) Write short note on NP-hard problem. [3]
PART-B
-1
(50 Marks)
2.a) Differentiate between NFA and DFA.
b) Design DFA for the following over {a, b}
2-
i) All strings containing not more than three a’s.
ii) All strings that has at least two occurrences of b between any two occurrences of a.
20
[5+5]
OR
3.a) Explain the procedure for converting DFA to NFA.
b) Briefly discuss about Finite Automata with Epsilon- Transitions. [5+5]
1 8A
4.a) Define Regular Expression? Explain about the properties of Regular Expressions.
b) Construct a DFA for the Regular expression (0+1)*(00+11) (0+1)*. [5+5]
OR
5. Design a FA for the following languages
M
a) 0*1*
*
b) (0+1)* 111*
c) (0* 11* + 101) [10]
6.a) Convert the following grammar to a PDA that accepts the language by empty stack
S 0S1|A
JN
A 1A0 |S|€.
b) Show that for every PDA there exists a CFG such that L(G) = N(P). [5+5]
OR
7.a) Derive left and right most derivations for the input string a=b*c+d/e for the given
TU
Grammar.
EE+E|E-E|E*E
EE/E
E(E)|id
H
b) Explain the followings with examples.
i) Sentential Forms
ii) Deterministic Pushdown Automata. [5+5]
U
8.a) Design a Turing Machine to accept the language L={wcwR|w (a+b)*}.
SE
b) Define Chomsky Normal Form (CNF). Convert the following grammar to CNF
S0S0|1S1| [5+5]
OR
9.a) Explain following:
D
i) Closure properties of Context Free Languages.
ii) Decision properties of Context Free Languages.
b) Design a Turing machine to recognize all strings consisting of odd numbers of 1’s. [5+5]
22
10.a) Write the properties of recursive and non-recursive enumerable languages.
b) Let ἐ ={0,1} and A,B be the list of 3 strings each. Verify below PCP has a solution or
not? [5+5]
-1
List A List B
2-
1 wi xi
1 00 0
2 001 11
20
3 1000 011
OR
11.a) Give the correspondence between P,NP and NP-complete problems.
1
b) Define post`s correspondence problem and show that it is undecidable. [5+5]
8A
---ooOoo---
M
Code No: 134BD R16
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, May - 2019
JN
FORMAL LANGUAGES AND AUTOMATA THEORY
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
TU
Note: This question paper contains two parts A and B.
Part A is compulsory which carries 25 marks. Answer all questions in Part A.
Part B consists of 5 Units. Answer any one full question from each unit.
Each question carries 10 marks and may have a, b as sub questions.
H
PART – A
U
(25 Marks)
1.a) Define Kleene Closure and Positive Closure? [2]
SE
b) Define Moore Machine? [3]
c) Define a Regular Expression. [2]
d) Find the simplified regular expression for the following regular expression
r (r*r + r*) + r*? [3]
D
e) Define Context Free Grammar. [2]
f) Define Push Down Automata. [3]
g) Define Turing machine. [2]
17
h) What is Chomsky Normal Form? [3]
i) What is undecidable problem? [2]
j) Compare recursive and recursive enumerable languages. [3]
-0
PART – B
(50 Marks)
5-
2. Construct NFA with ε which accepts a language consisting the strings of any number of
0’s followed by any number of 1’s followed by any number of 2’s And also convert into
NFA without ε transitions. [10]
20
OR
3. Construct the Moore machine to determine residue mod 3 and convert into Mealy
machine. [10]
1
4.a) Test whether the following two FSM’s are equivalent.
9A
M
b) Apply pumping lemma for the language L={an/n is prime} and prove that it is not
regular? [5+5]
OR
5. Construct the regular expression corresponding to the language accepted by following
DFA. [10]
JN
TU
6.a) Elaborate on left most derivation and right most derivation.
b) Design Push down Automata for L = {a2nbn | n ≥ 1} 3. [5+5]
OR
7. Construct the CFG for the PDA M = ({q0,q1}, {0,1}, {R,Z0}, δ, q0, Z0, Φ ) and δ is given
H
by
δ(q0,1,Z0)=(q0,RZ0)
δ(q0,1,R)=(q0,RR)
U
δ(q0,0,R)=(q1,R)
δ(q1,0, Z0)=(q0, Z0)
SE
δ(q0,ε, Z0)=(q0,ε)
δ(q1,1,R)=(q1,ε). [10]
5. Discuss about:
r2
a) Context Free Grammar
b) Left Most Derivation
c) Right Most Derivation. [5+5+5]
8-
6.a) What is unrestricted grammar? Give an example.
b) Explain the language generated by unrestricted grammar. [7+8]
11
7. Write the procedure to convert CFG to PDA and also convert the following CFG to PDA.
S B | aAA
-2
A aBB | a
B bBB | A
C a [15]
02
8.a) Define the classes P and NP problems. Also write brief note on NP-Complete and NP-
Hard Problems.
0
b) Explain about post correspondence problem. [8+7]
AM
---ooOoo---
Code No: 134BD R16
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, July/August - 2021
FORMAL LANGUAGES AND AUTOMATA THEORY
(Common to CSE, IT)
JN
Time: 3 hours Max. Marks: 75
Answer any five questions
All questions carry equal marks
TU
---
1.a) Define Finite Automata. Explain about the model of Finite Automata.
b) Design a NFA for the following language L={0101n where n>0}. [7+8]
H
2.a) Construct Minimum state Automata for the following DFA.
* denotes final state
Δ 0 1
U
q1 q2 q3
q2 q3 q5
se
*q3 q4 q3
q4 q3 q5
*q5 q2 q5
d
b) Explain in detail about Melay and Moore Machines. [8+7]
31
3.a) Construct Finite Automata for the regular Expression 1(01+10)*00?
b) Explain about the Closure Properties of Regular sets. [8+7]
7.a) Construct Turing machine for the languages containing the set of all strings of balanced
AM
paranthesis?
b) Discuss in brief about “church hypothesis”. [8+7]
8.a) What is decidability? Explain in brief about any two undecidable problems.
b) Explain about Universal Turing Machine. [8+7]
---ooOoo---
JN
Code No: 134BD
R16
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, March - 2022
TU
FORMAL LANGUAGES AND AUTOMATA THEORY
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
Answer any five questions
All questions carry equal marks
H
---
1.a) Construct a DFA accepting the set of all strings ending with ‘bb’ over Σ={a,b}.
U
b) Briefly discuss about Finite Automata with Epsilon- Transition.
c) Draw the transition diagram of a FA which accepts all strings of 0’s and 1’s in which
se
the number of 0’s are odd and 1’s are even? [5+5+5]
2.a) Show that the language L = {ww | w ε {a, b}*} is not regular.
dP
b) Write the steps in minimization of FA.
c) Construct finite automata for the regular expression (1*0 +10*). [5+5+5]
7.a) Let Σ = {0,1} and A,B be the list of 3 strings each. Verify if PCP given below has a
TU
solution or not?
List A List B
1 wi xi
1 00 0
H
2 001 11
3 1000 011
U
b) Construct the Regular expression of the following Finite Automata: [7+8]
se
dP
8.a) Explain about the identity rules of Regular Expressions.
b) Construct the CFG for the PDA M = ({q0,q1}, {0,1}, {R,Z0}, δ, q0, Z0, Φ) and δ is
given by:
δ(q0,1,Z0)=(q0,RZ0)
a
δ(q0,1,R)=(q0,RR)
pe
δ(q0,0,R)=(q1,R)
δ(q1,0, Z0)=(q0, Z0)
δ(q0,ε, Z0)=(q0, ε)
δ(q1,1,R)=(q1,ε). [7+8]
rs
---ooOoo---
M
ar
ch
20
2 2
Code No: 134BD R16
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B. Tech II Year II Semester Examinations, April/May - 2023
FORMAL LANGUAGES AND AUTOMATA THEORY
JN
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
PART – B
(50 Marks)
rs
2. Construct NFA with ε which accepts a language consisting the strings of any number of
0’s followed by any number of 1’s followed by any number of 2’s and also convert into
20
NFA without ε transitions. [10]
OR
3.a) Design DFA for the following over {a,b}.
i) All strings containing not more than three a’s.
23
ii) All strings that has at least two occurrences of b between any two occurrences of a.
b) Construct a DFA accepting the set of all strings ending with 00. [6+4]