0% found this document useful (0 votes)
81 views6 pages

TOC EXAMNINATION QUESTION Bank

The document outlines the syllabus and exam questions for the III Year I Semester Computer Science Engineering course at Narayana Engineering College for the academic year 2023-24. It includes various topics such as Deterministic Finite Automata (DFA), Non-deterministic Finite Automata (NFA), context-free languages, pushdown automata, and Turing machines, along with specific questions for each unit. Each question is categorized by its corresponding Course Outcome (CO), Bloom's Level (BL), and marks allocation.

Uploaded by

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

TOC EXAMNINATION QUESTION Bank

The document outlines the syllabus and exam questions for the III Year I Semester Computer Science Engineering course at Narayana Engineering College for the academic year 2023-24. It includes various topics such as Deterministic Finite Automata (DFA), Non-deterministic Finite Automata (NFA), context-free languages, pushdown automata, and Turing machines, along with specific questions for each unit. Each question is categorized by its corresponding Course Outcome (CO), Bloom's Level (BL), and marks allocation.

Uploaded by

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

NARAYANA ENGINEERING COLLEGE:: Gudur

DEPARTMENT OF CSE

Class: III Year I Sem Academic Year: 2023-24


Branch: CSE-A,B&C Staff: Mr. N.Kesava Rao

UNIT-I
S.No. Question CO BL Marks
1. Define DFA. Draw the transition graph of the DFA that 1 2 10
accepts the language generated by the regular expression
(a+b)*ba. Process the string abba.
2. Design a DFA that accepts (recognizes) strings containing even 1 2 10
no of a’s and odd no of b’s.

3. (a)Define an NFA. Draw the transition graph and transition 1 2 10


table of NFA that accepts the language generated by the
regular expression (10+01)*1(0+1).process the string 100111
on the machine
4. (a) Design a DFA for accepting the language of strings over 1 2 5
{0,1} that do not contain 10 as substring. Process the string
0011.

(b)Design DFA which accepts language L = {100, 101}. 1 2 5


5. Define NFA-€,convert the following NFA-€ into it’s equivalent 2 10
NFA. Process the string 101010 on both the machines.

6. Define formal definition of Moore and Melay machines. 1 2 10


Convert the following melay machine into equivalent Moore
machine.

7. Convert the following NFA into DFA. 1 2 10


Process the string 0010 on both the machines.
8. Find the equivalent DFA to the following NFA-€.Process the 1 2 10
string 0112 on the both machines.

9. Construct a Mealey machine to calculate 2’s complement for a 1 2 10


given binary number and convert it into its equivalent Moore
machine
10. (a) Explain the Chomsky Hierarchy of Grammars 1 2 5
(b) State and explain Myhill Nerode theorem. 1 2 5
11. . Construct a Moore machine that is equivalent to the Mealy 1 2 10
machine given below.
Present state Next state

a=0 a=1

State Output State Output

q0 q3 0 q11 1

q10 q0 1 q3 0

q11 q0 1 q3 0

q20 q21 1 q20 0

q21 q21 1 q20 0

q3 q10 0 q0 1

12. Design a minimal DFA over the alphabet ∑ = {0,1} to accept 1 2 10


the language L={w/w≡ 0 mod 3}.

UNIT-II

S.No. Question C B Mar


O L ks
1. (a) State and prove Arden’s theorem? 2 2 5
(b) Construct the regular expression for the following FA using 2 2 5
Arden’s theorem.
2. (a) List and explain the algebraic properties of regular expressions. 2 2 5
(b) Explain the applications of regular expressions. 2 2 5
3. State pumping lemma for regular languages and prove that the 2 2 10
following languages
are not regular by using pumping lemma.
(i) L = {ap | where p is a prime}.
(ii) L = { an bn | n>0 }
4. List the closure properties of Regular Languages. 2 2 10
5. Prove that the family of regular languages is closed under the following
2 operations:
2 10
(a) Union
(b) Intersection.
(c) Complementation
(d) Reversal.
(e) Concatenation
6 Find the regular Expression for the language recognized by the 2 2 10
following FA.

7 Find regular expressions representing the following sets: 2 2 10


(i) The set of all strings over {0, 1} having at most one pair of 0’s
or at most one pair of 1’s.
(ii) The set of all strings over {0, 1} beginning with 00
8 Write the procedure for checking the equality of two FAs 2 2 10
Check whether the following two FAs are equal or not.
9 convert the regular expression (a+b)*abb directly in to an DFA 2 2 10
10 Prove that the following regular expressions are equivalent. 2 2 10
L1=(a+b)*
L2=a*(b*a)*
11 Construct a regular grammar for the regular expression. 2 2 10
a*(a+b)b*

12 Convert the following regular grammar into finite automata. 2 2 10


S→aA/bB/a/b
A→aS/bB/b
B→aA/bS

UNIT-III

S.No. Question CO BL Marks


1. Write and explain closure properties of CFL’s. 3 2 10
2. Let G be the grammar S→0B/1A, A→0/0S/1AA, 3 2 10
B→1/1S/0BB
For the string 00110101, find: (i) The leftmost
derivation. (ii) The rightmost derivation. (iii) The derivation
tree
3 Let G be S→AB,A→a,B→C/b,C→D,D→E and E→a 3 2 10
Eliminate unit productions and get an equivalent
grammar.

4 Write the procedure to convert a given CFG into equivalent 3 2 10


grammar in CNF. Apply the procedure and convert the
grammar with following production into CNF
S→┐S/[S+)S]/p/q

5 Convert the grammar into GNF: 3 2 10


S→ABb|a, A→aaA| B, B→bAb
6 Define Chomsky Normal Form, convert the following 3 2 10
grammar into CNF:
S→bA|aB; A→bAA|aS|a; B→aBB|bS|a.
7 Define leftmost and rightmost derivations. Find out the 3 2 10
leftmost, rightmost derivations and draw the
corresponding derivation trees for the string (a+a)*a in the
following grammar.
E-->E+T/T
T-->T*F/F
F-->(E)/A
8 Find right linear grammar generating the language recognized 3 2 10
by the following FA
9 What is meant by ambiguous CFG? Show that the following 3 2 10
grammar is an Ambiguous Grammar.
E->E+E/E*E/(E)/id.
for the sentence
i) id + id * id ii) (id)+(id)*(id)
10 Show that L={a b c where n≥1} is not context free.
n n n
3 2 10

UNIT-IV

S.No. Question CO BL Marks


n 2n
1. Design DPDA for language L={a b /n>0} 4 2 10
2. Convert the following context free grammar to push down 4 2 10
automata.

S→0A
A→0ABC/1B/0
B→1
C→2
3. Define a PDA and language of a PDA. Construct a PDA for 4 2 10
the following language.

L= {ai bj ck / i, j, k>0 and j=i+k}

Show the moves of the PDA for the string aabbbbcc using
instantaneous description.
4. L= {an bm cn / m, n>0 } 4 2 10
Construct a PDA for the above Language.
5 Design a NPDA for accepting the string L={(set of all 4 2 10
palindromes over a,b)} by the empty stack and by the final
state.

6 Convert the following PDA into its equivalent CFG. The 4 2 10


transition function is defined as:
δ(q0 ,0 ,Z0) = {(q0 ,0Z0)}
δ(q0 ,0 ,0) ={ ( q0 ,00)}
δ(q0 ,1 ,0) = { (q1 , ε)}
δ(q1 ,1 ,0) = { (q1 , ε)}
δ (q1 , ε, Z0)={ (q2 , ε)}
7 Explain Graphical notation for PDA with an example 4 2 10
8 Explain functioning of Two stack PDA 4 2 10
9 What do you mean by an instantaneous description of a 4 2 10
PDA. Explain with example.
10 (a) Explain the differences between a PDA and FA. 4 2 10
(b) Distinguish between a DPDA and NPDA. 4 2 10
11 Construct a PDA that recognizes strings of type 0n1m | 4 2 10
n>m using final state.

UNIT-V

S.No. Question CO BL Marks


Design a TM to accept the language L={a b , n≥1}.Show an
n n
5 2 10
ID for the string ‘aaabbb’ with tape symbols.
1. Define TM and Language accepted by a TM . Design a TM 5 2 10
for recognizing the language (a+b)*aba(a+b)*. Draw it’s
transition diagram and table.using the instantaneous
description. Process the string “aabaabaaab”.
2. Expalin about Instantaneous description of Turing machine
with an example.
3. Explain the concept of Universal Turing Machine. 5 2 10
4. Design a Turing machine to recognize the language {1n 2n 3n 5 2 10
/n>=1}
5. Write short notes on the following 5 2 10
(a)Universal Turing machine
(b) the halting problem of TM.
6. Explain about LBA and Context Sensitive Languages . 5 2 10
7. Explain types of Turing machine in detail. 5 2 10
8. Explain about Church’s Hypothesis. 5 2 10
9. Explain about Properties of Recursively Enumerable 5 2 10
Languages.
10. Explain about different types of grammers using Chomsky 5 2 10
hierarchy.

You might also like