JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III FORMAL LANGUAGES AND AUTOMATA THEORY Previous Question Paper (September - 2021 - R18)

B.Tech | III | I | R18 | September - 2021

Answer PaperPaper Code: 155BKMaximum Marks: 75Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Convert the given NFA to DFA.

8 marks

Answer

To convert an NFA to a DFA, use the subset construction algorithm (also known as powerset construction). The steps are as follows:

  1. Identify the start state of the DFA, which is the epsilon-closure of the NFA start state.
  2. For each DFA state (which represents a set of NFA states) and each input symbol, compute the set of reachable NFA states. This set forms a new state in the DFA.
  3. Repeat the process for all newly created DFA states until no new sets are generated.
  4. A state in the DFA is an accepting state if it contains at least one accepting state from the original NFA.
b

Construct a DFA to accept the binary strings consisting of even number of 0’s and odd number of 1’s.

7 marks

Answer

To accept binary strings with an even number of 0s and an odd number of 1s, define four states representing the parity of 0s and 1s: q0 (even 0s, even 1s), q1 (even 0s, odd 1s), q2 (odd 0s, even 1s), and q3 (odd 0s, odd 1s).

The transitions are defined as follows:

δ(q0, 0) = q2, δ(q0, 1) = q1
δ(q1, 0) = q3, δ(q1, 1) = q0
δ(q2, 0) = q0, δ(q2, 1) = q3
δ(q3, 0) = q1, δ(q3, 1) = q2

Here, q0 is the start state, and q1 is the final state because it represents the condition of having an even number of 0s (0 is even) and an odd number of 1s.

215 marks
a

Construct a DFA to accept the binary strings divisible by 5.

7 marks

Answer

Sign in to view the complete answer paper.

b

Eliminate the ε-transitions of the given NFA.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Prove that Regular Languages are closed under i) Reverse ii) Union.

7 marks

Answer

Sign in to view the complete answer paper.

b

Identify the regular expression accepted by the given DFA.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Prove that L={WWr | W is a binary string} is not a regular language.

7 marks

Answer

Sign in to view the complete answer paper.

b

Construct a DFA accepting language represented by (0+1)* (00+11) (0+1)*.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Construct a PDA to accept the binary strings consists of number of 0’s not equal to number of 1’s.

7 marks

Answer

Sign in to view the complete answer paper.

b

Construct a PDA to accept the language generated by the following CFG: S→Aab, A→Aab|b.

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Construct a PDA to accept the following language L= {anbn | n>0}.

8 marks

Answer

Sign in to view the complete answer paper.

b

Construct a CFG to generate the binary strings consisting the number of 0’s is equal to the twice the number of 1’s. (Example: 010, 001010).

7 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Convert the following grammar into CNF: S→aSa | bSb | a | b | aa | bb.

8 marks

Answer

Sign in to view the complete answer paper.

b

Simplify the following CFG: S→aA|aBB, A→Aaa|ε, B→bB|bbC, C→b.

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Construct a Turing Machine to accept the language L = { anbncn | n≥1}. Give its state Transition table and diagram. Check the machine by tracing a suitable instance.

7 marks

Answer

Sign in to view the complete answer paper.

b

Design a TM which subtracts two unary numbers, i.e., m-n where m≥n.

8 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 III I, September - 2021, R18.

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...