Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CS3452 - TOC - QB New - V2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Department of Computer Science and Engineering

Second Year / Fourth Semester


CS3452 Theory of Computation
Question Bank
Unit – I
Q. CO’ Bloom’s
Questions Level
No s
Design DFA to accept the strings over {0,1} with two
1. CO2 K2
consecutive 0’s.
2. Define deductive proof. CO1 K1
3. Define Deterministic Finite Automata. CO2 K1
4. Define Non-Deterministic Finite Automata. CO2 K1
5. What is proof by contradiction? CO1 K1
6. Define hypothesis. CO1 K1
Prove 1+2+3+………………+n= n(n+1)/2 using
7. CO1 K2
induction method.
8. Write any three applications of Automata Theory. CO2 K1
9. Define NFA with €transition. CO2 K1
Design FA which accepts odd number of 1’s and any
10. CO2 K2
number of 0’s.
Construct a DFA for the language over {0, 1} * such that
11. CO2 K2
it contains “000” as a substring.
12. Define Epsilon transition. CO2 K1
Design FA to check whether given binary number is
13. CO2 K2
divisible by three.
14. Design DFA that starts with the string ‘ab’ CO2 K2
15. Design FA to accept the string that always ends with 00. CO2 K2
Part – B
Convert the Epsilon-NFA to DFA and list the difference between NFA
and DFA. (13 Marks)
States A b ε
1. q0 q1 CO2 K3
q1 q1 q2
q2 q0

Prove for every n>=1 by mathematical induction Σ i 2 =


2. CO1 K3
{n (n+1)/2}2. (13 Marks)
Given ∑= {a,b}, construct a DFA which recognize the
3. CO2 K3
language L = {bm a bn: m, n > 0}. (13 Marks)
4. Construct a NFA that accepts all strings that end in 01. CO2 K3
Give its transition table and extended transition function
for the input string 00101.Also construct a DFA for the
above NFA using subset construction method. (13
Marks)
Consider the following NFA for an identifier. Consider the
closure of each state and finite equivalent DFA. (13
Marks)

5. CO2 K3

Obtain the DFA equivalent to the following NFA: (13


Marks)
0,1
6. CO2 K3
0 1

1 2 3
2
Construct a Minimum state Automata for a given Transition Diagram.
(13 Marks)

7. CO2 K3

Construct a DFA that accepts all strings on {0,1} except


8. CO2 K3
those containing the substring 101. (13 Marks)
Part- C
1. Evaluate the DFA which is accepting the following CO2 K3
language over the alphabet {0,1}. The set of all the
strings beginning with a1 that when interrupted as a
binary integer, is multiple of 5, For example
strings101,1010and 1111 are in the language and the
strings 0,100 ,111 are not. (15 Marks)
Design a DFA from the given NFA. (15 Marks)
2. CO2 K3

3. Deduce a DFA that accept the following language: {x € CO2 K3


{a, b}: |xa |= Odd and |xb| = Even}. (15 Marks)
Solve the NFA that accepts all strings that ends in 01.
Give its
transition table and the extended transition function for
4. the input string 0101. Also construct a DFA for the CO2 K3
above NFA using subset construction method. (15
Marks)
Tabulate the difference between the NFA and DFA.
Deduce the following ε-NFA to DFA. (15 Marks)

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

Show that the language L= {a nbn: n≥0} is not regular.


4. CO3 K3
(13 Marks)
Show that the regular language is closed under: (13
Marks)
 Union
5.  Intersection CO3 K3
 Kleene closure
 Complement
 Difference
Write a regular expression for the set strings that
6. CO3 K3
consists of alternating 0’s and 1’s. (13 Marks)
Discuss the basic approach to convert from NFA to
7. regular expression. Illustrate with an example. (13 CO3 K3
Marks)
Using Pumping lemma, prove that L= {o m.n om+n |m≥1,
8. CO3 K3
n≥1} is not regular. (13 Marks)
Part- C
1. Deduce into regular expression that denotes the CO3 K3
language accepted by following DFA. (15 Marks)
Set the algorithm for minimization of a DFA. Develop a
2. minimized DFA for the RE (a+b)(a+b)* and trace for the CO3 K3
string baaaab. (15 Marks)
Find out and generalize whether following automata are
equivalent or not. (15 Marks)

3. CO3 K3

(i)Analyse and prove that the L1 and L2 are two lan-


guages then L1- L2 is regular. (8 Marks)
4. (ii) Analyse and prove that theL1 and L2 are two CO3 K3
languages then L1. L2 is regular. (7 Marks)
Show that the following languages are not regular.
(i) {w ϵ {a, b} * such that w=wwR}. (8 Marks)
5. (ii) Set of strings of 0’s and 1’s, beginning with a 1, CO3 K3
whose value treated as a binary number is a prime. (7
Marks)

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. SaB/bA CO4 K3
AbAA/aS/a
BaBB/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
CaCa, 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

Design a Turing Machine for language f(W) = {W R ∈ {a,


machine construction in detail. (15 Marks)

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)

You might also like