Theory of Computation - CS3452 - Question Bank and Important 2 Marks Questions With Answer
Theory of Computation - CS3452 - Question Bank and Important 2 Marks Questions With Answer
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester
4th Semester
- MA3151 MA3251 Computer Organization
1st Semester
2nd Semester
8th Semester
6th Semester
CS3452-THEORY OF COMPUTATION
Question Bank
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
SYLLABUS
UNIT V UNDECIDABILITY 9
Unsolvable Problems and Computable Functions –PCP-MPCP- Recursive and recursively enumerable
languages – Properties - Universal Turing machine -Tractable and Intractable problems - P and NP
completeness – Kruskal’s algorithm – Travelling Salesman Problem- 3-CNF SAT problems.
OUTCOMES:
At the end of this course, the students will be able to:
C211.1: Construct automata theory using Finite Automata
C211.2: Write regular expressions for any pattern
C211.3: Design context free grammar and Pushdown Automata
C211.4: Design Turing machine for computational functions
C211.5: Differentiate between decidable and undecidable problems
TOTAL:45 PERIODS
INDEX
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
UNIT I AUTOMATA AND REGULAR EXPRESSIONS
Need for automata theory - Introduction to formal proof – Finite Automata (FA) – Deterministic Finite
Automata (DFA) – Non-deterministic Finite Automata (NFA) – Equivalence between NFA and DFA –
Finite Automata with Epsilon transitions – Equivalence of NFA and DFA- Equivalence of NFAs with and
without ε-moves- Conversion of NFA into DFA – Minimization of DFAs.
δ is a transition function (Q X ∑ Q )
If S(i) is true for n = i ,then it is to be proved that for all n > i , S(n) implies C211.1 BTL 1
S(n+1) then S(n) is true for all n ≥ i..
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
Differentiate between proof by contradiction and proof by
contrapositive. APR/MAY 2011
C211.1 BTL 1
5 To prove P→Q Prove by contradiction, that is assume P and ¬Q and
derive a contradiction and Prove the contra positive, that is assume ¬Q and
show ¬P.
Construct a DFA for the language over {0, 1}* such that it contains
“000” as a substring. APR/MAY 2011
C211.1 BTL 3
6 1 0,1
Q 0 Q 0 0Q 0 Q 0
0 1 2 3
1 1
Let S(X) be a statement about the structures X that are defined by some C211.1 BTL 1
particular recursive definition.
7 1. As a basis, Prove S(X) for the basis structure(s) X.
2. For inductive step, take a structure X that the recursive definition says
is formed from Y1, Y2,....Yk. Assume the statements S(Y1),...,S(Yk)
and use these to prove S(X).
1
C D
1
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
In the automata theory, a nondeterministic finite automaton with ε-moves C211.1 BTL 1
12
(NFA-ε)(also known as NFA-λ) is an extension of nondeterministic finite
automaton(NFA), which allows a transformation to a new state without
consuming any input symbols
A Deductive proof consists of a sequence of statements whose truth leads C211.1 BTL 1
us from some initial statement, called the ‘hypothesis’ to a ‘conclusion’
15 statement.
“if H then C”
Design DFA to accept strings over ∑ = (0,1) with two consecutive 0’s.
16 C211.1 BTL 3
NOV/DEC 2014
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
1 0,1
q0 q1 q3
0 0
A finite automaton (FA) is a simple idealized machine used to recognize C211.1 BTL 1
patterns within input taken from some character set (or alphabet) C. The
job of an FA is to accept or reject an input depending on whether the
pattern defined by the FA occurs in the input.
δ is a transition function (Q X ∑ Q )
18
0,1 0,1
0 1 0 1
L(DFA) = { w / δ‟(q0,w) is in F}.It is the set of strings w that take the start C211.1 BTL 1
19 state q0 to one of the accepting states.
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
(i) δ’(q, ε ) = q (ε - Empty)
Construct a DFA that accepts input string of 0,s and 1’s that end with
11. 0
C211.1 BTL3
1 1
q0 q1 q2
21
0 1
The extended transition function δ‟: QX∑*2 Q is defined as follows. C211.1 BTL3
22 (ii) (ii) Suppose w is of the form xa where a is the final symbol of w and x is
the rest of w. δ’(q,x)= {p1, p2, p3...pk}
k
U δ(pi ,a) = {r1, r2, r3,.....rm}
i=1
Therefore δ‟(q,w) ={r1, r2, r3,.....rm}
a C211.1 BTL3
23
b
q0 q1
24 A deductive proof consists of a sequence of statements, which starts from C211.1 BTL3
a hypothesis, or a given statement to a conclusion. Each step is satisfying
some logical principle.
Transition diagram is a directed graph in which the vertices of the graph C211.1 BTL3
25 correspond to the states of FA. If there is a transition from state q to state p
on input a, then there is an arc labelled ‘a’ from q to p in the Transition
Diagram.
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
List out the operations on strings.
1. Length of a string
2. Empty string
3. Concatenation of string
26
4. Reverse of a string
5. Power of an alphabet
6. Kleene closure
7. Substring
. 8. Palindrome
Text editors and lexical analyzers are designed as finite state systems. A C211.1 BTL3
27 lexical analyzer scans the symbols of a program to locate strings
corresponding to identifiers, constants etc, and has to remember limited
amount of information.
Define TOC
Theory of Computation is the branch that deals with how efficiently C211.1 BTL3
28 problems can be solved on a model of computation, using an algorithm.
The field is divided into three major branches: automata theory,
computability theory, and computational complexity theory.
C211.1 BTL3
30 1 1 1 1 1
q0 q1 q1 q3
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
- First find out which two states are equivalent we than replace those two
states by one representative state.
- For findingthe equivalent states we will apply the followingrule - The
two states S1 & S2 are equivalent if and only if both the states arefinal or
non-final
We say that two states p and q are equivalent iff for each input string x , C211.1 BTL1
32
δ(p,x) is an accepting state iff δ(q,x) is an accepting state. p is
distinguishable from q if there exists an x such that δ(p,x) is in F and
δ(p,x) is not in F or vice versa.
PART B
1 Explain the different forms of proof with examples. (8) NOV/DEC
2012
C211.1 BTL 1
2 Prove that, if L is accepted by an NFA with ε-transitions, then L is
accepted by an NFA without ε-transitions. (8) NOV/DEC 2012,
C211.1 BTL 1
NOV/DEC 2013
3
Convert an NFA to a DFA given NFA M = (Σ,Q,δ,q0, F) Σ={0,1},
Q = { q0, q1, q2 ,q3},F= { q0}, C211.1 BTL 3
(i) L={ x € {a,b}:|x|a = odd and |x|b = even}. (10) NOV/DEC 2012 C211.1 BTL 3
(ii) Binary strings such that the third symbol from the right end is
1. (10) MAY/JUNE 2012
(iii) All strings w over {0,1} such that the number of 1’s in w is 3
mod 4. (8) NOV/DEC 2011
5 n
Prove by induction on n that i n(n 1) / 2
i 0
(6)
C211.1 BTL 3
MAY/JUNE 2012
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
6 Construct an NFA without ε-transitions for the NFA give below. (8)
MAY/JUNE 2012
C211.1 BTL 3
0 1
Q0 Q1
ε
10 Prove that there exists a DFA for every NFA.(8) MAY/JUNE 2013,
NOV/DEC 2018
C211.1 BTL 4
11 (i) Prove that every tree has ‘e’ edges and ‘e+1’ nodes.
NOV/DEC 2014
C211.1 BTL 4
2n+1 n+2
(ii) Prove that for every integer n>=0 the number 4 +3 is
a multiple of 1 NOV/DEC 2014
C211.1 BTL 3
1
D
1 0 1
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
ɛ ɛ
A B C
State a b
C211.1 BTL 3
*1 2 3
2 4 5
3 6 7
4 5 4
5 7 5
6 2 7
*7 7 4
a b C211.1 BTL 3
q0 q1 q0
q1 q0 q2
q2 q3 q1
*q3 q3 q0
q4 q3 q5
q5 q6 q4
q6 q5 q6
q7 q6 q3
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
Regular expression – Regular Languages- Equivalence of Finite Automata and regular expressions –
Proving languages to be not regular (Pumping Lemma) – Closure properties of regular languages.
Write Regular Expression for the set of strings over {0.1} that BTL 3
have atleast one. NOV/DEC 2015
3
Regualr Expression = (0+1)*1
Give a regular expression for the set of all strings having odd C211.2
5 number of 1’s
BTL 3
RE= 1(0+11)*
Give the regular expression for the set of all strings ending in 00. C211.2
6
Regular expression = (0+1)*00 BTL 3
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
(ii)Strings of a‟s and b‟s with no consecutive a‟s .
b* (abb*)(a / ε)
L* denotes Kleene closure and is given by L* = L
i 0
i
example : 0* ={ ε,0,00,000,…………………………………}
10 Language includes empty words also.
L+ denotes Positive closure and is given by L+= L
i 1
i
example : 0+ ={ 0,00,000,…………………………………}
Language includes empty words also.
Construct a r.e for the language over the set ={a,b} in which total C211.2 BTL 3
11 number of a’s are divisible by 3
( b* a b* a b* a b*)*
Regular expression denoting a language over ∑ ={1} having (i) C211.2 BTL 3
even length of string (ii) odd length of a string.
12
(i) Even length of string R=(11)*
4. Split the word z into u,v and w such that |uv|<=n and |v|>=1.
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
exists an ‘i’ Such that uvi w is not in L.
The regular sets are closed under union, concatenation and Kleene
closure.
r1Ur2= r1 +r2
14
r1.r2= r1r2
( r )*=r*
What are the three methods of conversion of DFA to RE? C211.2 BTL 1
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
non-accepting states of B and vice-versa.
A string w is in L(B) iff δ’ (q0,w) is in Q-F which occurs iff w is not
in L(A).
Let L = {w:w ε {0,1}* w does not contain 00 and is not empty}. C211.2 BTL 3
Construct a regular expression that generates L. APR/MAY
21 2010
Prove or disprove that the regular languages are closed under C211.2 BTL 4
concatenation. APR/MAY 2010.
23
Q0 0,1 Q1 0 Q2 1 Q3
Is the set of strings over the alphabet {0} of the form 0 n where n C211.2 BTL 4
is not a prime is regular? Prove or disprove. NOV/DEC 2011
Then, s=xyi z=0p+(i-1)|y| must also be in the set for any i. In particular
let i=p+1.Then xyp+1z=0p+p|y| must be in the set so p+p|y| = p(1+|y|)
must be prime. Thus we have a contradiction and the set cannot be
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
regular.
State pumping lemma for regular set. NOV/DEC 2010, C211.2 BTL 1
NOV/DEC 2013,NOV/DEC 2014
25 Let L be a regular set. Then there is a constant n such that if Z is a
string in L and |Z| >=n, Z can be written as Z=UVW such that |V|>=1
and |UV|<=n and for all i>=0 UViW is in L.
Let R be any set of regular languages. Is U(R) regular? Prove it. C211.2 BTL 4
Write the regular expression for the language in which every C211.2 BTL 3
string will have at least one ‘a’ followed by at least one ‘b’.
The regular expression for the language in which every string will
28 have at least one ‘a’ followed by atleast one ‘b’ is given as: R=a+ b+ .
PART B
1 C211.2
Obtain the regular expression that denotes the language accepted
by BTL 3
2 C211.2
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
Using pumping lemma for regular sets. Prove that the language BTL 3
L = {anbn /n>=1} is not regular
7 What is Regular Expression? Write a regular expression for set C211.2 BTL 3
of strings that consists of alternating 0’s and 1’s. (8) MAY/JUNE
2016
8 C211.2 BTL 1
9 Discuss the basic approach to convert from NFA to regular C211.2 BTL 1
expression. Illustrate with an example. (16) NOV/DEC
2016
10 Show that the given two regular Languages are equivalent C211.2 BTL 4
(a+b)*
(a*+b*)*
12 Prove that there exists an NFA with ε-transitions that accepts the C211.2 BTL 1
regular expression γ. (10)
MAY/JUNE 2012, NOV/DEC 2010
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
(i) L={anbm | n,m>=1}
C211.2 BTL 3
14
Obtain the regular expression for the finite automata.
(8) MAY/JUNE 2012
a a
q0 b q1 b q2
(i) (b/a)*baa
(10) MAY/JUNE 2012
(ii) 0*(01)(0/111)*
(16) NOV/DEC 2012
(v) (b/a)*baa
(16) NOV/DEC 2010
(vi) 10+(0+11)0*1
(16) NOV/DEC 2014
16 Construct a regular expression for the following DFA using C211.2 BTL 3
kleene’s theorem. (10) APR/MAY 2011
0 1
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
*A A B
B C B
C A B
17 Construct a ε-NFA for the following regular expression. (6) C211.2 BTL 3
APR/MAY 2011
(0+1)*(00+11)(0+1)*
18 C211.2 BTL 3
19 State and explain the conversion of DFA into regular expression C211.2 BTL 1
using Arden’s theorem. Illustrate with an example.
(16) NOV/DEC 2011
0,1
1 0,1 C 0,1 D
A B
21
22
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
B->1B|ε
Example: E->E+E|E*E|id
SaB|bA BTL 3
Aa|aS|bAA
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
Let G = {{s,c},{a,b},P,S} where P consists of S->aCa, C211.3
C->aCa|b Find L(G).
5 BTL 3
S->aCa->aaCaa->aaaCaaa->…..->aicai->anban(C->b)
L(G) = {anban |n>=1}
LMD:
7 S=>A1B=>0A1B=>00A1B=>001B=>0010B=>00101B=>0010
1
RMD:
S=>A1B=>A10B=>A101B=>A101=>0A101=>00A101=>001
01
Show that id+id*id can be a ambiguous one for the grammar C211.3
E->E+E/ E*E/ (E)/id
BTL 3
LMD 1
8 E E+E id+E id +E*E id +id*E id +id*id
LMD 2
E E*E E+E*E id+E*E id+id*E id+id*id. Therefore id+id*id
can be generated by two distinct LMD .Thus it is ambiguous.
The sentence such as E(E)E can have more than one LMD (or)
RMD (or) Parse tree.
S->aSb | bSa | ε
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
What is unambiguity? C211.3
11
A Grammar Could not be able to generate more than one parse tree for
any of its string then the grammar is said to be unambiguous one. BTL 1
Mention the application of CFG. MAY/JUNE 2012 C211.3
12
Writing Syntax rule to the programming Language. BTL 4
Generating Recursive Structure can be easy.
Define the instantaneous descriptions(ID) of pushdown C211.3
Automaton NOV/DEC 2018
Let P= (Q,∑, Г, δ,q0, Z0 , F) be a PDA then the instantaneous BTL 1
description is given by
13
δ (q0, x, Z0)= δ (q1, xβ)
where q0 is current state, x is current input symbol, Z0 is
the current stack symbol, q1 indicates next state and xβ
represents top of the stack
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
than that of deterministic PDA. This is because the class of
languages accepted by NPDA is larger than that of class of
languages accepted by DPDA.
1. Stack which is used to store the necessary tape symbols and C211.3 BTL 1
19 use the state to remember the conditions.
2. Two ways of language acceptances, one reaching its final
state and another by emptying its stack.
δ:Q X (∑ U {ε}) X Г Q X Г*
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
q0 – q0 in Q is the start state
δ(q,ε,A)={(q,aS),(q,bS),(q,a)}
29 The properties are: 1. Each variable and each terminal of G appears C211.3 BTL 1
in the derivation of some word in L 2. Here are no productions of the
form A->B where A and B are variables
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
The PDA usually consists of four components: A control unit. C211.3 BTL 1
A Memory unit.
S=>bSa=>bbSa=>bbaTa=>bbaa
The grammar generates two parese tree for the string ababa
S S
32
S b S S b S
a S b S S b S
a a a a
SaS|bS|a|b
33 δ (q,ɛ,S)={(q,aS),(q,bS),(q,a),(q,b)}
δ (q,a,a)=(q, ɛ)
δ (q,b,b)=(q, ɛ)
PART – B
1 Consider the following grammar for list structures:
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
3 Find the context free languages for the following
grammars.
C211.3 BTL 3
1. SaSbS|bSaS| ε (10)
MAY/JUNE 2012
2. SaSb|ab
SaSb|ab
ED|(E)|E+E|E-E|E*E|E/E
D0|1|2|….9
Aa|aS|bAA
Bb|bS|aBB
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
(9)
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
13 Prove that if there exists a PDA that accepts by final
state then there exists an equivalent PDA that accepts by
C211.3 BTL 4
Null state. (8) APRIL/MAY 2011
B->0B|1B|0|1
AaA|BaC|aaa
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
BbBb|a
CCA|AC
S BaB
A aA|aaa
BbBb|a
The given grammar does not generate any symbol so all the
symbols are useless symbol.
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
Eliminating unit production AB we have
SABb|a AaaA|bAb BbAb
Sa
NOV/DEC 2012
12
It is a theoretical model for real world computer.
C211.4 BTL 4
It is used to recognize regular Language
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
finite number of tapes. Each tape is divided into cells and each
cell can hold any symbol of the finite tape alphabet. The set of
tape symbol includes a blank, and has a subset called the input
symbols, of which the blank is not a member.
Q – {q0,q1,q2}
∑ - {a,b}
q0 – Initial state
q2 - Final state
δ(q0,a) = (q1,a,R)
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
δ(q1,a) = (q1,a,R)
δ(q1,b) = (q1,b,R)
δ(q1,B) = (q2,B,R)
TM is denoted by
δ:Q X Г Q X Г X {L,R,S}
q0 – Initial state
B ε Г – Blank Symbols
F - Final state
NOV/DEC 2016
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
problem.
List out the different techniques for turing machine
construction.NOV/DEC 2013
26
(i)Storage in the Finite Control
(ii)Multiple tracks C211.4 BTL 1
(iii)Checking off symbols
(iv)Subroutines
Compare FM, PDA and TM MAY/JUNE 2016
Finite Machine is of two types - DFA and NFA. Both DFA and
NFA accept regular language only
27
PDA has a memory and hence it accepts large class of language.
TM can be programmed. Hence TM accepts very large class of C211.4 BTL 1
language. TM is therfore most powerful computational mode
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
Show that L={ai bj ck : i<j<k}is not context free grammar
(6) APR/MAY 2010 C211.4 BTL 1,BTL
3
SaAa | bBb |€
AC|a
BC|b
CCDE | €
DA|B|ab
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
(v) SABC|BaB NOV/DEC 2018
AaA|Bac|aaa
BbBb|a|D
C->CA|AC
Dɛ
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
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
S. Question Course Blooms
No Outcom Taxanom
. e y Level
When we say a problem is decidable? Give an example of
undecidable problem. NOV/DEC 2012,NOV/DEC 2015
C211.5 BTL 1
problem whose language is recursive is said to be decidable.
1 Otherwise the problem is undecidable . i.e there is no algorithm that
takes as input an instance of the problem and determines whether the
answer to that instance is yes or no.
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
input length.
NP is the class of languages or problems that are accepted by some
nondeterministic TM‟s with a polynomial bound on time taken
along any sequence of nondeterministic choices.
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
Universal TM has an ability to manipulate an unbounded amount of
data in finite amount of time
Give example for NP-complete problems. NOV/DEC
11 2014
Traveling Salesman Problem C211.5 BTL 1
Graph Coloring Problem
When a language is said to be recursive?
A language is said to be recursive if there exists a turing
machine that accepts every string of the language and every string is
rejected if it is not belonging to that language.
12
N Y
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
When a problem is said to be undecidable? C211.5
19
If a problem is not a recursive language, then it is said to be
undecidable problem
What is diagonalization language? C211.5
20 The language Ld Which consists of all those strings w such that the
Turing machine represented by w does not accept the input w.
Ld = { wi | wi L(Mi)}
Define Problem Solvable in Polynomial Time C211.5
21 A Turing Machine M is said to be of time complexity T(n) if
whenever m given an input w of length n, m halts after making at
most T(n) moves, regardless of whether or not m accepts.
Show that union of recursive language is recursive C211.5
L1 and L2 are recusive language. Then there exists a machine M1
that accepts L1 as well as machine M2 that accepts L2. We can
22 simulate a machine M that accepts the language L such that L = L1
U L2. Then construct M which accepts if M1 accepts. If M1 does
not accept then M2 simulates M. That means if M2 accepts then M
accepts, if M2 rejects M also rejects. Thus M accepts the language L
= L1 U L2 which is recursive.
Define NP-Completeness. C211.5
23 A language is NP-complete if the following statements are true.(i)L
is in NP (ii)For every language L‟ in NP there is a polynomial time
reduction of L‟ to L.
What is the difference between PCP and MPCP? C211.5
24
The difference between MPCP and PCP is that in the MPCP ,a
solution is required to start with the first string on each list.
What are the concepts used in UTMs? C211.5
25
Stored program computers. Interpretive Implementation of
Programming languages. Computability
Define L .When is a trivial property? C211.5
26
L is defined as the set { | L(M) is in . } is a trivial property if is
empty or it consists of all r.e languages
When we say a problem is decidable? Give an example of C211.5
undecidable problem?
A problem whose language is recursive is said to be decidable.
27 Otherwise the problem is said to be undecidable. Decidable
problems have an algorithm that takes as input an instance of the
problem and determines whether the answer to that instance is “yes”
or “no”. (eg) of undecidable problems are (1)Halting problem of the
TM.
Define the class NP Problem. C211.5
28 A problem is said to be NP if 1. its solution comes from a finite set
of possibilities, and 2. it takes polynomial time to verify the
correctness of a candidate solution. Example - Scheduling problems.
What are tractable problems and intractable problems? C211.5
Tractable Problem: a problem that is solvable by a polynomial-time
29
algorithm. The upper bound is polynomial. Intractable Problem: a
problem that cannot be solved by a polynomial-time algorithm. The
lower bound is exponential.
30 What are the properties of recursive and recursively enumerable
languages?.
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
(i)The complement of a recursive language is recursive,(ii)The union C211.5 BTL 1
of two recursive languages are recursive. (iii)The union of two
recursively enumerable languages are recursively enumerable.(iv)If
a language L and are both recursively enumerable then L is
recursive.
PART – B
Explain any four NP-Complete Problems.
1 (8)NOV/DEC 2010,NOV/DEC 2013
C211.5 BTL 3
Prove that “MPCP reduces to PCP”. NOV/DEC 2015
2
C211.5 BTL 1
State and prove the Post’s correspondence problem.
3 (10)NOV/DEC 2012, NOV/DEC 2014
C211.5 BTL 3
Write a note on NP problems.
4 (6) NOV/DEC 2012
C211.5 BTL 1
Explain undecidability with respect to post correspondence
5 problem. (8) MAY/JUNE2012
C211.5 BTL 1
6 Show that the union of two recursive language is recursive &
union of two recursively enumerable languages is recursive.
C211.5 BTL 1
(12) NOV/DEC 2014
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
www.BrainKart.com
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes&hl=en_IN
Click on Subject/Paper under Semester to enter.
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester
4th Semester
- MA3151 MA3251 Computer Organization
1st Semester
2nd Semester
8th Semester
6th Semester