You are on page 1of 6

Pokhara University

Level: Master Semester – Spring Year : 2010


Programme: CS/CE Full Marks : 100
Course: Theory of Computation Pass Marks : 60
Time : 4hrs.
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.

1 a) Define decision problems, function problems and search problems with examples. 7

b) What do you mean by regular set? State and prove pumping lemma for regular sets. 8

2 a) Can you relate regular expression and context free grammar? If yes then how? Explain with an 7
example.

b) Can we use graph as a problem solving tool? If yes how? What type of problem can be solved using 8
spanning tree? Explain.

3 a) What do you mean by normal form? Change the following grammar into CNF. 8

b) Define moves of a PDA. Design a PDA for the following language: 7


L= {an b2n: n>0}

4 a) What is Instantaneous description? Design a Turing machine that recognizes the language of all the 7
stings of even length over alphabet {a, b}.

b) "Theory of computation deals with computational theory and complexity theory". Justify this 8
statement with examples

5 a) Differentiate between recursive and recursively enumerable language. Do these languages provide 8
the notion of decidable and un-decidable problems? Explain.

b) Define class P and NP problem with examples. How does P and NP class problems reflect the notion 7
of deterministic and non-deterministic algorithm? Explain.

6 a) "A DFA can simulate the behavior of NFA by increasing the number of states". Justify this statement 7
with an example.

b) Define derivation and parse tree. When a CFG is ambiguous. Explain with an example. 8

7 Write short notes on any two: 2*5


a) Application of regular expression.
b) Tractable and intractable problems.
c) Some computing puzzles
Pokhara University
Level: Master Semester – Fall Year : 2012
Programme: CS/CE Full Marks : 100
Course: Theory of Computation Pass Marks : 60
Time : 4hrs.
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.

1 Theory of computation deals with automata theory, complexity theory and 10


computability theory. Explain.

2 For every regular expression there exists finite automata and for every finite 10
automaton there exists a regular expression. Justify this statement with an example.

3 State and proof pumping lemma for context free language. 8

4 When is a grammar ambiguous? Show that the following grammar is ambiguous. 8


S->AB| aabB, A->a|Aa, B-> b

5 Explain the process of eliminating use less symbols from a CFG. Remove the useless symbol 8
from the given context free grammar.
S-> aB|bX
A->Bad|bSX|a
B->aSB|bBX
X->SBD|aBx|ad

6 Explain move of a PDA. Design a PDA for the language L= { wcwr 8

7 The class of language accepted by pushdown automata is exactly the class of context free 8
languages. Justify this statement with an example.

8 Define instantaneous description. Design a Turing machine which compute the function 7
f (m) = m+1 for each m that belongs to the set of natural numbers.

9 Define recursive and recursively enumerable language. Does recursive language and 10
recursively enumerable language give the notion of decidable and un-decidable language?
Explain.

10 Explain decision problem, function problem and search problem with example. 8

11 Discuss briefly about recursively function theory. 7

12 Discuss deterministic Turing machine and non- deterministic Turing machine. How do these 8
machines give the notion of class p and class NP problems? Explain.
Pokhara University
Level: Master Semester – Fall Year : 2013
Programme: CS/CE Full Marks : 100
Course: Theory of Computation Pass Marks : 60
Time : 4hrs.
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.

1 Define decision problem, function problem and search problem with examples. 10

2 What do you mean by regular set? State and prove pumping lemma for regular sets. 10

3 Can you relate regular expression and context free grammar? If yes then how? Explain with 10
an example.

4 What do you mean by normal form? Change the following grammar into CNF. 10
aAAb

5 Define moves of a PDA. Design a PDA for the following language. L= {an b2n: n>0} 10

6 What is Instantaneous description? Design a Turing machine that recognizes the language 10
of all the stings of even length over alphabet {a, b}.

7 "Theory of computation deals with computational theory and complexity theory". Justify 10
this statement with examples.

8 Differentiate between recursive and recursively enumerable language. Do these languages 10


provide the notion of decidable and un-decidable problems? Explain.

9 Define class P and NP problem with examples. How does P and NP class problems reflect 10
the notion of deterministic and non- deterministic algorithm? Explain.

10 "A DFA can simulate the behavior of NFA by increasing the number of states". Justify this 10
statement with an example.
Pokhara University
Level: Master Semester – Spring Year : 2013
Programme: CS/CE Full Marks : 100
Course: Theory of Computation Pass Marks : 60
Time : 4hrs.
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.
1 State Arden’s theorem. How do you a construct a Regular Expression using Arden’s 10
Theorem? Explain with an example of your own.

2 “A DFA can simulate the behavior of NFA by increasing the number of states”. Justify this 10
statement with an example.

3 State the closure properties of regular expression. Also state and prove pumping lemma for 10
regular sets.

4 Define CNF and GNF. Consider G with the production of S->aAB , A-> bC , B->b, C->c. 10
Construct an equivalent grammar in CNF and GNF.

5 Explain the process of eliminating useless symbols and productions from a CFG. Simplify the 10
following grammar, eliminating both unit productions and useless productions and symbols.
S → A | Bb
A→C|a
B → aBa | b
C → aSa

6 When is a grammar ambiguous? Prove that the following grammar is ambiguous. E E * 10
E E + E E - E  x y

7 Why is PDA functionally stronger than FA? Explain. Design a PDA that processes the language 10
L containing equal number of 0’s and 1’s over å = {0,1} and check whether the string
w=001011 is accepted or not.

8 What do you mean Instantaneous Description? Design a Turing machine which accepts all 10
the string of even length over }.

9 Differentiate between class P and class NP problems with examples. Do they reflect the 10
notion of decidable and undecidable problems? Explain.

10 Briefly discuss the recursive function theory with examples. 10


Pokhara University
Level: Master Semester – Fall Year : 2014
Programme: CS/CE Full Marks : 100
Course: Theory of Computation Pass Marks : 60
Time : 4hrs.
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.
1 How can you tie up regular expression and grammar? Explain with an example. 8

2 “For every finite automata there exists an equivalent regular expression”. Justify this 10
statement with an example.

3 State and proof the closure properties for Regular language. 10

4 Define derivation tree. When is a grammar ambiguous? Show that the following grammar is 10
ambiguous.
S->AB|aaB
A->a|Aa
B->b

5 Why do we need to simplify a grammar? Explain the process of eliminating null production 8
from a grammar. Simplify the following grammar.
S->AB|C
A->B
B->aB|Bb|Є|a
C->aCb

6 How can you decide whether a language is context free language or not? Explain with an 10
example.

7 “For every CFG there is an equivalent Push down Automata”. Justify this statement 8
with an example.

8 Define instantaneous description. How can you determine the computability of a 10


function? Explain with an example.

9 Define recursive and recursively enumerable language. How can distinguish 8


between decidable and un-decidable problem? Explain.

10 Discuss briefly about recursively function theory. 8

10 “Turing machine is functionally stronger than FA and PDA”. Justify. Does the 10
complexity of TM play any role to determine class P and class NP problems? Explain.
Pokhara University
Level: Master Semester – Fall Year : 2015
Programme: CS/CE Full Marks : 100
Course: Theory of Computation Pass Marks : 60
Time : 4hrs.
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.
1 Define Finite state machine with an example. Discuss the operational characteristics and 10
working principle of finite automata with an example.

2 Why do we need to remove the epsilon transitions from finite automata? Explain the 10
process of eliminating epsilon moves from a given FA with an example.

3 How can you determine the class of language of finite automata? Explain. 10

4 Explain Chomsky hierarchy of grammar with their respective mathematical models. Can you 10
relate regular expression and CFG? If Yes, Explain with an example.

5 How can you simplify a CFG? Find a reduced grammar equivalent to the grammar G 10
whose productions are-

SAB | CA|A|, BBC ||AB, Aa, CaB | b

6 What do you mean by Normal Form? Reduce the following grammar to CNF. 10
S1A | 0B, A1AA | 0S | 0, B0BB | 1S |1

7 Discuss the application of pumping lemma of a context free language with an example. 10
Construct a PDA that will accept all strings over {a, b} consisting of equal number of a’s and
b’s.

8 Differentiate between FA, PDA and TM on the basis of string acceptance. Also explain why 10
does TM is considered functionally stronger among all of these?

9 Differentiate between recursive and recursively enumerable language. Do these languages 10


provide the notion of decidable and un-decidable problems? Explain.

10 Discuss briefly about the recursive function theory. 10

You might also like