CS3452 - TOC - QB New - V2
CS3452 - TOC - QB New - V2
CS3452 - TOC - QB New - V2
5. CO2 K3
1 2 3
2
Construct a Minimum state Automata for a given Transition Diagram.
(13 Marks)
7. CO2 K3
5. CO2 K3
UNIT II
Q. CO’ Bloom’s
Questions Level
No s
Give the regular expression for the following
L1= set of all strings of 0 and 1 ending in 00
1. CO3 K2
L2= set of all string 0 and 1 beginning with 0 and ending
with 1
Let L = {w|w ε {0,1}* w does not contain 00 and is not
2. empty}. Construct a regular expression that generates CO3 K2
L.
Write a regular expression to denote a language L which
3. accepts all the strings which begin or end with either 00 CO3 K2
or 11.
4. List the applications of pumping lemma? CO3 K2
5. State the Pumping lemma for regular languages. CO3 K1
6. Define closure properties of regular languages. CO3 K1
Write the expression for the language starting with and has
7. CO3 K1
no consecutive b’s
Construct a r.e for the language which accepts all strings with
8. CO3 K2
atleast two c‟ s over the set Σ={c,b}
Regular expression denoting a language over Σ ={1} having
9. CO3 K2
(i)even length of string (ii)odd length of a string
10. What is: (i) (0+1) * (ii)(01) * (iii) (0+1) (iv) (0+1) + CO3 K2
Prove that the complement of a regular language is also
11. CO3 K2
regular.
12. Is regular set is closed under complement? Justify. CO3 K2
13. Name any four closure properties of regular languages CO3 K2
14. Define closure property of regular sets. CO3 K1
15. What is the relationship between FA and regular expression? CO3 K1
Part – B
Construct finite automata equivalent to the regular
1. CO3 K3
expression (ab+a) *. (13 Marks)
State the pumping lemma for regular languages. Prove
2. that L = {0i2/ i is an integer; i ≥1} is not regular. (13 CO3 K3
Marks)
Convert the following DFA into Regular expression. (13
Marks)
3. CO3 K3
3. CO3 K3
Unit – III
Q. CO’ Bloom’s
Questions Level
No s
Construct a CFG over {a,b} generating a language
1. CO4 K2
consisting of equal number of a’s and b’s.
Consider the alphabet Σ = {a,b,(,),+,*,-, . ,ξ }.
2. Construct a CFG that generate all the strings in Σ* that CO4 K2
are regular expression on the alphabet, Σ.
Find LMD for the following grammar.
3. w = 00110101 S => 0B / 1A A => 0/0S/1AA CO4 K2
B=> 1/1S/0BB
Write the CFG for the following CFL L(G) = { /
4. CO4 K2
m+n=p, m&n>1}
5. Define CFG. Give an example CO4 K1
6. What is derivation? CO4 K1
7. What is parse tree (or) derivation tree? CO4 K1
8. Define sentential form CO4 K1
9. Define PDA. CO4 K1
Construct a PDA that accepts the language generated
10. by the grammar CO4 K2
S → aSbb
S → aab
11. Define the language accepted by final state in PDA. CO4 K1
Is it true that non – deterministic PDA is more powerful
12. CO4 K1
that n deterministic PDA? Justify?
What are the different ways of language acceptance by
13. CO4 K1
a PDA and define them?
Classify the grammar based on Noam Chomsky
14. CO4 K1
Hierachy.
15. Construct a grammar for the language L={an | n is Odd} CO4 K2
Part – B
Convert the following CFG into PDA using empty stack.
(13 Marks)
1. SaB/bA CO4 K3
AbAA/aS/a
BaBB/bS/b
Find LMD & RMD, parse tree for the following grammar.
(13 Marks)
2. w = 00110101 S => 0B / 1A CO4 K3
A => 0/0S/1AA
B => 1/1S/0BB
Construct the PDA for the language L={anbman/n,m
3. CO4 K3
>=1} accepted by empty stack. (13 Marks)
Show that the grammar w = abab is ambiguous. (13
Marks)
4. CO4 K3
S => a / abSb / aAb
A => bS / aAAb
Write a grammar to recognize all prefix expressions
involving all binary arithmetic operators. Construct the
5. CO4 K3
parse tree for the sentence “-*+abc/dc” from your
grammar. (13 Marks)
Let M= ({q0, q1}, {0,1}, {x, z0}, δ, q0, z0, ф) (13 Marks)
Where δ is given by
δ(q0,0, z0) = (q0,x z0)
6. δ(q1,1,x) = (q1,ξ) CO4 K3
δ(q0,0,x) = (q0,xx)
δ(q1, ξ ,x) = (q1, ξ)
δ(q0,1,x) = (q1, ξ)
δ(q 1, ξ, z0) = (q1, ξ)
7. Construct the PDA for the language {WWR/(0+1) *} CO4 K3
accepted by empty stack. (13 Marks)
Convert the PDA P={(p,q),{0,1},{x, z 0},δ,q, z0} to a CFG
if δ is given by (13 Marks)
δ(q,1, z0) = (q,xz0)
8. δ(q,1,x) = (q,xx) CO4 K3
δ(q,0,x) = (p,xx)
δ(q,ξ , z0) = (q, ξ)
δ(p,1,x) = (p, ξ)
δ(p,0, z0) = (q, z0)
Part- C
Design and explain the following grammar into equival-
ent one with no unit production and no useless symbols.
(15 Marks)
S A|CB
1. CO4 K3
A C|D
B 1B|1
C 0C|0
D 2D|2
(i)Construct PDA for the Language {WCWR | W ε {0,1} (8
Marks)
2. (ii)Construct a PDA by empty stack for the language {a m CO4 K3
bm cn| m, n >= 1}. (7 Marks)
(i) Convert the following CFG to PDA and analyse the an-
swer (a+b) and a++.
I a|b|Ia|Ib|I0|I1
3. E I|E+E|E*E|(E) (8 Marks) CO4 K3
(ii) Construct a PDA empty store, L= {ambn |n<m}. (7
Marks)
(i) Find PDA the accept the given CFG
S→XaaX
4. CO4 K3
X→aX |bX|ε (8 Marks)
ii) Design a PDA for even length palindrome. (7 Marks)
Solve the following grammar
S aB|bA
A a|aS|bAA
B b|bS|aBB for the string “baaabbabba”
5. CO4 K3
Give
i) Leftmost derivation (5 Marks)
ii) Rightmost derivation (5 Marks)
iii) Derivation Tree (5 Marks)
Unit – IV
Q. CO’ Bloom’s
Questions Level
No s
1. Give the general forms of CNF. CO5 K1
2. Name any four closure properties of Regular languages. CO5 K1
3. State the two normal forms and give an example. CO5 K1
Convert the following grammar G in greibach normal
4. form. CO5 K2
S ABb|a A aaA|B B bAb
Is the language L={a b c | n>=1} is context free?
n n n
5. CO5 K2
Justify.
Let G = ( {S,C}, {a,b}, P,S} where P consists of S aCa,
6. CO5 K2
CaCa, Find L(G))?
What is the language generated by the grammar
7. CO5 K2
G=(V,T,P,S) where P={S->aSb, S->ab}?
8. What is Turing Machine? CO5 K1
What are the required fields of an instantaneous
9. CO5 K1
description or configuration of a TM?
10. What is multiple tracks Turing machine? CO5 K1
11. What is Universal Turing machine? CO5 K1
12. List out the different techniques for TM construction. CO5 K1
13. Name any four closure properties of Regular languages. CO5 K1
Construct a grammar for the language L which has all
14. CO5 K1
the strings which are all palindrome over ={a, b}.
15. Define multi-tape TM. CO5 K1
Part – B
State that pumping lemma for regular sets and show
1. that the regular set L = {0 n2 / n≥1} or L= {0k / k=i2, i ≥ CO5 K3
1} is not context free. (13 Marks)
State that pumping lemma for regular sets and show
2. that the regular set L = {WW R /W is a set of input string CO5 K3
{0,1} or {a,b} } is context free. (13 Marks)
Convert the following Grammar into CNF: (13 Marks)
S=> a | aA | B
3. CO5 K3
A=>aBB | ε
B=>Aa | b
Convert the following Grammar into GNF: (13 Marks)
4. S=>AB CO5 K3
A=>BS | b
B=>SA | a
Construct the turing machine for the following language.
5. (13 Marks) CO5 K4
L = {anbn/n≥1}
Construct the TM to perform the addition operation for
6. CO5 K4
the following integer function. f(x,y) =x+y. (13 Marks)
Construct a TM to compute the proper subtraction. (13
7. CO5 K4
Marks)
Design a Turing machine to check whether the given
8. CO5 K4
input is prime or not using multiple tracks. (13 Marks)
Part- C
Illustrate the Chomsky grammar classification with
1. CO5 K4
necessary example. (15 Marks)
Design the various programming techniques of turing
2. CO5 K4
3. CO5 K4
b} +}. (15 Marks)
(i)Test and explain a TM to compute f (m, n) = m*n, for
all m, n €N. (8 Marks)
4. (ii) Explain how a multi-track in a TM can be used for CO5 K4
testing give n positive integer is a prime or not. (7
Marks)
Construct a Turing Machine to accept palindromes of
5. even length in an alphabet set∑= {a, b}. Trace the CO5 K4
strings “abab”and“baab”.(15 Markss)
Unit – V
Q. CO’ Bloom’s
Questions Level
No s
When a problem is said to be decidable and give an
1. CO6 K1
example of undecidable problem.
Give two properties of recursively enumerable sets
2. CO6 K1
which are undecidable.
3. Show that union of recursive language is recursive CO6 K1
When a language is said to be recursive or recursively
4. CO6 K1
enumerable?
5. When do you say a problem is NP-hard? CO6 K1
6. List the time and space complexity in P and NP problem. CO6 K1
7. When is NP problems hard and complete? CO6 K1
Is travelling salesman problem a NP or P problem?
8. CO6 K1
Justify.
9. Mention the difference between P and NP problems. CO6 K1
Differentiate Recursive language and Recursive
10. CO6 K1
Enumerable language.
11. Give example for NP Complete problems. CO6 K1
12. Define Universal Turing Machine. CO6 K1
13. List the features of Universal Turing machine? CO6 K1
14. It is true that every regular set is not recursive? CO6 K1
15. Show that complement of a recursive language is CO6 K1
recursive.
Part – B
Let Σ = {0, 1}. Let A and B be strings. Find the instance
of PCP.
(13 Marks)
1. List A List B CO6 K2
I wi xi
1 1 111
2 10111 10
3 10 0
If L1 and L2 are Recursively Enumerable languages,
2. prove that Union of L1 and L2 is also Recursively CO6 K2
Enumerable (13 Marks)
Prove that If a language L and its complement L are both
3. CO6 K2
recursively enumerable, then L is recursive. (13 Marks)
Explain Recursive and Recursively enumerable
4. CO6 K2
languages with suitable example. (13 Marks)
Explain Class P and NP Problems with suitable example.
5. CO6 K2
(13 Marks)
Explain the Halting problem. Is it decidable or
6. CO6 K2
undecidable problem? (13 Marks)
7. Explain PCP with example? (13 Marks) CO6 K2
8. Prove the properties of Recursive Languages. (13 Marks) CO6 K2
Part- C
Prove and explain that the halting problem is
1. CO6 K2
undecidable. (15 Marks)
Prove that the universal language is recursively
2. enumerable but not recursive. Generalize your answer. CO6 K2
(15 Marks)
Consider and find the languages obtained from the
following operations:
(i) Union of two recursive languages.
(5 Marks)
3. (ii) Union of two recursively enumerable languages. CO6 K2
(5 Marks)
(iii) L if L and complement of L are recursively
numerable. (5 Marks)
(i)Compare and write about tractable and intractable
problems with an example. (10 Marks)
4. (ii)Explain the language Lu and show that Lu is RE CO6 K2
language. (5 Marks)
Prove that Post Correspondence Problem is undecidable.
5. CO6 K2
(15 Marks)