Chapter Wise Question Bank (1)
Chapter Wise Question Bank (1)
CHAPTER-2
Question 1 Discuss “Distinguishability” of one string from another and 7 Marks
(2-times)
Question-10 Define mealy machine. Design and mealy machine that gives 4 Marks
output ‘x’ if input of sequence is abb, otherwise z
Question-12 Convert the given Moore machine into Mealy machine. Draw 4 Marks
state transition diagram of Mealy machine.
(i). (0 + 1) ∗ (1 + 00)(0 + 1) ∗
Question-14 Draw Finite automata for following regular expression: 7 Marks
Question-22 Construct the regular expressions for the following languages. 4 Marks
L1 = {Where the no. of ‘a’ is odd}, Σ = {a,b}
L2 = {Where every string starts with ‘0’ and of even length}, Σ =
{0,1}
Question-23 Construct the regular expressions for the following languages. 4 Marks
L1 = {Where every string starts with ‘b’ and does not contain 2
consecutive a’s}, Σ = {a,b}
L2 = {Where every string starts with ‘1’ and of odd length}, Σ =
{0,1}
Question-24 Draw Finite Automata to accept following over input alphabets Σ 7 Marks
={0, 1}
(i) The language accepting strings not ending with ’01’ . (
(ii) iThe language accepting strings next to last symbol
‘0’
Question-25 Convert NFA- Λ to FA for following figure. 7 Marks
Question-26 Design and mealy machine that gives output 1 if input of 4 Marks
sequence abb comes, other wise 0.
Question-27 Find minimum state FA for following figure. 7 Marks
CHAPTER-3 Marks
Question 1 Explain the Pumping Lemma for Context Free Languages. 4 Marks
Question 2 Convert the following grammar to CNF. 7 Marks
S → ABA
A → aA | ϵ
B → bB | ϵ
Question 3 Find context-free grammar for the language: L= {aib j c k | i=j+k} 3 Marks
(2-times)
Question 4 Define Ambiguous grammar. for following grammar say whether 4 Marks
the grammar is ambiguous or not. give reason S→ABA, A→aA |
Λ , B→bB | Λ (2-times)
Question-5 Write Kleen’s Theorem part -1 (3-times) 7 Marks
Question-6 Using kleene's Theorem Draw NFA-Λ for a given RE 4 Marks
aa(ba)*+b*aba*
Question-7 Define Context free grammar & context free language 3 Marks
Question-8 Write CFG for following 4 Marks
(i) L={a ib j c k | i=j or j=k}
(ii) (ii) L={a ib j c k | j>i+k}
Question-9 Convert following CFG to CNF: S -> S(S)/^ 7 Marks
Question-10 Explain types of derivation and ambiguity. 4 Marks
Question-11 Convert following CFG to CNF: 7 Marks
S->aX/Yb X->S/^ Y->bY/b
Question-12 Define type 2 grammar with example 3 Marks
Question-14 Define: CNF. Show the steps to convert CFG into CNF. Convert 7 Marks
the following CFG into equivalent CNF.
S→TU
T → 0T1 | ε
U → 1U0 | ε
CHAPTER-4
Question 1 What are non-CFLs? Give at-least two examples of non-CFLs. 3 Marks
Question 2 Show Bottom Up Parsing of the string “id + id * id” using the 7 Marks
following grammar.
E→E+T|T
T→T*F|F
F → (E) | id
Question 3 Define PDA. State whether a PDA can accept a CFL or not. 3 Marks
Question 4 Discuss the closure properties of CFLs. (2 times) 4 Marks
Question 5 Compare NPDA with DPDA. 3 Marks
Show that if there are strings 𝑥 and 𝑦 in the language 𝐿 so that
𝑥 is a prefix of 𝑦 and 𝑥 ≠ 𝑦, then no DPDA can accept 𝐿 by
Question 6 4 Marks
empty stack.
Question 7 State pumping lemma for regular languages 3 Marks
Question 8 Construct PDA for 4 Marks
S → 0AB
A → 1A | 1
B → 0B | 1A | 0
Trace the string 01011 using PDA
Question 9 Define Push Down Automata (2-times) OR 3 Marks
CHAPTER 5
Question 1 For the given Turing Machine in Table-2, trace the transition for 7 Marks
the strings 1011 and 10101 and identify the language recognized
language 𝐿 = {0 𝑛1 𝑛 : 𝑤ℎ𝑒𝑟𝑒 𝑛 ≥ 1}
Question 4 Draw only the transition table of Turing Machine to accept the 4 Marks
times)
Question-8 Define grammar and Chomsky hierarchy (2-times) 3 Marks
CHAPTER 6
CHAPTER 7
Question 1 Discuss Post’s Correspondence Problem with example. 7 Marks
Question 2 Define the following terms: Recursive language, and Recursive 3 Marks
Enumerable Language.
Question 3 Explain in detail: Class P and Class NP. 4 Marks
Prepared By Approved By
Prof. Palak Vyas Prof. Monika Shah
HOD CE-CSE-IT