Acd Q
Acd Q
Subject with Code: AT & CD(20CS0903) Course & Branch: B.Tech – CSM,CIC
Year &Sem: III-B.Tech & I-Sem Regulation: R20
UNIT –I
FINITE AUTOMATA AND REGULAR LANGUAGES
1 a Consider the below finite automata and check whether the strings are [L1][CO1] [8M]
accepted or not
3 a Write the process of conversion from NFA with ε moves to DFA. [L4][CO3] [4M]
b Convert the following NFA with ε moves to DFA. [L6][CO2] [8M]
1 a Analyze and explain with example Chomsky Hierarchy of Languages [L4][CO1] [6M]
b Define the following terms: [L1][CO4] [6M]
i) Useless symbol
ii) Null production
iii) Unit productions
2 a Describe what is meant by Simplifying the Grammar. [L2][CO4] [4M]
b Evaluate simplification of the following context free grammar. [L5][CO4] [8M]
S Aa /B
B a/bc
C a / ϵ
3 Interpret simplification of the given grammar. Simplify the following [L5][CO4] [12M]
CFG
S aSb SA AcAd Acd
4 a Remove the unit production from the grammar [L3][CO4] [6M]
SAB AE BC CD Db Ea
b Remove ϵ productons from the grammar [L3][CO4] [6M]
SABaC ABC Bb/ ϵ CD/ϵ Dd
5 a Write the process adapted to convert the grammar into CNF? [L2][CO4] [4M]
b Convert the following grammar into CNF. [L3][CO4] [8M]
S bA/aB
AbAA/aS/a
BaBB/bS/a.
6 a State Pumping lemma for Context-free language [L1][CO4] [4M]
b Show that L = {anbncn , where n>=1} is not context free. [L3][CO4] [8M]
7 a State Turing machine. [L1][CO6] [4M]
b Construct a TM for regular Expression 01(00+11)(0+1)*1. [L6][CO6] [8M]
8 Explain the various types of Turing machine. [L2][CO6] [12M]
9 a Differentiate PCP and MPCP. [L4][CO6] [4M]
b Find the PCP solution for the following sets. [L5][CO6] [8M]
A B
10 101
01 100
0 10
100 0
1 010
10 a State the formal of PDA. [L1][CO5] [4M]
b Construct an equivalent PDA for the following CFG. [L6][CO5] [8M]
SaAB | bBA
AbS|a
BaS | b.
Course Code: 20CS0903 R20
UNIT –III
LEXICAL ANALYSIS AND TOP DOWN PARSING
b Construct the DAG for the following basic blocks [L6][CO6] [8M]
1. t1:=4*i
2. t2:=a[t1]
3. t3:=4*i
4. t4:=b[t3]
5. t5:=t2*t4
6. t6:=prod+t5
7. prod:=t6
8. t7:=i+1
9. i:=t7
if i<=20 goto 1
Prepared by:
1. B Pavan kumar
Assoc. Prof./CSE