JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II Year FORMAL LANGUAGES AND AUTOMATA THEORY Previous Question Paper (April/May - 2023 - R16)

B.Tech | II Year | II Semester | R16 | April/May - 2023

Answer PaperPaper Code: 134BDMaximum Marks: 75Time: 3 Hours

Question paper consists of Part A, Part B. Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.

Part A

1.a

Define Kleene Closure and Positive Closure.

2 marks

Answer

Kleene Closure of a language L, denoted by L*, is the set of all strings formed by concatenating zero or more strings from L. It is defined as L* = ∪i≥0 Li, where L0 = {ε}.

Positive Closure of a language L, denoted by L+, is the set of all strings formed by concatenating one or more strings from L. It is defined as L+ = ∪i≥1 Li, which is equivalent to L* - {ε}.

1.b

Write about the applications of Finite Automata.

3 marks

Answer

Finite Automata (FA) are fundamental models in computer science used for recognizing regular languages and designing systems with finite states. Key applications include:

  • Lexical Analysis: Compilers use FA to scan source code and identify tokens such as keywords, identifiers, and operators by matching patterns defined by regular expressions.
  • Text Processing and Pattern Matching: Algorithms like KMP or grep utilities use finite automata to efficiently search for specific patterns or strings within large datasets or documents.
  • Protocol Verification: FA are used to model and verify communication protocols and hardware circuits to ensure they transition correctly between states and avoid deadlock or undefined behavior.
  • Natural Language Processing: They are applied in morphological analysis, such as identifying the roots of words or checking spelling by verifying if word structures conform to predefined rules.
1.c

Find the simplified regular expression for the following regular expression

r (r*r + r*) + r*
.

2 marks

Answer

Sign in to view the complete answer paper.

1.d

Construct a regular grammar for

L= {0^n 1^n | n >= 1}
.

3 marks

Answer

Sign in to view the complete answer paper.

1.e

For the Grammar

{S -> AS/a, A -> SbA/SS/ba}
construct Left most derivation for the string aabbaaa?

2 marks

Answer

Sign in to view the complete answer paper.

1.f

Define ambiguity in CFG with an example.

3 marks

Answer

Sign in to view the complete answer paper.

1.g

What is the purpose of studying Turing Machine?

2 marks

Answer

Sign in to view the complete answer paper.

1.h

Write about the programming techniques for Turing Machines.

3 marks

Answer

Sign in to view the complete answer paper.

1.i

Define undecidability. Give an example of an undecidable problems.

2 marks

Answer

Sign in to view the complete answer paper.

1.j

Compare recursive and recursive enumerable languages.

3 marks

Answer

Sign in to view the complete answer paper.

Part B

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 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
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.

6 marks

Answer

Sign in to view the complete answer paper.

b

Construct a DFA accepting the set of all strings ending with 00.

4 marks

Answer

Sign in to view the complete answer paper.

4

Design a FA for the following languages: a)

(0* 1*)*
b)
(0+1)* 111*
c)
(0* 11* + 101)
.

10 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Construct a DFA for the Regular Language consisting of any number of a’s and b’s.

5 marks

Answer

Sign in to view the complete answer paper.

b

Apply pumping lemma for the language

L={a^n | n is prime}
and prove that it is not regular.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Define Ambiguous Grammar. Check whether the grammar S->aAB, A->bC/cd, C->cd, B->c/d is ambiguous or not?

5 marks

Answer

Sign in to view the complete answer paper.

b

Show that for every PDA there exists a CFG such that L(G) = N(P).

5 marks

Answer

Sign in to view the complete answer paper.

OR
7

Construct the CFG for the PDA M = ({q0,q1}, {0,1}, {R,Z0}, δ, q0, Z0, Φ) and δ is given by

δ(q0,1,Z0)=(q0,RZ0), δ(q0,1,R)=(q0,RR), δ(q0,0,R)=(q1,R), δ(q1,0, Z0)=(q0, Z0), δ(q0,ε, Z0)=(q0,ε), δ(q1,1,R)=(q1,ε)
.

10 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Design a Turing Machine for

L={0^n 1^m 0^n 1^m | m,n >= 1}
.

5 marks

Answer

Sign in to view the complete answer paper.

b

Define Chomsky Normal Form (CNF). Convert the following grammar to CNF

S->0S0|1S1| ε
.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Explain following: i) Closure properties of Context Free Languages. ii) Decision properties of Context Free Languages.

5 marks

Answer

Sign in to view the complete answer paper.

b

Design a Turing machine to recognize all strings consisting of odd numbers of 1’s.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Discuss in brief about NP Hard problems.

5 marks

Answer

Sign in to view the complete answer paper.

b

Give the correspondence between P, NP and NP-complete problems.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Give an overview of recursively enumerable language.

6 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the Decidability Problems.

4 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of FORMAL LANGUAGES AND AUTOMATA THEORY from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CSE II Year II Semester, April/May - 2023, R16.

For the question paper without answers, switch to the Question Paper tab.

Other papers in FORMAL LANGUAGES AND AUTOMATA THEORY

Loading Question Papers

Fetching data from database...