CS8501 Theory of Computation Important Question
CS8501 Theory of Computation Important Question
CS8501 Theory of Computation Important Question
in
DEPARTMENT OF
COMPUTER SCIENCE AND ENGINEERING
QUESTION BANK
V SEMESTER
CS8501–THEORY OF COMPUTATION
Regulation – 2017
Prepared by
Mr. N. Leo Bright Tennisson, Assistant Professor/ CSE
Mr. S. Venkatesh, Assistant Professor/CSE
www.studymaterialz.in
QUESTION BANK
SUBJECT : CS8501 THEORY OF COMPUTATION
UNIT I
AUTOMATA FUNDAMENTALS
Introduction to formal proof – Additional forms of Proof – Inductive Proofs –Finite Automata – Deterministic
Finite Automata – Non-deterministic Finite Automata – Finite Automata with Epsilon Transitions
PART – A
17. Create a FA which accepts the only input 101 over the input set:
Z={ 0,1} BTL-6 Create
18. Describe a Finite automata and give its types.
BTL-4 Analyze
19. Illustrate deductive proof.
BTL-3 Apply
20. Create a FA which checks whether the given binary number is
even. BTL-6 Create
PART - B
1. (i) Explain if L is accepted by an NFA with ε-transition then show
that L is accepted by an NFA without ε-transition. (6)
3.
Let L be a set accepted by a NFA then show that there exists a
BTL-1 Remember
DFA that accepts L. (13)
5.
Construct DFA equivalent to the NFA given below: (13)
BTL-2 Understand
www.studymaterialz.in
0 1 BTL-3 Apply
p {p, q} {p}
q {r} {r}
r {s} ф
*s {s} {s}
9. (i) Point out the steps in conversion of NFA to DFA and for the
following convert NFA to a DFA : (7)
BTL-4 Analyze
(ii) Infer the following to a regular expression. (6)
0 1
q q
q
0 0,1
www.studymaterialz.in
BTL-1 Remember
11. Tabulate the difference between the NFA and DFA .Convert the
following ε-NFA to DFA. (13)
states ε a b c
p Ф {p} {q} {r} BTL-1 Remember
q {p} {q} {r} Ф
*r {q} {r} ф {p}
12. (i).Describe the extended transition function for NFA ,DFA and
– ε-NFA. (6)
BTL-2 Understand
14. (i) Analyze and prove that if n is a positive integer such that n
mod 4 is 2 or 3 then n is not a perfect square. (6)
BTL-4 Analyze
(ii) Construct a DFA that accept the string {0, 1} that always
ends with 00. (7)
PART – C
1. (i) Draw and explain the transition diagram for recognizing the set
of all operators in c Language. (8)
(ii) Evaluate a DFA from the given NFA : (7)
M=({qo,q1},{a, b},δ,q0,{q1} with the state table diagram for δ given
BTL-5 Evaluation
below:
δ a b
qo {qo,q1} q1
q1 Ф {qo,q1}
2. Construct the following ε-NFA to DFA. (15)
states ε a b c
BTL-6 Create
p Ф {p} {q} {r}
q {p} {q} {r} {p, q}
*r {q} {r} ф Ф
3. Infer the DFA which is accepting the following 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 strings BTL-4 Analyze
101,1010 and 1111 are in the language 0,100 and 111 are not.
(15)
4. Rewrite the basic approach to convert from NFA to regular
BTL-6 Create
expression. Illustrate with an example. (15)
UNIT II
REGULAR EXPRESSION AND LANGUAGES
Regular Expressions – FA and Regular Expressions – Proving Languages not to be regular – Closure Properties
of Regular Languages – Equivalence and Minimization of Automata.
.
PART - A
Q.No Questions BT Level Competence
5. Explain a finite automaton for the regular expression 0*1*. BTL-1 Remember
6. Identify a regular expression for the set of all the strings. BTL-1 Remember
7. Construct a regular expression for the set of all the strings
have odd number of 1’s R.E=1(0+11)*. BTL-3 Apply
8. Compose the difference between the + closure and * closure. BTL-4 Analyze
9. Illustrate a regular expression for the set of all strings of 0’s. BTL-2 Understand
10. What is the Closure property of regular set S.? BTL-2 Understand
11. Construct regular expression corresponding to the state BTL-2 Understand
diagram:
(ii) Describe NFA with epsilon for the RE=(a/b)*ab and BTL1 Remember
convert it into DFA and further find the minimized
DFA. (7)
6. Show that the following languages are not regular. BTL-3 apply
(i) {wϵ{a,b}* |w=wR }. (7)
(ii) Set of strings of 0’s and 1’s, beginning with a 1, whose
value treated as a binary number is a prime (6)
13 i) Prove the L1 and L2 are two languages then L1- L2 is BTL 4 Analyze
regular. (7)
ii) Prove the L1 and L2 are two languages then L1 . L2 is
regular. (6)
PART C
UNIT III
CONTEXT FREE GRAMMAR AND LANGUAGES
CFG – Parse Trees – Ambiguity in Grammars and Languages – Definition of the Pushdown Automata –
Languages of a Pushdown Automata – Equivalence of Pushdown Automata and CFG, Deterministic Pushdown
Automata.
PART - A
Q.No Questions BT Level Competence
5. BTL 2 Understand
Examine the context free Grammar representing the set
of Palindrome over (0+1)*
6. Compare Deterministic and Non deterministic PDA. Is it BTL 2 Understand
true that non deterministic PDA is more powerful than that
of deterministic PDA? Justify your answer.
7. BTL 1 Remember
When is PDA said to be deterministic?
8. Examine the string aaabbabbba for the Grammar G with BTL 5 Evaluate
SaB|bA
A a|aS|bAA
B b|bS|aBB
9. Examine whether a pushdown automata has a memory? BTL 1 Remember
www.studymaterialz.in
11. Point out the languages generated by a PDA using final BTL 4 Analyze
state of the PDA and empty stack of that PDA.
12. Illustrate the rule for construction of CFG from given BTL 3 Apply
PDA.
13. Give a CFG for the language of palindrome string over
BTL 5 Evaluate
{a,b}.Write the CFG for the language ,L=(anbn|≥n).
14. What is Instantaneous Descriptions ( ID ) ? BTL 1 Remember
15. Show that L={ap/p is prime} is not context free. BTL 3 Apply
16. Infer the CFG for the set of strings that contains equal number
BTL 4 Analyze
of a’s and b’s over ∑ ={a,b}.
17. List the various types of grammar with example BTL 1 Remember
19. Point out the additional features a PDA has when compared
BTL 4 Analyze
with NFA.
20. Convince your answer of acontext free grammar for the given
BTL6 Create
expression (a+b) (a+b+0+1)* .
PART - B
1. (i) Discuss about PDA and CFL Prove the equivalence of PDA
and CFL. (6) BTL 2 Understand
(ii) If L is Context free language then prove that there exists
PDA M such that L=N(M). (7)
2.
(i) Describe the different types of acceptance of a PDA. Are
they equivalent in sense of language acceptance? Justify your BTL 1
answer. (7) Remember
n n
(ii) Design a PDA to accept {0 1 |n>1}.Draw the transition
diagram for the PDA and identify the instantaneous
description (ID) of the PDA which accepts the string ‘0011.
(6)
3. (i) Identify that deterministic PDA is less powerful than
non-deterministic PDA. (7)
n m n BTL 1 Remember
(ii) Construct a PDA accepting {a b a / m, n>=1} by empty
stack. Also tell the corresponding context-free grammar
accepting the same set. (6)
www.studymaterialz.in
4. (i) Construct the parse tree for the string 1+2*3 Given
the grammar G=(V, ,R,E)where
V={E,D,1,2,3,4,5,6,7,9,0,+,-,*,/,9,)}
={1,2,3,4,5,6,7,8,9,0,+,-,*,/,(,)} where R contains the
following rules :
E D|(E)|E+E|E-E|E/E BTL 6
D 0|1|2|…9 (6) Create
PART – C
1. (i) Design and Explain a PDA to accept each of the following
language BTL-5 Evaluation
{aibjck|i=j or j=k} (7)
(ii) The set of all string with twice as many 0’s and 1’s. (8)
2. (i) Let P be a PDA with empty stack language L=N(P) and
suppose that ε is not in L. Design how you would modify P so BTL-6 Create
that it accepts L U { ε} by empty stack. (8)
(ii) Design a DPDA for even length palindrome. (7)
3. (i) Convert the following CFG to PDA and analyze the answer
(a+b) and a++. (8)
Ia|b|Ia|Ib|I0|I1
EI|E+E|E*E|(E) BTL-4 Analyze
(ii) Convert the following CFG to PDA by empty stack. (7)
S0S1/A;
A1A0/S/ ε Infer whether 0101 belongs to N(M).
4. (i)If L is a CFL then prove that there exists PDA M, such that
L=N(M) , language accepted by empty stack. (7) BTL-6 Create
m n
(ii)Construct a PDA empty store , L= {a b |n<m}. (8)
www.studymaterialz.in
UNIT IV
PROPERTIES OF CONTEXT FREE LANGUAGES
Normal Forms for CFG – Pumping Lemma for CFL – Closure Properties of CFL – Turing Machines –
Programming Techniques for TM.
PART - A
Q.No Questions BT Level Competence
1. Conclude the procedure for converting CNF to GNF with an BTL 2 Understand
example.
2. Illustrate the Basic Turing Machine model and explain in one
BTL 3 Apply
move. What are the actions take place in TM?
11. Explain the special features of TM? Define universal TM. BTL 5 Evaluate
Define Instantaneous description of TM.
12. Define GNF. BTL 1 Remember
13. Prepare the difference between finite automata and turing BTL 6 Create
machine.
14. List the three ways to simplify a context free grammar. What
BTL 5 Evaluate
are the properties of the CFL generated by a CFG?
15. Draw a transition diagram for a Turing machine to identify BTL 1 Remember
n mod 2.
16. Express the techniques for TM construction. BTL 2 Understand
17. Develop the short notes on two-way infinite tape TM. BTL 6 Create
18. Differentiate TM and PDA. BTL 4 Analyze
19. Point out the role of checking off symbols in a Turing BTL 4 Analyze
Machine.
20. Illustrate Halting Problem. BTL 3 Apply
www.studymaterialz.in
PART - B
1. Express the following grammar G into Greibach Normal
Form(GNF) (13)
SXA|BB BTL 1 Remember
Bb|SB
Xb
Aa
2. Use the CFL pumping lemma to show how each of these
languages not to be context-free {aibjck| i<j<k}. (13) BTL 2 Understand
UNIT V
UNDECIDABILITY
Non Recursive Enumerable (RE) Language – Undecidable Problem with RE – Undecidable Problems about TM –
Post‘s Correspondence Problem, The Class P and NP
PART - A
Q.No Questions BT Level Competence
1. Distinguish between PCP and MPCP? What are the concepts BTL 2 Understand
used in UTMs?
2. List out the features of universal turing machine. BTL 1 Remember
3. When a recursively enumerable language is said to be
BTL 2 Understand
recursive? Discuss on it.
20. Illustrate about Time and space complexity of TM. BTL 3 Apply
PART - B
www.studymaterialz.in
1. (i)Describe about the tractable and intractable problems. (7) BTL 1 Remember
(ii)Identify that “MPCP reduce to PCP”. (6)
2. (i) Describe about Recursive and Recursive Enumerable
languages with example. (7) BTL 1 Remember
(ii) State and describe RICE theorem. (6)
3. (i) Summarize diagonalization language. (6)
(ii) Discuss the significance of universal turing machine and BTL 2 Understand
also construct a turing machine to add two numbers and encode
it. (7)
4. Discuss post correspondence problem .Let ∑={0,1}.Let A and
B be the lists of three strings each ,defined as
List A List B
i wi xi
1 1 111 BTL 2 Understand
2 10111 10
3 10 0
(i) Does the PCP have a solution? (7)
(ii) Prove that the universal language is recursively
enumerable. (6)
5. (i)Explain computable functions with suitable example. (6) BTL 4 Apply
(ii)Explain in detail notes on Unsolvable Problems. (7)
6. (i) Describe in detail notes on universal Turing machines with
example. (7) BTL 1 Remember
(ii) Collect and write the short notes on NP-complete
problems. (6)
7. (i) Show that the diagonalization language (Ld) is not a
recursively enumerable. (7) BTL 3 Apply
(ii) Illustrate about unsolvability. (6)
8. Prove that Post Correspondence Problem is undecidable. (13)
BTL 5 Evaluate
9. (i) Explain about Universal Turing machine and show that the
universal language (Lu) is recursively enumerable but not
recursive. Generalize your answer. (8) BTL 6 Create
(ii) Design and explain how to measure and classify
complexity. (5)
10. (i) Explain about the recursively Enumerable Language with
example. (6)
BTL 4 Analyze
(ii) Point out that the following problem is undecidable. Given
two CFGs G1 and G2 is L(G1) L(G2) =∅ . (7)
11. (i) Show that the characteristic function of the set of all even
number is recursive. (7) BTL-3 Apply
(ii) Illustrate in detail notes on primitive recursive functions
with examples. (6)
www.studymaterialz.in