CD - Question - Bank
CD - Question - Bank
CD - Question - Bank
Question Bank
Year: 2023-2024
UNIT-1(CO-1)
UNIT-2(CO-1)
Sr. Question Marks
No.
1 Write an algorithm for Thompson’s construction method. Apply the 7
algorithm to construct NFA for following regular expression.(a | b)*abb.
2 What is operator grammar? Generate precedence function table for 7
following grammar.
E -> EAE | id
A -> + | *
3 Explain role of lexical analyzer 4
4 Construct NFA for following regular expression using Thompson’s 7
notation and then convert it into DFA. (a/b)*abb#
5 Draw transition diagram for relational operators. 4
6 Explain subset construction method with example. 7
7 Draw DFA for the following regular expression using firstpos( ), 7
lastpos ( ) and followpos ( ) functions. ( a | b) * a
8 Construct DFA for following regular expression without constructing 7
NFA and
optimize the same.
( a | ε )* a b ( a | b )* #
9 Construct a DFA without constructing NFA for the following regular 7
expression.
a(a | b )*ab
UNIT-3(CO-2)
3 What is an activation record? Explain how they are used to access local 7
and global variables.
4 Explain activation tree, control stack, the Scope of Declaration and 7
Bindings of Names.
UNIT-6(CO-3)
Sr. Question Marks
No.