Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

R16 Question Papers Flat

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Code No: 134BD R16

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD


B.Tech II Year II Semester Examinations, April - 2018
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, c as sub questions.
H
PART- A
(25 Marks)
U
1.a) Define DFA. [2]
SE
b) Write about the applications of Finite Automata? [3]
c) If a Regular grammar G is given by SaS/a Find DFA (M) accepting L(G)? [2]
d) Construct a regular grammar for L= {0n11/n>=1}. [3]
e) For the Grammar {SAS/a, ASbA/SS/ba} construct Left most derivation for the
D
string aabbaaa? [2]
f) Define Push Down Automata. [3]
g) What is the purpose of studying Turing Machine? [2]
26
h) Write a Context free grammar for the language {0n1n/n>=1}. [3]
i) Give an example of un decidable problem. [2]
j) Define Post correspondence Problem. [3]
-0
PART-B
(50 Marks)
4-
2.a) Construct Minimum state Automata for the following DFA?
* denotes final state
20
δ 0 1
 Q1 q2 q6
q2 q1 q3
1
*q3 q2 q4
8P
q4 q4 q2
q5 q4 q5
*q6 q5 q4
M
b) Differentiate between NFA and DFA. [6+4]
OR
3.a) Design DFA for the following over {a,b}.
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.
b) Construct a DFA accepting the set of all strings ending with 00? [5+5]
4.a) Define Regular Expression? Explain about the Properties of Regular Expressions.
b) Construct a DFA for the Regular Language consisting of any number of a’s and b’s.
[5+5]
OR
JN
5.a) Construct a DFA for the Regular expression (0+1)* (00+11) (0+1)* .
b) Explain about the identity rules of Regular Expressions. [5+5]
TU
6.a) Define Ambiguous Grammar. Check whether the grammar.
SaAB, AbC/cd, Ccd, Bc/d Is Ambiguous or not?
b) Construct a PDA for the following grammar SAA/a, ASA/b. [5+5]
OR
H
7.a) Show that for every PDA there exists a CFG such that L(G)=N(P).
b) Convert the grammar S0AA, A 0S/1S/0 to a PDA that Accepts the same Language
by Empty Stack. [5+5]
U
8.a) Construct a Turing Machine that will accept the Language consists of all palindromes of
0’s and 1’s?
SE
b) Explain about types of Turing Machine. [5+5]
OR
9.a) Obtain GNF for SAB, ABS/b , BSA/a.
b) Design a Turing Machine for L={0n1m0n1m/m,n>=1}. [5+5]
D
10.a) Discuss in brief about NP Hard problems.
b) Explain about the Decidability and Undecidability Problems. [5+5]
26
OR
11.a) Give an overview of recursively enumerable language.
b) Give the correspondence between P, NP and NP-complete problems. [5+5]
-0
4-
---ooOoo---
20
1 8P
M
Code No: 134BD R16
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JN
B.Tech II Year II Semester Examinations, December - 2018
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
H
carries 10 marks and may have a, b, c as sub questions.

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.
EE+E|E-E|E*E
EE/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
S0S0|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]

8.a) List out and discuss the closure properties of CFL.


D
b) Construct CFG without ε – production from the one which is given below
S → a | Ab | aBa
A→b|ε
17
B→b|A [5+5]
OR
9. Design a Turing Machine to accept L={WcWR | W is in (a+b)*}. [10]
-0
10.a) Discuss in brief about NP Hard problems.
b) Discuss the examples of undecidable problems. [5+5]
5-
OR
11.a) Explain about the undecidable problems about turing machines.
b) Distinguish between class P and class NP Problems. [5+5]
20
---ooOoo---
1 9A
M
Code No: 134BD R16
N
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, November/December - 2020
TU
FORMAL LANGUAGES AND AUTOMATA THEORY
(Common to CSE, IT)
Time: 2 Hours Max. Marks: 75
Answer any Five Questions
H
All Questions Carry Equal Marks
---
U
1.a) Draw the transition diagram for a NFA which accepts all the strings with either two
consecutive 0’s or two consecutive 1’s.
se
b) Define NFA with Epsilon moves. [8+7]

2.a) Write the properties of transition function.


b) Construct DFA accepting the set of all strings with at most one pair of consecutive 0’s
d
and at most one pair of consecutive 1’s. [7+8]
Pa
3.a) Convert regular expression 01*+1 to finite automata.
b) What are the properties of regular expressions? [7+8]

4.a) What are the closure properties of Regular Languages? Explain.


pe
b) Write about the applications of Regular expressions. [7+8]

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]

4.a) Show that L={a2n/n<0} is Regular.


-0
b) Construct a NFA equivalent to the regular expression 10(0+11)0*1. [7+8]

Construct a PDA for L={wcwR /w (0+1)*}


7-
5.a)
b) Explain in brief about decision properties of context free languages. [7+8]
21
6.a) Define Turing Machine. Explain about the Model of Turing Machine.
b) Obtain the Chomsky normal of the following grammar EE+T/T, Ta/CE. [7+8]

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]

3.a) Design Push Down Automata for the language


a
L={wwR | w ε (0+1)*}.
b) Convert the following grammar into a PDA that accepts the language by empty stack
pe
S →0S1|A
A→1A0 |S| ε [7+8]
rs
4.a) Eliminate ε -productions from the grammar G given as
A→ aBb | bBa
B→ aB | bB | ε
Design Turing Machine which will recognize strings containing equal number of 0’s
M
b)
and 1’s. [7+8]
ar
5.a) Convert the following grammar to Greibach Normal Form : S→ SS | 0S1 | 01
b) Explain Decision properties of Context Free Languages. [8+7]
ch
6. Write about the following:
a) Linear-Bounded Automata
b) Recursively enumerable language
20
c) Decidability of PCP. [5+5+5]
2 2
JN

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

Note: i) Question paper consists of Part A, Part B.


TU
ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions.
iii) In Part B, Answer any one question from each unit. Each question carries 10 marks
and may have a, b as sub questions.
H
PART – A
(25 Marks)
U
1.a) Define Kleene Closure and Positive Closure. [2]
b) Write about the applications of Finite Automata. [3]
se
c) Find the simplified regular expression for the following regular expression
r (r*r + r*) + r*. [2]
d) Construct a regular grammar for L= {0n1n1/n>=1}. [3]
d
e) For the Grammar {SAS/a, ASbA/SS/ba} construct Left most derivation for the
string aabbaaa? [2]
f) Define ambiguity in CFG with an example. [3]
pa
g) What is the purpose of studying Turing Machine? [2]
h) Write about the programming techniques for Turing Machines. [3]
i) Define undecidability. Give an example of an undecidable problems. [2]
pe
j) Compare recursive and recursive enumerable languages. [3]

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]

4. Design a FA for the following languages:


a) (0*1*)*
b) (0+1)* 111*
c) (0* 11* + 101). [3+3+4]
OR
5.a) Construct a DFA for the Regular Language consisting of any number of a’s and b’s.
b) Apply pumping lemma for the language L={an/n is prime} and prove that it is not
regular. [5+5]
6.a) Define Ambiguous Grammar. Check whether the grammar.
JN
SaAB, AbC/cd, Ccd, Bc/d is ambiguous or not?
b) Show that for every PDA there exists a CFG such that L(G) = N(P). [5+5]
OR
7. Construct the CFG for the PDA M = ({q0,q1}, {0,1}, {R,Z0}, δ, q0, Z0, Φ ) and δ is
TU
givenby
δ(q0,1,Z0)=(q0,RZ0)
δ(q0,1,R)=(q0,RR)
δ(q0,0,R)=(q1,R)
H
δ(q1,0, Z0)=(q0, Z0)
δ(q0,ε, Z0)=(q0,ε)
δ(q1,1,R)=(q1,ε). [10]
U
8.a) Design a Turing Machine for L={0n1m0n1m/m,n>=1}.
se
b) Define Chomsky Normal Form (CNF). Convert the following grammar to CNF
S0S0|1S1| ε. [5+5]
OR
d
9.a) Explain following:
i) Closure properties of Context Free Languages.
ii) Decision properties of Context Free Languages.
pa
b) Design a Turing machine to recognize all strings consisting of odd numbers of 1’s.
[5+5]
pe
10.a) Discuss in brief about NP Hard problems.
b) Give the correspondence between P, NP and NP-complete problems. [5+5]
OR
11.a) Give an overview of recursively enumerable language.
rs
b) Explain about the Decidability Problems. [6+4]
20
---ooOoo---
23

You might also like