Cs3452 Theory of Computation
Cs3452 Theory of Computation
PART-A
1. Define hypothesis.
2. Define inductive proof.
3. What is structural induction? May/June 2011
4. What is proof by contradiction? May/June 2012
20. Design FA to accept the string that always ends with 00.
21. Design DFA to accept the strings over {0,1} with two consecutive 0’s. C Nov/Dec 2014
PART B
ii. Construct NFA for set of all strings {0,1} that ends with three consecutive 1‘s
at its end.
iii. Construct NFA for set of all strings {a,b} with abb as substring.
7. If a Regular language ‗L‘ is accepted by a Non – deterministic Finite automata
then there exist a Deterministic Finite Automata that accepts ‗L‘
Nov/Dec 2013&Nov/Dec 2014
8. A Language ‗L‘ is accepted by some ε – NFA if and only if L is accepted by NFA
without ε transition May/June 2012 & Nov/Dec 2013
a b c ε
p(start) {q} {p} φ φ
q {r} Φ {q} φ
*r Φ Φ φ {r}
13. i. Prove that 2 is not rational.
ii. Construct a DFA accepting all strings w over {0,1} such that the number of 1‘s in w is 3 mod 4
Nov/Dec 2011
n
17. Construct an NFA accepting binary strings with two consecutive 0‘s. May/June 2012
18. Explain different forms of proof with examples. May/June 2012
19. i. Prove that if n is a positive integer such that n mod 4 is 2 or 3 then n is not a
perfect square. May/June 2012
ii. Construct a DFA that accept the following language.
20. i. Construct DFA to accept the language L= { w / w I of even length and begins with 11}
ii. Write a note on NFA and compare with DFA. May/June 2013
21. Construct DFA equivalent to the NFA given below: Nov/Dec 2013
24. Construct a DFA that accepts all strings on {0,1} except those containing the substring 101.
May/June 2014
25. i. Construct a NFA accepting the set of strings over {a,b} ending in aba. Use it to
construct a DFA accepting the same set of strings. May/June 2014
ii. Construct NFA with ε moves which accepts a language consisting the stings of any
number of a‘s, followed by any number of b‘s, followed by any number of c‘s.
2
26. Prove that L={0 i / i is an integer; i>0} is not regular.A Nov/Dec 2014, 2015
27. i. Prove that every tree has ‗e‘ edges and ‗e+1‘ nodes. A Nov/Dec 2014
ii. Prove that for every integer n 0 the number 42n+1+3n+2 is a multiple of 13. A
28. Construct a DFA equivalent to the the NFA M=({a,b,c,d},{0,1}, δ,a,{b,d}) where δ is
defined as Nov/Dec 2014
δ 0 1
a {b,d} {b}
b c {b,c}
c d a
d - a
29. Design a DFA accepts the following strings over the alphabets {0, 1} that contain a pattern
11. Prove this using mathematical induction. April/May 2015
30. Design a NFA accept the following strings over the alphabets {0,1} that begins with 01
and ends with 11. Check for the validity of 01111 and 0110 strings. April/May 2015
31. Prove that ―A language L is accepted by some DFA if and only if L is accepted by
some NFA‖.
32. Consider the following ε-NFA for an identifier. Consider the ε-closure of each state and
find it‘s equivalent DFA. (10) Nov/Dec 2015
33. Construct a NFA that accepts all strings hat end in 01. Give its transition table and extend
transition function for the input string 00101. Also construct a DFA for the above NFA using
subset construction method. May-June2016
37. Convert the epsilon NFA and list the difference between NFA and DFA.
Nov-Dec2017
38. Convert the following E-NFA to NFA and then convert the resultant NFA to DFA.
Nov-Dec 2018
39. Prove that a language L is accepted by some NDFA if and only if L is accepted by
some DFA. Nov-Dec 2018
42. Give NFA accepting the set of strings in (0+1)* such that two 0‘s are separated by a string
whose length is 4i, for some i>=0. U Nov-Dec 2019
*
43. Construct a minimized DFA from R.E (x+y)x(x+y) . Trace for a string w=xxyx.
Nov/Dec 2011
UNIT II REGULAR EXPRESSIONS AND LANGUAGES
PART A
3. Give the regular expression for set of all strings ending in 00. Nov/Dec 2010
10. Give English description of the following language (0+10)*1*. April/May 2015
11. Write RE for the set of strings over {0,1} that have atleast one. Nov/Dec 2015
12. Show whether a language L=(0n12n/n>0} is regular or not using pumping Lemma.
E May-June 2017
1. State and explain the conversion of DFA into R.E using Arden‘s theorem. Illustrate with an
example. Nov/Dec 2011
6. Obtain the regular expression for the finite automata. May/June 2012
7. i. Using pumping lemma for the regular sets, prove that the language L={ambn/m>n} is not
regular.
ii. Prove any two closure properties of regular languages. Nov/Dec 2012
8. Construct a minimized DFA from R.E 0*(01)(0/111)*. C Nov/Dec 2012
9. Discuss on the relation between DFA and minimal DFA May/June 2013
10. i. Discuss on regular expression. May/June 2013
ii. Discuss in detail about the closure properties of regular languages.
11. Prove that the following languages are not regular May/June 2013
i. {02n/n>0}
ii. {ambnam+n/m>0and n>0} Nov/Dec 2013
12. Discuss on equivalence and minimization of automata. May/June 2013
13. Convert the following NFA into a R.E Nov/Dec 2013
14. i. Design a FA for the R.E (0+1)*(00+11)(0+1*) May/June 2014 ii. Prove
2
that L={0 i / i is an integer; i>0} is not regular. An
Nov/Dec 2014, 2015
15. Prove that the class of regular sets is closed under complementation.
May/June 2014
16. Construct a minimized DFA for the RE 10+(0+11)0*1. Nov/Dec 2014
17. Explain the DFA minimization algorithm with an example. Nov/Dec 2014
18. Find the min- state DFA for (0+1)*10. April/May 2015
19. Find the regular expression of a language that consists of set of strings with 11 as well
as ends with 00 using Rij formula. April/May 2015
20. Construct FA equivalent to the regular expression(ab+a)*
Nov/Dec 2015
21. What is Regular Expression? Write a regular expression for set of strings that consists of
alternating 0's and 1's. May-June2016
22. Minimize the FA shown in fig below and show both the given and the reduced one are
equivalent. May/June 2014
23. Write and explain the algorithm for minimization of a DFA. Using the above
algorithm minimize the following DFA. A May-June2016
24. Construct NFA with epsilon for the R.E=(a/b)*ab and convert into DFA and further find
the minimized DFA. C May-June 2017
25. Show that the regular language are closed under : E Nov-Dec2017
o Union
o Intersection
o Kleen closure
o Complement
o Difference
26. Minimize the following automaton E Nov-Dec 2018
30. Prove that the following languages are not regular: E Nov-Dec 2019
r
i. {w€{a,b}*/w=w }
ii. Set of string of 0‘s and 1‘s beginning with a 1, whose value treated as binary
number is a prime.
UNIT III
7. For the grammar defined by the productions recognize the string 1001 and also
construct the parse tree.
8. Consider the alphabet Σ = { a,b,(,),+,*,-, . ,ξ }. Construct a CFG that generate all the
strings in Σ* that are regular expression on the alphabet, Σ. C
Nov/Dec 2007
11. Let G = ( {S,C}, {a,b}, P,S} where P consists of S aCa, C aCa, Find L(G))?
12. Write a grammar to recognize all prefix expressions involving all binary arithmetic
operators. Construct the parse tree for the sentence “-*+abc/de” from your grammar.
Nov/Dec 2006
13. Write the CFG for the following CFL L(G) = { / m+n=p, m&n>1}
Nov/Dec 2006
14. Let G = ( {S,C}, {a,b}, P,S} where P consists of S aCa, C aCa, Find L(G))?
29. Convert the following grammar into an equivalent one with no unit productions and no
useless symbols S ABA A aAA/aBC/bB BA/bB/Cb
CCC/cC. Nov/Dec 2011
35. Generate CFG for a signed integer constant in C language. May- June 2017
36. Derive the string “aabaab” for the following CFG Nov/Dec 2017
SaSX/b
XXb/a
SaSXaaSXXaabXXaabaXaabaXbaabaab
aSbb
S → aab
40. What are the different ways of language acceptance by a PDA and define them?
. Nov/Dec 2012 ,April/May2015, Nov/Dec 2015
44. Is it true that non – deterministic PDA is more powerful that deterministic
PDA?Justify?
45. What is the additional feature PDA has when compared with NFA?Is PDA
superior over NFA in the sense of language acceptance? justify? (Or)
Compare NFA & PDA. Nov/Dec 2013
48. Construct a RMD of (a+b)*c using the grammar and also state that whether a given
grammar is ambiguous or not. May- June 2017
EE+E
EE*E
E(E)
Ea|b| c
49. Differentiate PDA acceptance by empty stack with acceptance by final state.
May- June 2017
13. Construct a PDA for the language L={x€{a,b}*/ na(x)>nb(x)} April/May 2015
29. Explain about parse tree. For the following grammar. May/June 2013
For the string aaabbabbba, Find i. LMD ii. RMD iii. Parse tree Nov/Dec 2015
32. Let G=(V,T,P,S) be a CFG then prove that if the recursive inference procedure tells us that
terminal string W is in the language of variable A, then there is a parse tree with root A and
yield w. Nov/Dec 2015
33. Given the Grammar G=(V,∑, R,E), Where
V= {E,D,1,2,3,4,5,6,7,8,9,0,+,-,*,/,(,)}
∑={1, 2,3,4,5,6,7,8,9,0,+,-,*,/,(,)} and
R contains the following rules:
ED|(E)|E+E|E-E|E*E|E/E
D0|1|2…..9. Find a parse tree for the string 1+2*3
34. What is ambiguous grammar? Explain with an example.
Nov/Dec2015, May-June2016
35. Show the derivation steps and construct derivation tree for the string ababbb' by using left
most derivation with the grammar. May-June2016
S —> AB / ξ, A—> aB, B—> Sb
36. Construct a CFG for the regular expression (011+1) (01). May-June2016
37. Construct CFG for the language L={an/n is odd} Nov-Dec2016
38. Define derivation tree. Explain its uses with an example. Nov-Dec2016
39. Construct a CFG to generate even and odd set of palindrome over alphabet {a,b}.
Nov-Dec2017
40. Generate CFG for the language L={0i1j0k/j>i+k} Nov-Dec2017
41. Show that the following grammar is ambiguous: SSbS/a. Nov-Dec 2018
Normal forms for CFG – Simplification of CFG- Chomsky Normal Form (CNF) and Greibach
Normal Form (GNF) – Pumping lemma for CFL – Closure properties of Context Free
Languages –Turing Machine : Basic model – definition and representation – Instantaneous
Description – Language acceptance by TM – TM as Computer of Integer functions –
Programming techniques for Turing machines (subroutines).
PART A
8. Define Turing Machine. Nov/Dec 2010,2015& 2017 , May/June 2014 & 2016
9. What are the required fields of an instantaneous description or configuration of a TM?
Nov-Dec2016
10. What is multiple tracks Turing machine?
14. List out the different techniques for TM construction. R Nov/Dec 2013
PART B
n n n
1. Is the language L = {a b c | n>=1} is context free? Justify. AN Nov/Dec 2010
(Or) Show that the Language L={ a i b i c i/ i 1} is not context free. A May/June 2014
11. Construct a equivalent grammar G in CNF for the grammar G1 where G1=({S,A,B}, {a,b},
{ SASB/£, AaAS/a, BSbS/A/bb},S). Nov/Dec 2015
12. Given the CFG G, find CFG G‘ in CNF generating the language L(G)-{^}
SAACD
AaAb/^
CaC/a
DaDa/bDb/^ April/May 2015
13. Construct a reduced grammar equivalent to the grammar G = (N, T, P, S) where,
N = {S. A, C, D, E} T= {a, b}
P = { S —> aAa, A —> Sb, A —> bCC, A —> DaA, C —> abb. C —> DD, E
aC, D —> aDA}. May-June2016
14. What is the purpose of normalization? Construct the CNF and GNF for the following
grammar and explain the steps. May-June2016
16. Given the CFG G, find CFG G‘ in CNF generaring the language L(G)- { ξ}
SAACD May- June 2017
AaAb\ ξ
CaC\a
DaDa\bDb\ ξ
17. Convert the following grammar G into Greibach Normal Form SXA\
BB May- June 2017
Bb\SB
Xb, Aa
18. Find an equivalent grammar in CNF for the grammar:
SbA/aB Nov-Dec2017
AbAA/aS/a BaBB/bS/b
19. Eliminate the unit production of the following grammar
SA/bb Nov-Dec2017
AB/b
BS/a
20. Design a TM that accepts the language of odd integers written in binary.
Nov/Dec 2011
21. What are the applications of TM. Nov/Dec 2012
n n
22. Construct the Turing machine for the language L = {0 1 |n >=1 } C
Nov/Dec 2010
23. i. Explain the difference between tractable and intractable problems with examples. A
ii. What is halting problem? Explain. Nov/Dec 2010, Nov/Dec 2015
24. i. State the techniques for TM construction. Illustrate with a simple language.U
ii. Explain the different models of TM. Nov/Dec 2011
25. State the halting problem of TMs. Prove that the halting problem of TM over {0,1}* as
unsolvable. Nov/Dec 2011
26. Explain any two higher level techniques for TM construction.May/June 2012
27. Construct the Turing machine for the language L = {1n0 n 1 n |n >=1 } C
May/June 2012
28. a. Design TM which reverses the given string {abb}. Nov/Dec 2012
b. Write briefly about the programming techniques for TM. May/June 2013
29. Explain TM as a computer of integer functions with an example. Nov/Dec 2013
30. Write short notes on the following: Nov/Dec 2013
a. Two way infinite tape TM
b. Multiple tracks TM
31. a. Design a TM to accept the language L0 n 1 n /n>=1} and stimulate its action on the input
0011. May/June 2014, Nov/Dec 2015
b. Write shot note on checking off symbols.
32. Design a TM, M to implement the function ―multiplication‖ using the subroutine ―copy‖.
Nov/Dec 2014
33. Construct TM to perform copy operation. April/May 2015
34. Explain the programming techniques for TM construction. Nov/Dec 2015,2016
35. Describe the Chomsky hierarchy of languages. Nov/Dec 2015&2017 , May- June 2017
36. Construct a Turing Machine to accept palindromes. Trace the string "abab" and "baab".
May-June2016
37. Explain the variations of Turing Machine. May-June2016
38. Explain Halting problem. Is it solvable or unsolvable problem? Discuss.
39. Describe the Chomsky hierarchy of languages with example. What are the devices
that accept these languages?
40. Write about Multi-tape TM. Nov-Dec2016
41. Highlight the implications of halting problems. Nov-Dec2016
42. Construct a TM to reverse the given string. May-June2107
43. Explain Multi tape and Multi head Turing machine with suitable example.
May-June2107
44. Construct TM that replace all occurrence of 111 by 101 from sequence of 0‘s and 1‘s.
Nov-Dec2017
45. Explain techniques for TM construction. Nov-Dec2017
46. Prove that Halting problem is undecidable. Nov-Dec2017
47. Consider two tape TM and determine whether the TM always write a nonblank symbol on
its second tape during the computation on any input string ‗w‘. formulate this problem as
a language and show it is undecidable. Nov-Dec2017
48. Simply the following grammar by eliminating null productions, unit production and
useless symbols and then convert to CNF. Nov-Dec2018
SABC/BaB
AaA/ BaC/aaa
BbBb/a/D
CCA/AC
D ξ
52. Convert the following grammar G into Greibach Normal Form
SAB, ABS/b, BSA/a Nov-Dec2018
53. Prove that the language L={anbncn/n>=1} is not context free using pumping lemma
Nov-Dec2018
54. Give the five tuple representation of a TM and explain the representation. Define
the language accepted by a TM. U Nov-Dec2018
55. Design TM that accepts the language L={SS/ S is in {a,b}* Nov-Dec2018
UNIT V UNDECIDABILITY
PART A
1. When a language is said to be recursively enumerable? Nov/Dec 2010, May/June
2012, Nov/Dec 2012, May/June 2013, Nov/Dec 2013,May/June 2014,
April/May2015
8. Define the class P and NP. R May/June 2013, 2014 & Nov-Dec 2019
15. Show that any PSPACE-hard language is also NP-hard. Nov/Dec 2010
16. Mention the difference between P and NP problems. May/June 2012
21. Identify whether 'Tower of Hanoi' problem is tractable or intractable. Justify your
answer. May-June2016