Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers UNIT UNIT – I
2.
Nov / Dec Dec – 2003
Co ns ns id ide r - NFA. Comput Computer er the - closure of each each state and find its equivalent equivalent DFA
-- p q *r
April / May – 2004
1.
If L is acce accepte pted d by an NFA NFA with with - transition then show that that L is accepted by an NFA without - transition transition
3.
Nov / Dec Dec – 2004
1.
0
1
1
p
{ p, q }
{p}
q
{r}
{r}
p
{ q, s }
{q}
q
{r}
{ q, r }
is defined in the following table
r
{s}
{p}
April April / May – 2007
r
{s}
---
s
---
{p}
1.
*s
{s}
{s}
4.
Convert Convert the following following NFA NFA to its its equival equivalent ent DFA DFA
Prove Prove the the followi following ng by the the princip principle le of induction induction n 2 K = n( n + 1 ) ( 2n + 1 ) K=1 6
Let L be a set set accepted accepted by an NFA. NFA. Then prove prove that there there exists exists a determin deterministic istic 2.
April / May – 2006
For the finite finite state state machine machine M given given in the follow following ing table, table, test test whether whether the the
0
1
p
{ p, q }
{p}
States
0
1
q
{r}
{r}
q0
q0
q1
r
{s}
- --
q1
q3
q0
s
{s}
{s}
q2
q0
q3
q3
q1
q2
Construct DFA equivalent to the NFA given below
strings 101101, 11111 are accepted by M
Construct Construct DFA equival equivalent ent to the NFA NFA given given below below 3.
0,1 q0
0
q1
1
q2
4.
Prove that there there is is no x in ( a, a, b )* such that ax ax = xb
5.
Construct Construct a NFA accepting accepting the same same set of strings strings over over { a, b } ending in aba. Use it to construct a DFA accepting the same set of strings.
Prove that a language language L is accepte accepted d by some some - NFA if and only only if L is accepted by some DFA.
Construct Construct a DFA that that accepts accepts all the strings strings on { 0, 1 } except those those containing containing the substring 101.
Nov / Dec Dec – 2006
1.
0
if L is accepted accepted by some NFA.
( { p, q, r, s }, { 0, 1 }, , P, { q, s } ) where
Nov / Dec Dec – 2005
1.
c -- {r}
Constr Construct uct a DFA equi equival valent ent to to the the NFA. NFA. M =
finite automaton that accepts L. Is the converse true? Justify your answer.
1.
b --{r}
Prove that a language language L is accepted accepted by by some DFA
April / May – 2005
1.
a {p}
{q} {r}
Nov / Dec Dec – 2007
1.
Draw the the transition transition diagram diagram for recognizi recognizing ng the set of all operators operators in C language language
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 1
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 2.
Explain Explain the extended extended transition transition function function for NFA, NFA, DFA and -
NFA.
an NFA without without 2.
April / May – 2008
- transitions to recognize L.
Constr Construct uct an NFA NFA withou withoutt transition for the following NFA
April April / May – 2010 2n+1
n+2
1.
Prove Prove that that for for every every inte integer ger n > 0 the the number number 4
2.
Construct Construct a DFA that that will accept accept string stringss on { a, b } where the number number of b’s b’s
these differences important in terms of the languages they can recognize? Give a
divisible by 3.
reason for your answer?
3.
+3
is a multiple of 13
1.
Describe Describe the fundamental fundamental differe differences nces in the the rules for for forming DFA DFA and NFA. NFA. Are
Construct Construct a finite finite autom automata ata that accept acceptss the set set of all strings strings in { a, b, c }* }* such
Nov / Dec Dec – 2010
that the last symbol in input string appears earlier in the string.
1.
Nov / Dec Dec – 2008
1.
Construct Construct the
2.
Distinguis Distinguish h NFA NFA and and DFA DFA with with examples. examples.
3.
Consider Consider the finite finite automa automata ta transition transition table table shown shown below with with
a
b
c
States Inputs Find the language accepted by the finite automata. automata. (10) (ii) What is ε-closure ε -closure (q)? Explain with an example.
p
{ q, r }
---
{q}
{r}
q
---
{p}
{r}
{ p, q }
r
---
---
---
{r}
set
April April / May – 2011
1.
2.
Construct Construct a DFA equivalent equivalent for for the the given given NFA
Show that a connected connected graph G with n vertices vertices and n – 1 edges edges (n>2) (n>2) has at
Convert the following ε – ε – NFA to a DFA using the subset construction algorithm
Construct Construct an NFA accepting accepting L given by L ={ x | {a, b }*| |x| |x| > 3 and the the third third p
Prove the followi following ng theorem theorem “ If L is accepted accepted by an NFA with - transitions”
q
– transition, transition, then r
ε
a
b
c
---
{p}
{q}
{r}
{p}
{q}
{r}
---
{q}
{r}
---
{p}
Draw state transition transition diagram diagram for FA over over { a, b } containing substring aabb
Nov / Dec Dec – 2009
1.
the the
least one leaf.
L is accepted by an NFA without 4.
accepting accepting
its equivalent DFA
symbol of x from the right is ‘b’} 3.
for for
all strings with three consecutive 0’s.
with the transition diagram 2.
automata automata
Consid Consider er the follow following ing - NFA compute compute the - closure of each state and find
April / May – 2009
1.
determin deterministic istic finite finite
– transition, there exists
Prove that there exists a DFA for every ε – ε – NFA
4.
Show that the the maximum maximum edges in a graph graph ( with no self self – loops or or parallel parallel edges ) is given by ( n ( n – 1 ) / 2 ) where n is the number number of nodes
Prove Prove that that for for any lang languag uagee L recogn recognize ized d by an NFA with
3.
Nov / Dec Dec – 2011
1.
Prove Prove the the 2 is not not ration rational al
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 2
of of
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 2.
Construct Construct a DFA DFA accepting accepting all strings strings w over over { 0, 1 } such that that the
number of 1’s in w is 3 mod 4
UNIT – II Nov / Dec Dec – 2003
April April / May May – 2012 2012
1.
1.
Prov Provee by induc inducti tion on on on n that that i = n ( n + 1 )
2.
2 Construct Construct the transitio transition n diagram diagram of a finite finite automata automata accepting accepting all binary strings strings
transition that accept L(r). 2.
0
Obtain Obtain the the regular regular expres expression sion R for the following DFA A such that L (A ) = L ( R )
with even number of 0’s and 1’s 3.
Let r be a regular regular express expression. ion. Then Then prove that that there there exists exists an NFA with with –
1
2
Constr Construct uct the the fini finite te autom automata ata 3.
without ε transition for the finite
State the the pumping pumping lemma lemma for the regular regular sets. sets. Show that that the set set L = { 0i2 | i is an integer, integer, i > 1 } is not a regular
automata
April April / May – 2004
4.
Prove that that it L be a languag languagee accepted accepted by a NFA then then there there exists a DFA DFA accepting accepting L.
1.
Construct Construct an NFA equivalent equivalent to ( 0 + 1 )* ( 00 + 11 ).
2.
Construct Construct a Regular Regular Express Expression ion correspo corresponding nding to the state diagram given in the following figure.
Nov / Dec Dec – 2012
3.
1.
Explai Explain n differ different ent forms forms of of proof proof with with example exampless
2.
Prove that, if L is accepted by an NFA with ε – transition, then L is accepted by an
Prove that if n is is a positive positive integer integer such such that n mod mod 4 is 2 or 3 then then n is not perfect perfect square.
4.
regular
2.
Construct Construct an NFA NFA equivalent equivalent to to the regular regular expressio expression n ( 0 + 1 )* ( 00 + 11 ) ( 0 + 1 )*
3.
Conver Convertt the follow following ing NFA NFA to a DFA
4.
Discuss Discuss on the relatio relation n between between DFA DFA and minimal minimal DFA
0 1
2
April April / May – 2005
1.
L = { w | w is of even length and begins with 11 }
3.
Obtain Obtain the regular regular expressi expression on that that denotes denotes the language accepted by the DFA
Constr Construct uct DFA to to accept accept the the lang languag uagee
Write a note note on NFA and compa compare re with with DFA DFA
n
Show Show that that the the set set L = { a b | n > 1 } is not a regular. regular.
April / May – 2013
2.
n
1.
Construct Construct a DFA that accept accept the followi following ng language language { x e { a, b }: | x |a = odd and | x | b b = even }
1.
i
Nov / Dec Dec – 2004
NFA without ε transitions. 3.
i
Show Show tha thatt the the set set L = { 0 1 | i > 1 } is not not
a
b
p
{p}
{ p, q }
q
{r}
{r}
r
---
---
Show Show that that the the set set L = { 0n2 | n is an integer, n > 1 } is not regular regular
2.
Construct Construct an NFA equivalent equivalent to the regular regular expression 10 + ( 0 + 11 ) 0*1 1
3.
q2
Obtain Obtain the regular regular expressio expression n that denotes denotes the the language accepted by
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 3
q3
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 3.
Nov / Dec Dec – 2005 n
n
Construct Construct a minimum minimum state state automata automata equivalen equivalentt to a given automata automata M whose whose
1.
Check Check wheth whether er the the langu language age L = { 0 1 | n > 1 } is regular or not? not? JYA.
2.
Construct Construct an NFA equival equivalent ent to the regular regular expression expression ((0+1)(0 ((0+1)(0+1) +1) (0+1) (0+1) )*
States
a
b
3.
Obtain Obtain the regular regular expression expression denoti denoting ng the language language
q0
q0
q3
q1
q2
q5
q2
q3
q4
q3
q0
q5
0
accepted by the following DFA by using the formula R ijij
transition table is given below.
1
k
2
April / May – 2006
1.
Construct Construct an NFA equival equivalent ent to the the following following RE RE ( ( 10 )( 0 + 1 ))* 01 01
q4
q0
q6
2.
Check Check wheth whether er the the langu language age L = { 0 | n Z } is regular or not? Justify your
q5
q1
q4
answer.
q6
q1
q3
3.
n2
+
Prove that that if L = L( A ) for some DFA A, A, then there there is a regular regular express expression ion R
4.
such that L = L( R )
Find the regular regular expression expression correspondi corresponding ng to the finite automata given below
Nov / Dec Dec – 2006
1.
Explain Explain the the constr constructio uction n of NFA with transition from any given regular expression.
2.
automata given below. 3.
1.
Fine the the regular regular expres expression sion for for the set set of all all strings strings 2 denoted by R 13 from the deterministic finite 13
1
Nov / Dec Dec – 2007
state DFA. 1
2.
2
k
2
b. L = { 0n 1m 2n+m | n, m > 1 } d. L1 / L2 = { x | some y L2, x L1 }
3.
p
Show Show that that the langua language ge { 0 , p is prime }
4.
Find whether whether the language language { ww, w is in ( 1 + 0 )* and and ( 1k | k = n2, n > 1 } are are regular or not.
verify verify whethe whetherr the the finit finitee autom automata ata M1 and M2 given below are equivalent equivalent over { a, b }
2.
1
is not regular.
April / May – 2007
1.
from the
deterministic finite automata given below.
or not
c. L = { 1 | k = n , n > 1 }
Fine the regula regularr expressi expression on for for the set of of all strings denoted by R 23 23
Find whethe whetherr the following following langua languages ges are are regular regular
a. L = { w { a, b } | w = wR }
Convert Convert the the regular regular expression expression a( a +b)* a into - NFA and find the minimal
5.
Show that that the the regular regular languag languages es are closed closed under under intersection and reversal.
Construct Construct transiti transition on diagram diagram of a finite automata automata correspondi corresponding ng to the regular regular
April April / May – 2008
expression ( ab + c* )*b.
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 4
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 1. 2.
Construct Construct a regular regular expressi expression on to the transi transition tion diagram diagram..
Construct Construct a NFA for the regular regular expression expression
( a / b )*abb and draw its
equivalent DFA. 3.
Nov / Dec Dec – 2008
1.
2.
c.
Write down down a regular regular grammar grammar which which describes describes the the above above language language
d.
Draw the DFA DFA correspo corresponding nding to the above language language L.
Find an an equalities equalities for for the following following RE and prove prove for the same same a.
b + ab* + aa* b + aa*ab*
equivalent DFA.
c.
a ( a + b )* )* + aa ( a + b )* + aa aa ( a + b )*
b.
a* ( b + ab * )
Fine the regular regular expression expression for the the set set of all
4.
State and and prove prove using an example example,, the properti properties es of regular regular language language
2
5.
State the the algorithm algorithm for minimizi minimizing ng of a DFA. Construc Constructt a minimized minimized DFA for the RE (a+b)(a+b)* and trace for the string baaab
finite automata given below. k
2
Find whether whether the language language { ww, w is in in ( 1 + 0 )* and and ( 1 | k = n , n > 1 } are are
Nov / Dec Dec – 2010
1.
regular or not. 4.
Write down a RE that represents the above language language L
Convert Convert the regula regularr expressi expression on ( a + b )*abb )*abb into - NFA and and find find the the
strings denoted by R 13 13 from the deterministic
3.
b.
ε-transitions that accepts L(r)
Show that that the regular regular languages languages are closed closed under under intersection intersection and revers reversal. al.
April / May – 2009
Let r be a regular regular expression. expression. Prove that there there exists exists an an NFA with with
n n
2.
Is the the lan langu guag agee L = { a b | n > 1 } is regular? Justify
1.
Construct Construct an NFA for the the regular regular expression expression r = 1 * 0 +0
3.
Construct Construct the the minimal minimal DFA for the regula regularr expression expression (a/b)*b (a/b)*baa aa
2.
Construct Construct an an NFA to accept accept the the language language indicat indicated ed by the follow following ing regular regular
4.
Prove that regular regular sets are closed under substitution substitution..
April April / May – 2011
expression ((01+001)*0*)* 3.
Prove the follow following ing theorem theorem “ Let r be a
1
regular expression and then there exists an
*A
A
B
NFA with - transition that accept L(r)”.
B
C
B
C
A
B
Nov / Dec Dec – 2009
1.
0
Construct Construct a Regular Regular Expressio Expression n for the the following following DFA DFA using using Kleene’s Kleene’s theorem
2.
C on ons tr tr uc uc t a - NFA for the following regular regular expression (0+1)*(00+11)(0+1)*
For a give given n RE r, prov provee that that there there exist existss an 3.
NFA with transition that accept L( r ). 2.
1.
Construct Construct a minimized minimized automata automata for the the following following automata automata to define define the same language
Find the the RE corresp correspondin onding g to the follow following ing automa automata ta
April / May – 2010
States
a
b
q0
q1
q0
1.
Construct Construct an NFA NFA for for the following following RE ( a + b )* ab
2.
Consider Consider the alphab alphabet et A = {a, b } and and the languag languagee L = { bb, bab, bab, baab,
q1
q0
q2
baaab, … } over a
q2
q3
q1
a.
Is A * finite finite or or infinite? infinite? Give Give a brief brief reason reason for for your answer. answer.
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 5
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers
4.
*q3
q3
q0
3.
Discuss Discuss in detail detail about about the closure closure properti properties es of regular regular language languagess
q4
q3
q5
4.
Prove that the the following following language languagess are not not regular regular
q5
q6
q4
q6
q5
q6
q7
q6
q3
a. 5.
1.
What are the the closure closure proper property ty of regular regular sets sets 3.
April / May – 2012
Write a regular regular expressio expression n for binary strings beginni beginning ng with 1 and not having having two consecutive 0’s
2.
Prove that L is accepte accepted d by a DF then then L is is denoted denoted by a regular expression expression
4.
Explain Explain the closure closure propertie propertiess for regular regular languag languages es
4.
( q0,0,X ) = { ( q0,XX ) }
( q0,1,X ) = { ( q1, q1, ) }
( q1,1,X ) = { ( q1, q1, ) }
( q1, q1,,X ) = { ( q1, q1, ) }
( q1, q1,,Z0 ) = { ( q1, q1, ) }
If L is context context free free language language then prove prove that that there there exists a PDA PDA M such that that L
April April / May – 2004
1. m n
Using pumping pumping lemma lemma for the the regular regular sets, sets, prove that the langua language ge L = {a b | m > n } is not regular
3.
( q0,0,Z0 ) = { ( q0,XZ0 ) }
= N(M) language accepted by empty stack
Nov / Dec Dec – 2012
2.
Let M = ( {q0, q1}, {0, 1 }, { X, Z0 }, , q0, Z0, ) where is given by
Construct a CFG G = ( V, T, P, S ) generating N(M)
Construct Construct the the NFA and and DFA for the regula regularr expression expression ( a* / b* )*
3.
1.
If L is N(M1) N(M1) the language language accepte accepted d by empty stack stack for some some PDA M, then then L is L(M2) language accepted by final state for some PDA M2.
( 1 + 00 * 1 ) + ( 1 + 00 * 1 ) * ( 0 + 10 * 1 ) = 0*1 ( 0 + 10 * 1 )*
1.
Let G = ( V, V, T, P, S ) be be Context Context Free Free Grammar. Grammar. Then Then prove prove that that S * if and only if there is a derivation tree in grammar G with yield
2.
Arden’s theorem. Illustrate with an example
Define Define regular regular expression expression.. Show Show that
| m > 1 and and n > 1 }
UNIT UNIT – III
State and and explain explain the the conversion conversion of DFA into into regular regular expressio expression n using
3.
m n m+n
{ a b a
Nov / Dec Dec – 2003
Nov / Dec Dec – 2011
2.
b.
Discuss Discuss on equival equivalence ence and and minimizat minimization ion of automata automata
Prove that “if two states are not distinguished by the table – filling algorithm then the states are equivalent”
1.
2n
{0 |n>1}
Let Let G be a CFG CFG snd snd let let A*w in G. Then show that t here is a leftmost derivation of w.
2.
Prove any two closure closure properties properties of regular regular language language
Let Let G be be the the gramm grammar ar S 0B | 1A, A 0 | 0S | 1AA, B 1 | 1S | 0BB. For the string 00110101 find its leftmost derivation and derivation tree.
Construct Construct a minimzed minimzed DFA that can be derive derived d from the followi following ng regular regular
3.
If G is is the the gramm grammar ar S SbS | a, show that G is ambiguous.
expression 0*(01)(0/111)*
4.
If L is L(M2) L(M2) for some some PDA M2, then then show that that L is N(M1) N(M1) for some some PDA
April / May – 2013
1.
Discuss Discuss the the relation relation between between DFA DFA and and minimal minimal DFA DFA
2.
Discus Discusss on regu regular lar expr express ession ion
M1.
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 6
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 5.
Construct Construct a CFG G which accepts accepts N(M) N(M) where where M = ({q0, q1},
5.
PDA M1.
{a, b }, {Z0, Z}, , q0, Z0, ) where is given by
6.
( q0,b,Z0 ) = { ( q0,ZZ0 ) }
( q0,b,Z ) = { ( q0,ZZ ) }
( q0, q0, ,Z0 ) = { ( q0, q0, ) }
( q0,a,Z ) = { ( q1,Z ) }
( q1,b,Z ) = { ( q1, q1, ) }
( q1,a,Z0 ) = { ( q0,Z0 ) }
If L is context context free free language language then prove prove that that there there exists a PDA PDA M such that that L
Nov / Dec Dec – 2005
1.
2.
3.
4.
Prove that that L is L(M2) L(M2) for some some PDA M2, M2, then show that that L is N(M1) N(M1) for some some
Define Define deterministi deterministicc PDA. Is it true that that DPDA and PDA are are equivalent equivalent in the
Construct Construct a CFG G which accepts accepts N(A) N(A) where where A = ( {q0, q1}, {a, b }, { Z0, Z
Constr Construct uct a PDA accept accepting ing {an bman | m,n >1 } by empty stack. Also construct
}, , q0, Z0, ) where is given given by
the corresponding context free grammar accepting the same set.
( q0,b,Z0 ) = { ( q0,ZZ0 ) }
( q0,b,Z ) = { ( q0,ZZ ) }
If L is L(M2) L(M2) for some some PDA M2, then then show that that L is N(M1) N(M1) for some some PDA
( q0, q0,,Z0 ) = { ( q0, q0, ) }
( q0,a,Z ) = { ( q1,Z ) }
M1.
( q1,b,Z ) = { ( q1, q1, ) }
( q1,a,Z0 ) = { ( q0,Z0 ) }
April April / May – 2006
Let G = ( V, T, T, P, S ) be Context Context Free Gramma Grammar. r. Then prove that S * if
1.
2.
2.
S ho ho w t ha hat E E + E | E * E | ( E ) | id is ambiguous
3.
If L is context context free language language then then prove that there there exists exists a PDA PDA M such such that L
( q0,0,X ) = { ( q0,XX ) }
( q0,1,X ) = { ( q1, q1, ) }
( q1,1,X ) = { ( q1, q1, ) }
( q1, q1, ,X ) = { ( q1, q1, ) }
( q1, q1,,Z0 ) = { ( q1, q1, ) }
Construct a CFG G = ( V, T, P, S ) generating N(M)
If L is L(M2) L(M2) for for some PDA PDA M2, then then show that that L is N(M1) N(M1) for for some PDA PDA M1.
Let M = ( {q0, q1}, {0, 1 }, { X, Z0 }, , q0, Z0, ) where is given by ( q0,0,Z0 ) = { ( q0,XZ0 ) }
Explain Explain different different types types of acceptanc acceptancee of PDA. Are they they equivalent equivalent in sense sense of language acceptance? Justify your answer.
3.
= N(M)
Prove that that If L is context context free free language language then then prove that that there there exists a PDA PDA M such that L = N(M)
and only if there is a derivation tree in grammar G with yield
4.
aB | b
sense of language acceptance is concern? Justify your answer 5.
April / May – 2005
1.
4.
Let Let G be be the the gram gramma marr S aS | aSbS | . Prove that L ( G ) = { x | each each prefix of x has at least as many a’s as b’s }
PDA M1.
Let G = ( V, V, T, P, S ) be be Context Context Free Grammar. Grammar. Then Then prove prove that S * if and only if there is a derivation tree in grammar G with yield
3.
Find a CFG with with no useless useless symbols symbols equiva equivalent lent to S AB | CA, A a, B BC | AB, C
Nov / Dec Dec – 2004
2.
Let G = ( V, V, T, P, S ) be be Context Context Free Free Grammar. Grammar. Then Then prove prove that that S * if and only if there is a derivation tree in grammar G with yield
= N(M)
1.
Prove that that L is L(M2) L(M2) for some some PDA M2, M2, then show that that L is N(M1) N(M1) for some some
Nov / Dec Dec – 2006
1.
Prov Provee that that if L = N(P N(P N) for some PDA PN = ( Q, , , N, q0, Z0 ) then there is a PDA PF such that L = L(P F)
2.
Cons Constr truc uctt a PDA PDA for for { an bma2(m+n) | n,m > 0 }
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 7
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 3.
4.
S aAA
Show Show that that the gramma grammarr S aSb | bSaS | is ambiguous and
what is the language generated by this grammar?
3.
Constr Construct uct a PDA for the the langu language age { an b2n | n > 0 }
Write a grammar grammar to recognize recognize all all prefix prefix expressions expressions involvi involving ng all binary binary
4.
Constr Construct uct PDA for the gramma grammar r S aB | bA
arithmetic operators. Construct parse tree for the sentence “-*+abc/de”, using
April / May – 2007
Find a derivation derivation tree of a * b + a * b given that a * b + a * b is in L( G ) where G is given by S
S+S|S*S|a|b
2.
Show Show that that the gramma grammarr S a | abSb | aAb, A
3.
Consid Consider er the the prod product uction ion S
bA
| aB, A
bS
bAA
Construct Construct the CFG for the the language language L(G) L(G) = { a b | m# n, m , n > 0 }
2.
Constr Construct uct the CFG for for the the langua language ge L(G) L(G) = { an ban | n > 1 }
3.
Define Define ambiguity, ambiguity, leftmost leftmost derivation derivation and rightmo rightmost st derivation derivation with an example.
| aAAb is ambiguous
| aS | a, B
aBB | bS | b.
m n
1.
4.
Construct Construct a PDA that that will accept accept the language language generate generated d by the grammar grammar G = ({S,A}, {a,b}, S,P) with the production S
For the string aaabbabbba find a leftmost derivation m m n
4.
Construct Construct a PDA accep accepting ting by empty empty stack stack the language language { a b c | m,n m,n > 1}
5.
Show that that set of all all strings strings over { a, b } consistin consisting g of equal number number of a’s and
5.
AA | a, A SA | b
Construct Construct an NPDA NPDA that accept accept the language language generat generated ed by the grammar grammar S
Nov / Dec Dec – 2007
Prov Provee that that if L = N(P N(P N) for some PDA PN = ( Q, , , N, q 0, Z0 ) then there
aSbb | abb
1.
Prove that a CFL CFL can be recognized recognized by a PDA by empty empty stack. stack.
2.
Construct Construct a PDA equival equivalent ent to the following following grammar grammar S aAA, A
2.
Constr Construct uct a PDA for for the the langu language age { a b | n > 0 }
3.
Prove that that every every language language recogniz recognized ed by a PDA is context context free. free.
3.
Show Show that that the gramma grammarr S a | Sa | bSS | SSb | SbS is ambiguous
4.
Construct Construct a PA for for the set of palindr palindrome ome over over the alphabet alphabet { a,b a,b }
4.
Constr Construct uct a PDA for for the the gramm grammar ar
n 2n
1.
A a | aS | bAA bAA B b | bS | aBB m n
Constr Construct uct a CFG CFG accept accepting ing L { a b | n < m } and construct a PDA accepting
Nov / Dec Dec – 2008
b
where i, t and e stand for
a.
Construct Construct a leftmost leftmost derivati derivation on for the the sentence sentence w = ibtibtaea ibtibtaea
b.
Show the corresponding parse tree for the above sentence sentence
c.
Is the the above above grammar grammar ambigu ambiguous ous ? if if so prove prove it. it.
d.
m n m
Design Design a PDA PDA for for recognizi recognizing ng the the language language { a b c | m,n > 1}using 1}using empty empty
Remove Remove the ambigui ambiguity ty if any and and prove that both both the grammar grammar produces the same languages
stack. 2.
Consid Consider er the gramma grammarr S iCtS | iCtSeS | a C
if, then and else an C and S for Conditional and statement respectively.
L by empty stack.
1.
aS | bS
April April / May – 2010
April / May – 2008
1.
|a
is a PDA P F such that L = L(P F)
S aB | bA
Nov / Dec Dec – 2009
b’s is accepted by a DPDA
1.
A a | aS | bAA bAA B b | bS | aBB
April April / May – 2009
your grammar
1.
A aS | bS | a
Construct Construct an unrestri unrestricted cted PDA equival equivalent ent to the grammar grammar given below below
2.
Consider Consider the the CFG = ( {S, {S, T, C, D}, D}, {a,b,c,d}, {a,b,c,d}, S, S, P) where where P is
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 8
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers S cCD | dTC | T cDC | cST | a
C aTD |
3.
D dC | d 4.
must accept by empty store, it must start with S on its stack and it must be based on above grammar
Explain Explain about about parse parse tree. For the the followin following g grammar grammar A a | aS | bAA bAA B b | bS | aBB
A
ba
is the CFG. Determine
Let Let the the gram gramma marr S aB | bA
A a | aS | bAA bAA B b | bS | aBB for the
Constr Construct uct the the push push down down automa automata ta for S aSb | ab
3.
Constr Construct uct PDA PDA for for the langu language age L = { ww | w in ( a + b )* }
derivation iii)Parse tree
4.
Explain Explain the difference difference between between accepta acceptance nce by final state state and empty empty stack in
4.
Let L is a context context free free language. language. Prove Prove that that there exists exists a PDA PDA that accepts accepts L.
R
PDA. Nov / Dec Dec – 2012
1.
Consider Consider the the followin following g grammar grammar for for the list structu structures res : S a / ^ / (T)
April / May – 2011
Prove that if if ‘w’ is a string string of a language language then there there is is a parse tree with with yield yield
T T, S / S
Find
the
leftmost
derivation,
rightmost derivation and parse free fro (((a,a),^(a)),a)
‘w’ and also prove that if A=> w then it implies that ‘w’ is a string of the
2.
Construct Construct a PDA accepting accepting the languag languagee {(ab) {(ab)n | n > 1 } by empty stack. stack.
language L defined by a CFG.
3.
Construct Construct a transitio transition n table for for PDA which which accepts accepts the language language L = { a b
Prove that the expressi expression on gramma grammarr is ambiguo ambiguous us
n 2n
|n
> 1 }. Trace your PDA for for the input with n = 3.
EE+E|E*E|(E)|a
4. i j k
Find the PDA equiva equivalent lent to the given given CFG with with the following following productio productions ns SA
Constr Construct uct a CFG for the set { a b c | i # j or j # k } Prove that that if there exists exists a PDA that that accepted accepted by final state state then there exists exists an equivalent PDA that accepts by Null state.
5.
A bAa,
2.
Construct Construct PDA for for the language language L = { wcw | w in ( 0 + 1 )* }
4.
Is S aSb | aAb,
For the string aaabbabbba, find i) Left most derivation ii) Rightmost
3.
3.
| S | to a PDA that accepts the
string aabbbbaa find LMD, RMD and parse tree.
What is determi deterministic nistic PDA? Explai Explain n with with an example example
2.
bSa
the context free language.
1.
2.
1.
aSb | A, A
April April / May – 2012
Nov / Dec Dec – 2010
S aB | bA
same language by empty stack.
Present PDA that accepts the language generated by this grammar. Your PA
1.
Conv Conver ertt the the gram gramma marr S
A BCB ba Cac
April April / May – 2013
5.
n 2n
Explain Explain about about parse parse tree. tree. For the follow following ing grammar grammar S aB | bA
Construct Construct a PDA to accept accept the language language 0 1 by empty stack.
A a | aS | bAA bAA B b | bS | aBB
For the string aaabbabbba, find i) Left most derivation ii) Rightmost
Nov / Dec Dec – 2011
1.
Id NPDA NPDA and DPDA DPDA equival equivalent? ent? Illustrate Illustrate with an exampl examplee
derivation iii)Parse tree
2.
What are are the different different types types of language language acceptanc acceptances es by a PDA and define define
6.
Constr Construct uct PDA PDA for for the langu language age L = { ww | w in ( a + b )* }
them. Is it true that the language accepted by a PDA by these different types
7.
Explain Explain in detail detail about about equivale equivalence nce of PDA and and CFG
R
provides different languages?
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 9
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers i) Multi – tape Turing Machine Machine ii) Multi – dimensional Turing Machine iii) Non Deterministic Turing machine
UNIT UNIT – IV Nov / Dec Dec – 2003
1.
3.
Begin Begin with with the the gram grammar mar S 0A0 | 1B1 | BB, B
C, B S | A, C S | .
Is it possible possible that that a Turing Turing Machine Machine could be be considered considered as a comput computer er of
And simplify using the safe order.
functions from inters? If yes, justify your answer.
i)
Eliminate production
ii)
Eliminate unit production
2.
Design Design a Turing Turing machin machinee to compute compute proper proper subtractio subtraction n m –n
iii) iii)
Elim Elimin inat atee usel useles esss produ product ctio ion n
iv) iv)
Put Put the the gram gramma marr in CNF CNF
3.
Find a grammar grammar in Chomsky Chomsky Normal Normal Form Form equival equivalent ent to S aAbB, A aA
4.
| a, B bB | b 4.
5.
Form
Construct Construct a grammar grammar in Greibach Greibach Normal Normal Form equival equivalent ent to the grammar grammar S
i j
Show Show that that L = { a b c d | i > 1, j > 1 } is not a context context free free language language
4.
Design Design a Turing Machine Machine M to implement implement the the function function “multiplica “multiplication” tion” using using 2.
Explain Explain how a Turing Turing Machine Machine with with the multipl multiplee tracks of of the tape tape can be
Design Design a Turing Turing Machine Machine to to accept accept the langua language ge L = { 0n 1n | n > 1 } and and
Explain Explain how the the finite control control of of a Turing Turing Machine Machine can be used used to hold a finite amount of information with an example.
bAB, B b, D d
4.
Design Design a TM TM to comp compute ute f( f( m, n ) = m * n, m, n N.
Convert Convert to Greibach Greibach Normal Normal Form of of the grammar grammar G = ( {A1, A2, A3}, {a, b},
5.
Explain Explain how a multiple multiple track track in the the TM can be used used for testing testing given given positive positive
A2 A3A1 | b
integer is a prime or not. A3 A1A2 | a
Show Show that that the languag languagee { 0n 1n 2n | n > 1 } is not a context free language.
Nov / Dec Dec – 2004
Nov / Dec Dec – 2005
1. 2.
Design Design a Turing Turing Machin Machinee to comput computee f ( m + n ) = m + n m, n > 0 and simulate their action on the input 0100.
2.
State pumping pumping lemma lemma for for context context free free languag language. e. Show Show that { an bn cn | n is an
simulate its action on the input 00111. 3.
Find a grammar grammar in Chomsky Chomsky Normal Normal Form Form equival equivalent ent to S aAD, A aB |
A1 A2A3
1.
n
integer n > 1 } is not context free language.
P , A1 ) where P consists of the following
5.
n
April April / May – 2005
1.
used to determine the given number is prime or not? 3.
n
State pumping pumping lemma lemma for for context context free free language. language. Show Show that that { 0 1 2 | n > 1 } is not a context free language.
i j
the subroutine “copy”. 2.
5.
AA | a, A SS | b
April / May – 2004
1.
Conv Conver ertt the the gram gramma marr S AB, A BS | b, B SA | a into Greibach Normal
Explain Explain how a multiple multiple track track in the TM can be used for testing testing given given positive positive integer is a prime or not.
3.
Describe Describe the follow following ing Turing Turing Machine Machine and their their working. working. Are Are they more more
Design Design a Turing Turing machine machine to compute compute proper proper subtraction subtraction m – n
Obtain Obtain the CNF equiva equivalent lent to the the grammar grammar S bA | aB, A bAA | aS | a, B
aBB | bS | b
powerful than the basic Turing Machine?
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 10
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 4.
Conv Conver ertt the the gram gramma marr S AB, A BS | b, B SA | a into
Greibach Normal Form. 5.
1.
i j
a b c d | i > 1 and j > 1 } is not context context free. free. April / May – 2006
A1 A2A3 2.
A2 A3A1 | b
Show Show that that the languag languagee { 0n 1n 2n | n > 1 } is not a context free language. n
n
n
Show Show that that the languag languagee { a b c | n > 1 } is not a context context free language.
3.
Design Design a Turing machin machinee to compute compute x + y where x and and y are positive positive integers.
4. A3 A1A2 | a
n
2.
Constr Construct uct the the equiv equivalen alentt GNF for for the CFG CFG G = ( { A1, A2, A3}, { a, b }, P , A1 ) where P consists of the following
Find Find a gramma grammarr in CNF CNF equiva equivalen lentt to S aAbB, A aA | a, B bB | b
State the the pumping pumping lemma for for the context context free language. language. Show Show that language language { i j
1.
April April / May – 2007
What are the the features features of of universal universal Turing Turing Machine? Machine?
Nov / Dec Dec – 2007
1.
n
Simplify Simplify the followin following g grammar grammar and find find its equivale equivalent nt in CNF S AB | CA, B BC | AB, A a, C aB | b
3.
Design Design a Turing Turing Machine Machine to accept the languag languagee L = { 0 1 | n > 1 }
4.
Explain Explain with an examp example le how the finite finite contro controll of a Turing Turing Machine Machine can be
2.
Find Find the the GNF GNF equi equiva vale lent nt of the the gra gramm mmar ar
used to hold a finite amount of information.
3.
Design Design a TM M for f( x, x, y ) = x * y where where x, y are stored stored in the tape tape in the the
5.
functions involving integers. 6.
4.
April April / May – 2008
1.
Convert Convert the the grammar grammar with with producti production on into into CNF A bAB | , B Baa |
Suppose Suppose G is a CFG and and w of length length l is in L(G). L(G). How long is is a derivation derivation of
2.
Design Design a determinist deterministic ic Turing Turing Machine Machine to accept accept the languag languagee {a b c | i > 0 }
w in G if G is in CNF and if G is in GNF?
3.
Determine Determine whether whether the language language given given by L = {a |n>1} is context free or not.
2.
Show Show that that ever every y CFL CFL witho without ut can be generated by a CFG in CNF.
3.
Simplify Simplify the follow following ing grammar grammar and find find its equivale equivalent nt in CNF
i
i
n2
1.
Simplify Simplify the followin following g grammar grammar and find find its equivale equivalent nt in CNF A AB | CA, B BC | AB, A a, C aB | b S AA | 0, A SS | 1
Find Find the GNF GNF equival equivalent ent to to the gramm grammar ar
2.
Find Find the the GNF GNF equi equiva vale lent nt to the the gra gramm mmar ar
S AA | 0,
3.
Design Design a TM M for f( f( x, y ) = x * y where where x, y are are stored in in the tape tape in the the
A SS | 1
x
y
form 0 1 0 1
Design Design a TM M fro f( x, y, y, z ) = 2( x + y ) – z, z < 2( 2( x + y ) and and x, y, z are stored in the tape in the form 0 x10y1oz1.
6.
i
Nov / Dec Dec – 2008
S bA | aB, A bAA | aS | a, B aBB | bS | b
5.
Show that that context context free languages languages are are closed under under union operatio operation n but not under intersection
Design Design a TM TM to comp compute ute f( f( m, n ) = m * n, m, n Z by using the
Nov / Dec Dec – 2006
4.
y
form 0 1 0 1
+
subroutine..
1.
x
Explain Explain how a Turing Turing machine machine can can be viewed viewed as a computing computing device device on
S AA | 0, A SS
April April / May – 2009
Show that that if L is accepted accepted by a multitap multitapee Turing Machine Machine,, it is accepted accepted by
1.
Conv Conver ertt the the gram gramma marr S AB | aB, A aab | |, B bbA into CNF
single tape Turing Machine also.
2.
Prove that the the set of CFL is closed closed under union and kleene kleene closure. closure.
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 11
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 3. 4.
Constr Construct uct a TM M for for a langu language age L = { an bn | n > 1 }
Write short notes on checkin checking g off off symbol. symbol.
Nov / Dec Dec – 2009
1.
3.
Explain Explain the closure closure propert properties ies of context context free free languages. languages.
4.
Construct Construct the the Turing Turing machine machine for for the languag languagee L = { wwR | w is in ( 0 + 1 )* }
April April / May – 2011
Prove that that every every non empty empty CFL is is generated generated by a CFG CFG with no no useless useless
1.
symbols.
Prove Prove that that every every gramma grammarr with with productions can be converted to an equivalent grammar without productions.
2.
State State and and prov provee CNF CNF for for CFL. CFL.
2.
S a | AAB
Reduce Reduce the the followi following ng gramm grammar ar to CNF
3.
State and prove pumping pumping lemma for CFL. CFL.
4.
i i i Using Using pumpin pumping g lemma lemma P.T P.T the langua language ge {a b c | i > 1 } is not context free.
5.
Design Design a TM to recognize recognize each each of the the following following languag languages es
6.
Prove that TM TM with with one – way infinite infinite tape tape and and two two way infinite infinite tape are
4.
Construct Construct a Turing Turing machin machinee to accept accept the langu language age a b c
equivalent.
5.
Construct Construct a Turing Turing Machine Machine to perform perform proper proper subtra subtraction ction
7.
3.
2
2.
1. i
j
k
Define Define pumping pumping lemma lemma for for context context free free language language.. Show that that L = { a b c |
State the the techniques techniques for Turing Turing machine machine constructio construction? n? Illustrate Illustrate with with a simple language
2.
Explain Explain the different different models models of of Turing Turing machin machines es
3.
What are are the closure closure propert properties ies of CFL? CFL? State State the proof proof for any two properties.
4.
must move the entire string to the right one cell, learning all remaining cells blank.
April April / May – 2012
Convert Convert the followin following g grammar grammar into an equiva equivalent lent one with with no unit unit
S A | CB
1.
AC|D
B 1B | 1
Is the the lan langu guag agee L = { an bncmdm | n, m > 1 } is context free? Justify with planning lemma
C 0C | 0
2.
D 2D | 2
Obtain Obtain Greibac Greibach h Normal Normal Form Form for for the the grammar grammar A1 A2A3
Nov / Dec Dec – 2010
3.
Obtain Obtain a Greibach Greibach normal normal form gramma grammarr equivalent equivalent to the context context free grammar
State the the pumping pumping lemma for for CFLs. What What is its main applica application? tion? Give Give two examples.
productions and no useless symbols. Convert to
2.
C b n n n
Construct Construct a TM to move move an input input string over over the alphabet alphabet A = {a} to the the right
left of the input string. All other cells are blank, labeled by ^. The machine
1.
B b
i
one cell. Assume that the tape head starts some where on a blank cell to the
3.
A a | BC
Nov / Dec Dec – 2011
April / May – 2010
1.
B aba |
Conver Convertt the follow following ing gram grammar mar to GNF GNF S a | AB
Desi Design gn a TM TM to comp comput utee n .
A ab | aB |
S
AA | 0
A SS | 1
Nov / Dec Dec – 2012
1.
Construct Construct the the Turing Turing machine machine for for the languag languagee L = { 0n1n | n > 1 }
A2 A3A1 | a A3 A1A2 |b
Construct Construct Turing Machine Machine for for the langua language ge L = { 1n0n1n | n > 1 }
Convert Convert the the following following grammar grammar into into CNF CNF S cBA, S A, A cB, A AbbS, B aaa
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 12
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 2.
State and prove prove the pumpin pumping g lemma lemma for for CFL. CFL.
3.
Design Design a Turing Turing machine machine which which reverse reverse the given given string string { abb }
4.
Write briefly briefly about about the program programming ming techni techniques ques for for TM.
Nov / Dec Dec – 2004
April / May – 2013
1.
1.
Conver Convertt the follow following ing gramm grammar ar in CNF A BC D | b
B Yc | d
Obtain Obtain the code code for for the the TM M = ({ q1, q2, q3 }, { 0, 1 }, , q1, B, { q2 }) with moves
C gA | c
D dB | a
Y f
( q1, 1 ) = ( q3, 0, R )
( q3, 0 ) = ( q1, 1, R )
( q2, 1 ) = ( q2, 0, R )
( q3, B ) = ( q3, 1, L )
2.
Discuss Discuss about about programming programming techn techniques iques for for Turing Machin Machine. e.
2.
Show Show that that Lu is is recurs recursive ively ly enume enumerab rable. le.
3.
Explain Explain about about the closure closure properties properties of of CFL. CFL.
3.
Define Define Ld and show that that Ld is nor recursiv recursively ely enumera enumerable. ble.
4.
Explai Explain n in detail detail about about pump pumping ing for for CFL.
4.
Whether Whether the problem problem of determining determining given recursiv recursively ely enumerable enumerable language language is empty or not is decidable? Justify your answer.
UNIT UNIT – V
April April / May – 2005
Nov / Dec Dec – 2003
1.
Define Define Universal Universal language language Lu. Show Show that Lu is recursively recursively enumera enumerable ble but
1.
Define Define the langua language ge Ld. Show Show that that Ld is not not recursive recursively ly enumerabl enumerable. e.
2.
Show that that if a language language L and and its complemen complementt L’ are both both recursively recursively
not recursive
enumerable then L is recursive.
2.
Show that that the compleme complement nt of a recursive recursive langua language ge is recursive recursive..
3.
If a language language L and its complement complement L’ are are both recursive recursively ly enumerable enumerable then show that L and hence L’ is recursive.
4.
Define Define the language language Lu. Lu. Show that that Lu is recursive recursively ly enumerabl enumerablee but not recursive.
Nov / Dec Dec – 2005
Obtain Obtain the the code code for for < M, 1011 1011 > where where M = ({ q1, q2, q3 }, { 0, 1, B }, , q1, B, { q2 }) have moves
3.
( q1, 1 ) = ( q3, 0, R )
( q3, 0 ) = ( q1, 1, R )
( q2, 1 ) = ( q2, 0, R )
( q3, B ) = ( q3, 1, L )
April / May – 2004
1.
Show that union union of recursive recursive languag languagee is recur recursive sive
2.
Define Define the language language Ld and and show that that Ld is not recursi recursively vely enumerab enumerable le
1.
Define Define the language language Lu. Check Check whether whether Lu is recursively recursively enumerabl enumerable? e? Or Lu is recursive? Justify your answer.
2.
Show that that the language language Ld is neither neither recursive recursive nor recursiv recursively ely enumerabl enumerable. e.
3.
Describe Describe how a Turing Turing Machine Machine can can be encoded encoded with 0 and and 1 give an example.
April April / May – 2006
language.
1.
Show that that Lu is is recursively recursively enumer enumerable able but but not recursive recursive..
3.
Explain Explain the Halting Halting Problem. Problem. Is it decidable decidable or undecida undecidable ble problem? problem?
2.
Define Define the the langu language age Ld. Show Show that that Ld is neither recursive nor recursively
4.
Define Define Universal Universal Language Language Lu. Show Show that Lu is recursively recursively enumer enumerable able but not recursive.
enumerable. 3.
Show that that if a language language L and and its complemen complementt L’ are both both recursively recursively enumerable then L is recursive.
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 13
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers Nov / Dec Dec – 2006
1.
6.
Find whethe whetherr the follow following ing language languagess are recursiv recursivee or recursi recursively vely
L( G2 ) is a CFL.
enumerable.
2.
Nov / Dec Dec – 2007
a.
Union Union of two recur recursiv sivee languag languages es
b.
Union of two recursively enumerable languages languages
c.
If L and and complem complement ent of L are recursively recursively enumerable. enumerable.
d.
Lu
1.
Explain Explain the Post correspo correspondence ndence problem problem with an example example
2.
Find the the language language obtaine obtained d from the the following following operati operation on
Show that that “Finding “Finding whether whether the the given CFG CFG is ambiguous ambiguous or not” not” is undecidable by reduction technique.
3.
Consid Consider er the the TM M and and w = 01 where where M = ({ ({ q1, q2, q3 }, { 0, 1 }, , q1, B, {
0 1 B q1 q2, 1, R q2, 0, L q2, 1, L q2 q3, 0, L q1, 0, R q2, 0, R q3 - --- -- Reduce the above problem to Post’s Correspondence problem and find
a.
Union Union of of two recurs recursive ive langua languages ges
b.
Union of two recursively enumerable languages
c.
If L and and complem complement ent of L are recursively recursively enumerable enumerable..
April April / May – 2008
q3 }) and is given by
1.
Prove Prove that that the the functio function n f add( x, y ) = x + y is primitive recursive.
2.
Show that that there there exists a TM TM for which which the halting halting problem problem is unsolv unsolvable. able.
Nov / Dec Dec – 2008
1.
Prove Ld is on recursiv recursively ely enumerable enumerable and and Lu is recursively recursively enumerab enumerable le
2.
Show that that “Finding “Finding whether whether the given given CFG CFG is ambiguous ambiguous or not” not” is undecidable by reduction technique.
whether that PCP has a solution or not. 3.
April / May – 2007
1.
3 10 0 Show that it it is undecid undecidable able for for arbitrary arbitrary CFG’s G1 and G2 whether L( G1 ) n
Find the the language language obtaine obtained d from the the following following operati operation on
Show that that “If a language language L and and its complemen complementt L’ are both both recursively recursively
a.
Union Union of two recursi recursive ve langu languages ages
enumerable then L is recursive”.
b.
Union of two recursively enumerable languages languages
4.
2.
Show that haltin halting g problem problem of TM is undecidable undecidable..
3.
Does Does PCP PCP with with two two lists lists x = (b, (b, b, ab , ba ) and y = ( b , ba, a ) have a
3
3
April April / May – 2009
1.
solution. 4.
S.T the characte characteristic risticss function function of the set set of all even number number is recurs recursive. ive.
5.
Let = { 0, 1 }. Let A and B be the list of three strings each defined as Does this PCP have a solution? i 1 2
List A wi 1 10111
List B xi 111 10
Define Define the class class P and and NP NP
Prove the the theorem theorem “ If L1 and and L2 are two two recursive recursive languag languages es then L1 U L2 L2 is also recursive language. If L1 and L2 are two recursively enumerable languages then L1 U L2 is also recursively enumerable languages”
2.
Prove Prove the theorem theorem “ The complem complement ent of recursiv recursivee language language is recursiv recursivee ”
3.
Prove Prove that that Lu is recursi recursively vely enumerable enumerable..
4.
Prove Prove that Lu is is not not recur recursiv sive. e.
Nov / Dec Dec – 2009
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 14
Rajalakshmi Institute of Technology Department Depar tment of Compu Computer ter Science and Engi Engineerin neering g – Theor Theory y of of Compu Computatio tation n – Part – B - Anna Unive University rsity previo previous us Semeste Semesters rs Ques Question tion Papers 1.
Prove that the the Universa Universall language language is recursiv recursively ely enumer enumerable able
but not recursive. 2.
State and and prove Rice’s Rice’s theorem theorem for recursiv recursively ely enumerable enumerable index index sets
3.
4.
Write short notes notes on on NP hard hard and NP complete complete problems problems
April April / May – 2012
Consider Consider the the language language of all all TMs that that gives no no input eventu eventually ally writes writes a non non
2.
Explain Explain the the difference difference between between P and and NP proble problems ms
blank symbol on their tapes. Explain why this set is decidable. Why does this
3.
Discuss Discuss the decidabi decidability lity of Post’s Post’s corresp corresponden ondence ce problem problem
4.
Explai Explain n any two two NP comple complete te proble problems ms
Prove that that the Post Post Corresponde Correspondence nce Problem Problem is decidable decidable for for strings strings over the
Nov / Dec Dec – 2012
alphabets
1.
If L1 and and L2 are are recursive recursive languag languages es then L1 L1 U L2 is a recursive recursive languag languagee
Prove that that the problem problem of determ determining ining if the the language language generated generated by two two CFGs
2.
Prove that the halting halting problem problem is undecid undecidable able
are equal id undecidable.
3.
State and prove prove the the Post’s Post’s correspo correspondenc ndencee problem problem
Prove that the punch punch card card puzzle puzzle is is NP complet complete. e.
4.
Write Write a note note on NP proble problem m
Nov / Dec Dec – 2010
1.
4.
Discuss Discuss any two two undecidable undecidable problem problemss about the the Turing Turing machine machine
non conflict with the halting problem 2.
Write short short notes on recursive recursive and and recursively recursively enumerab enumerable le language language
1.
April / May – 2010
1.
3.
April April / May – 2013
Explain Explain the differen difference ce between between tractable tractable and intract intractable able problem problemss with an
1.
Explain Explain about about “ A language language that that is not not Recursiv Recursively ely Enumera Enumerable ble “
example
2.
Prove Prove Lne Lne is is recur recursive sively ly enume enumerab rable le
2.
What What is halti halting ng proble problem? m? Expla Explain in
3.
Discuss Discuss on undecid undecidable able problem problem about Turing Turing Machine Machine
3.
Explain Explain the Post corresp corresponden ondence ce problem problem with with an example example
4.
Expl Explai ain n abou aboutt the the PCP PCP
4.
Explai Explain n any four four NP – complet completee probl problem em
April / May – 2011
1.
Prove that the the universal universal language language Lu is recursively recursively enumerable enumerable but but not recursive. Also prove that Ld is not recursive or recursivel y enumerable
2.
Prove that that PCP problem problem is undecidabl undecidablee and explain explain with with an example example
Nov / Dec Dec – 2011
1.
State the halting halting problem problem of of TMs. Prove Prove that the the halting halting problem problem of Turing Turing Machine over { 0, 1 }* as unsolvable.
2.
Let = { a, b }*. Let A and B be the lists of three strings as given below A = { b, bab3, ba } B = { b3, bc, a } Does this instance of PCP have a solution? J ustify your answer
Compiled By – B. Udaya, AP / CSE, RIT
Page No : 15