Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

MID TERM EXAMINATION

FOURTH SEMESTER [B. TECH.] APRIL 2021


Paper Code: ETCS 206 Subject: TOC
Time: 1 Hour 30 Min. Maximum Marks: 30

Note: Attempt any Three questions including Q. No. 1 which is compulsory.

Q1 Answer the following questions: (5*2=10)


a) Differentiate between DFA and NDFA with the help of suitable examples.
b) Define ambiguity in grammar? Can it be removed? if yes, how?
c) Design a DFA to accept all strings over {a,b} which contains even number of a’s and
even number of b’s.
d) Differentiate between mealy and moore machines.
e) Explain the Chomsky Classification of language.
Q2 a) Simplify the grammar: (7)
S→aA, A→aaA/λ, B→bc/bbC, C→B
b) Prove L={abn : n>=0} to be regular using pumping lemma. (3)
Q3 a) Construct a PDA to accept the language L={anb3n: n>=0} (5)
b) Construct the minimum state automata equivalent to finite automata given by (Q0 is the
initial state and Q3,Q4 are final states): (5)
State a b
→Q0 (initial state) Q1 Q2
Q1 Q4 Q3
Q2 Q4 Q3
Q3 (Final state) Q5 Q6
Q4 (Final state) Q7 Q6
Q5 Q3 Q6
Q6 Q6 Q6
Q7 Q4 Q6

Q4 a) Construct the regular expression for the DFA shown below: (5)

b) Find the language for the grammar G=({S}, {a,b}, {S}, {P}) with P given as:
S→aSa/bSb/ λ (5)

You might also like