JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

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

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

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

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Convert the following Mealy Machine into an equivalent Moore Machine. (figure 1)

8 marks

Answer

To convert a Mealy machine to a Moore machine, we split states based on the output associated with incoming transitions. If a state q has multiple incoming transitions with different outputs, we create multiple versions of q (e.g., q/0 and q/1) to ensure the output is consistent for every state in the Moore machine.

1. Identify all unique (state, output) pairs from the Mealy machine transitions.

2. Create a new state in the Moore machine for each unique pair.

3. For each new state, define the output as the output component of the pair.

4. For each transition in the original Mealy machine from state q to state p with input 'a' and output 'x', create a transition in the Moore machine from the state representing (q, any) to the state representing (p, x) with input 'a'.

5. If the initial state of the Mealy machine has no incoming transitions, create a new initial state with a default output, or if it does, ensure the Moore machine initial state reflects the output produced by the Mealy machine's initial transitions.

b

Convert the following NFA into equivalent DFA.

7 marks

Answer

The conversion of an NFA to a DFA uses the subset construction algorithm (also known as powerset construction) to track all possible states the NFA could be in after a specific input sequence.

1. Start State: The start state of the DFA is the epsilon-closure of the NFA's start state.

2. Transition Function: For each DFA state (which is a set of NFA states) and each input symbol 'a', the new DFA state is the epsilon-closure of the union of all NFA states reachable from the current set on input 'a'.

3. Final States: Any DFA state that contains at least one final state from the original NFA is marked as a final state in the DFA.

4. Iteration: Repeat the transition process for all new sets of states until no new sets are created. If a set of states has no transitions for an input, it maps to a dead state (trap state).

215 marks
a

Construct Moore for the input from (0+1)* that give residue modulo 4 of input treated as binary.

7 marks

Answer

Sign in to view the complete answer paper.

b

Construct the minimum state automata equivalent to the following. (figure 2)

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Describe the following sets by regular expressions:

i) The set of all strings of a's and b's beginning with 'aa'

ii) The set of all strings of a's and b's beginning with 'b' and ending with 'aa'

iii) The set of all strings of a's and b's with atleast two consecutive a's

8 marks

Answer

Sign in to view the complete answer paper.

b

State pumping lemma for regular languages. Prove that the following language {an | n is a prime number} is not regular.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Construct the NFA with ε transition for the following expression (0+1)*00(0+1)*

8 marks

Answer

Sign in to view the complete answer paper.

b

Construct the regular expression for the following finite automata. (figure 3)

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Find CFG for the language L = { ai bj ck | i=j }.

8 marks

Answer

Sign in to view the complete answer paper.

b

Let G be the grammar S→aB | bA, A→a | aS | bAA, B→b | bS | aBB. Find a Right most derivation for the string “aaabbabbba” and also draw the derivation Tree.

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Design a PDA for the following language L = { 0n 12n | n≥1 }.

7 marks

Answer

Sign in to view the complete answer paper.

b

Construct the CFG for the PDA M = ({q0,q1}, {0,1}, {R,Z0}, δ, q0, Z0, Φ ) where δ 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,ε)
8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Convert the following grammar to Greibach Normal Form:

S→ABA | AB | BA | AA | B

A→aA | a

B→bB | b

8 marks

Answer

Sign in to view the complete answer paper.

b

Reduce the following grammar such that there are no unit productions:

S → AA

A → B | BB

B → abB | b | bb

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Design a Turing Machine to accept the language L = { WCWR | w in (0+1)* }.

8 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about Post Correspondence Problem.

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