0% found this document useful (0 votes)
39 views3 pages

16 - Sessional Test - QP

16_Sessional Test_QP

Uploaded by

phaiml
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views3 pages

16 - Sessional Test - QP

16_Sessional Test_QP

Uploaded by

phaiml
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

ALLENHOUSE INSTITUTE OF TECHNOLOGY, KANPUR

ALLENHOUSE INSTITUTE OF TECHNOLOGY (Polytechnic), KANPUR

Roll Number : ................................................

Alle n h o u s e In s titu te o f Te c h n o lo g y
176, Kulgaon Road, Rooma, Kanpur – 208008 U.P.
Cla s s Te s t – I : Eve n S e m e s te r 2023 -24
Program : B. Tech. CSE Semester : IV
Course Name : Theory of Formal Languages Max. Marks : 30
Course Code : KCS-402 Max. Time : 120 Minutes

CO-1 : Analyse and design finite automata, pushdown automata, Turing machines, formal languages,
and grammars
Section – A (CO - 1 ) # Attempt both the questions # 30 Marks
Q.1 : Attempt any Six questions (Short Answer Type). Each question is of 2 marks.
(2 x 6 = 12 Marks)
a) Describe Finite Automata.
b) Write the difference between DFA and NFA
c) What is clean closure? Describe the properties.
d) Write the MYHILL-NERODE theorem
e) Explain Transition diagram and transition table.
f) Write the steps of transformation of NFA to DFA.
g) What is Acceptance of a string by NFA with €-Transitions.

Q.2 : Attempt any Six questions (Medium Answer Type). Each question is of 3 marks.
(3 x 6 = 18 Marks)
a) Design a DFA which accepts the language
L= {w€(0,1)*/ second symbol of w is”0” and fourth input is 1}
b) Design DFA for the language
L= {(01)i12j/i>=1,j>=1}
c) Design DFA for the language
L= { w€(0,1)*/n1(w)/ mod 3 >1}
d) Design a DFA Which accepts the language L = { w/w has both an even no of 0 s and even no of
1s over alphabet ∑ = {0,1} .
e) Convert the following NFA in to DFA

Q
Q Q
2
Start 0
a 1
b
*
a,b
*
a,b * b b
ALLENHOUSE INSTITUTE OF TECHNOLOGY, KANPUR

ALLENHOUSE INSTITUTE OF TECHNOLOGY (Polytechnic), KANPUR


ALLENHOUSE INSTITUTE OF TECHNOLOGY, KANPUR

ALLENHOUSE INSTITUTE OF TECHNOLOGY (Polytechnic), KANPUR

Roll Number : ................................................


Allenhouse Institute of Technology
176, Kulgaon Road, Rooma, Kanpur – 208008 U.P.
Class Test – II : Even Semester 2022-23
Program : B. Tech. CSE & AIML Semester: IV
Course Name : TAFL Max. Marks : 30
Course Code : KCS-402 Max. Time: 120 Minutes
CO-2 :
CO-3 :
Section – A (CO - 2 ) # Attempt both the questions # 15 Marks
Q.1 : Attempt any Four questions (Short Answer Type). Each question is of 1.5 marks.
(1.5 x 4 = 6 Marks)
a) What do you mean by Regular Grammar?
b) Write the regular expression over alphabet(a,b,c) containing at least one a and at least one b
c) What is pumping lemma for regular languages?
n 2n
d) Prove that L= {0 1 /n>=1} is not regular.
e) Write the regular expression for the language
L = {w: |w| mod 3=0}, w€(a,b)*}
Q.2 : Attempt any THREE questions (Medium Answer Type). Each question is of 3 marks.
(3 x 3 = 9 Marks)
a) Find the regular expression corresponding to fig—
0 1 1
Q1 Q2
0 0 0

Q4 1 Q3 1

b) Construct the €-NFA for the regular expression (0+1)*1(0+1).


c) State and prove Arden’s theorem. Explain its application.
d) Prove that the language L1 and L2 are closed intersection and complementation if they are regular.
e) Find a regular expression corresponding to each of the following subset [0,1]:-
(i) The language of all strings containing at least two 0’s
(ii) The language of all string containing at most two 0’s
(iii) The language of all strings ending with 1 and don’t contain 00.
Section – B (CO-3 ) # Attempt both the questions # 15 Marks
Q.3 : Attempt any Four questions (Short Answer Type). Each question is of 1.5 marks.
(1.5 x 4 = 6 Marks)
a) What do you understand by Inherent ambiguity in Context free Languages (CFL)?
b) Construct CFG for the language L ={wcwR | w€ (a,b)*}.
c) Find the CFG for the language L = {anbm| n+m = odd}. n,m>=0
d) Write the CFG, which generates string of balanced parenthesis.

You might also like