JNTU

JNTU B.Tech III AUTOMATA AND COMPILER DESIGN Previous Question Paper (August - 2022 - R13)

B.Tech | III | I | R13 | August - 2022

Answer PaperPaper Code: 115DRMaximum Marks: 75Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Convert the following NFA into an equivalent DFA.

7 marks

Answer

To convert an NFA to a DFA, we use the subset construction algorithm. Given an NFA with states {q0, q1, q2} and transitions, we define the DFA states as subsets of the NFA states. Starting with the epsilon-closure of the initial state, we compute the transition for each input symbol by finding the union of all reachable states in the NFA. For example, if the NFA has transitions δ(q0, a) = {q0, q1}, the DFA state {q0} on input 'a' transitions to the DFA state {q0, q1}. We repeat this process for every newly created subset until no new states are generated. Finally, any DFA state containing an NFA final state is marked as a final state in the DFA.

b

Find the NFA which accepts L(r) where r = (a+bb)*(ba* + b).

8 marks

Answer

To construct an NFA for the regular expression r = (a + bb)*(ba* + b), we use Thompson's construction method by building smaller NFAs for each sub-expression and connecting them using epsilon transitions.

  1. Construct the NFA for (a + bb) by creating a union of the NFA for 'a' and the NFA for 'bb' (a sequence of two 'b' transitions), then apply the Kleene star closure.
  2. Construct the NFA for (ba* + b) by creating a union of the NFA for 'ba*' (a 'b' transition followed by 'a' star closure) and the NFA for 'b'.
  3. Concatenate the NFA from step 1 with the NFA from step 2 using an epsilon transition to represent the concatenation operator.
  4. The resulting NFA will have a start state with an epsilon transition to the Kleene star structure, which then transitions to the final part of the expression, ending in an accepting state.
215 marks
a

Describe the role of lexical analysis in compiler design.

7 marks

Answer

Sign in to view the complete answer paper.

b

Find out FIRST and FOLLOW for the following grammar:

S→1AB | ε
A→ 1AC | 0C
B→ 0S
C→ 1
8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

List the different conflicts that occur in Bottom up parsing and give examples.

7 marks

Answer

Sign in to view the complete answer paper.

b

Construct CLR parsing table for the following grammar:

S → aSA | ε
A → bS | c
8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

What do you mean by attributed grammars? Discuss the translation scheme for converting an infix expression to its equivalent postfix form.

8 marks

Answer

Sign in to view the complete answer paper.

b

What is intermediate code? Explain different types of intermediate code representations.

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Discuss in detail about the specification of simple type Checker.

7 marks

Answer

Sign in to view the complete answer paper.

b

Define a type expression? Explain the equivalence of type expressions with an appropriate example.

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Write about Chomsky hierarchy of languages and recognizers.

8 marks

Answer

Sign in to view the complete answer paper.

b

How do you check the expressions in polymorphic functions? Explain through an example.

7 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Explain the principle sources of code optimization in detail.

8 marks

Answer

Sign in to view the complete answer paper.

b

List the advantages and disadvantages of Static storage allocation strategies.

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Write about the issues in code generation.

7 marks

Answer

Sign in to view the complete answer paper.

b

Describe the various strategies in register allocation.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of AUTOMATA AND COMPILER DESIGN from JNTU for B.Tech IT III I, August - 2022, R13.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in AUTOMATA AND COMPILER DESIGN

Loading Question Papers

Fetching data from database...