You are on page 1of 4

MALLA REDDY ENGINEERING COLLEGE (AUTONOMOUS)

II B.TECH II SEMESTER REGULAR EXAMINATION

Subject Name : Automata Theory and Compiler Design Branch : IT


Duration: 3 Hours Max Marks : 60

PART-A

Answer all Questions


5*2M=10 Marks
1. Define Recursive definition
2. Design PDA for Language L={0^n1^m/n=2m/n>m}
3. Define Non-Deterministic Turing machine
4. Define Parsing.
5. What is DAG representation?
PART-B

Answer all Questions


5*10M=50 Marks
ALL Questions Carries equal marks
Module –I
1. Construct a DFA that accepts the following language defined over ∑= {0, 1}: L = {w | w
has both an even number of 0’s and even number of 1’s}
(OR)
2. a) Explain about Moore and Mealy machine with notations?
b) Construct NFA for the following regular expression (0+1)* (00+11)
Module –II
3. State pumping lemma for Context Free Language. Apply pumping lemma for following
language and prove that it is not regular L= {an / n is prime}.
(OR)
4. What is a Pushdown Automaton? Construct a Pushdown Automaton for the following
language L = { wwR | w is in (0+1)* }
Module –III
5. a) Define Turing Machine. Explain its model with a neat diagram. Explain ID of a Turing
Machine.
b) Construct a Turing Machine to accept the language {0n1n | n>=1}.

(OR)
6. List ant Explain any 5 Compiler construction Tools.
Module –IV
7. a) Differentiate between LR and LL Parser with examples
b) Discus about bottom-up parser.
(OR)
8. a) Explain Parse Tree and syntax Tree.
b) Discus about simple type checker to identify the identifiers.
Module –V
9. Explain the methods and Algorithms for construction of DAG with example.
(OR)
10. Explain the different methods in Peephole optimization to generate source code.
MALLA REDDY ENGINEERING COLLEGE (AUTONOMOUS)

II B.TECH II SEMESTER REGULAR EXAMINATION

Subject Name : Automata Theory and Compiler Design Branch : IT


Duration: 3 Hours Max Marks : 60

PART-A

Answer all Questions


5*2M=10 Marks
1. Define and Differentiate DFA and NFA
2. Design PDA for language L={a^n b^n/n>=1}
3. Define Church’s Hypothesis.
4. What is LR Parsing?
5.What is the need for Code Optimization?
PART-B

Answer all Questions


5*10M=50 Marks
ALL Questions Carries equal marks
Module –I
1. Convert the following NFA to DFA

(OR)
2. Draw a deterministic and non-deterministic finite automate which accept 00 and 11 at the
end of a string containing 0, 1 in it, e.g., 01010100 but not 000111010.

Module –II
3. a) Explain about pumping lemma for regular sets .Show that L = {ap/p is prime} is not a
Regular

b) Find the regular grammar for the following FA given below


(OR)
4. Explain with example the ambiguity in context free – grammar and Obtain Chomsky form
for the following EE+T/T , Ta/CE

Module –III
5. a) Construct PDA for L={w/w is (a+b)* equal number of a’s and b’s }.Write ID for
aababb?
b) Design a Turing machine which accepts the following languages L= {anbncn | n≥0}.

(OR)
6. List and Explain the Phases of the Compiler.
Module –IV
7. a) Discuss about Top-down parser.
(OR)
8. Explain the Process of Syntax analysis.
Module –V
9. a) Explain the process involved in the basic blocks optimization
b) what is Code improving transformations.
(OR)
10. Explain the issues in design of code generator.

You might also like