Question TOC
Question TOC
Programme: CS/CE
Course: Theory of Computation
Pokhara University
Semester Spring
Year
Full Marks
Pass Marks
Time
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.
a)
Define decision problems, function problems and search problems with examples.
b)
What do you mean by regular set? State and prove pumping lemma for regular sets.
a)
Can you relate regular expression and context free grammar? If yes then how? Explain with an
example.
b)
Can we use graph as a problem solving tool? If yes how? What type of problem can be solved using
spanning tree? Explain.
a)
What do you mean by normal form? Change the following grammar into CNF.
b)
a)
What is Instantaneous description? Design a Turing machine that recognizes the language of all the
stings of even length over alphabet {a, b}.
b)
: 2010
: 100
: 60
: 4hrs.
"Theory of computation deals with computational theory and complexity theory". Justify this
statement with examples
a)
Differentiate between recursive and recursively enumerable language. Do these languages provide
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
of deterministic and non-deterministic algorithm? Explain.
a)
"A DFA can simulate the behavior of NFA by increasing the number of states". Justify this statement
with an example.
b)
Define derivation and parse tree. When a CFG is ambiguous. Explain with an example.
2*5
Level: Master
Programme: CS/CE
Course: Theory of Computation
Pokhara University
Semester Fall
Year
: 2012
Full Marks : 100
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.
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.
Explain the process of eliminating use less symbols from a CFG. Remove the useless symbol
from the given context free grammar.
S-> aB|bX
A->Bad|bSX|a
B->aSB|bBX
X->SBD|aBx|ad
The class of language accepted by pushdown automata is exactly the class of context free 8
languages. Justify this statement with an example.
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.
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.
11
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.
Level: Master
Programme: CS/CE
Course: Theory of Computation
Pokhara University
Semester Fall
Year
: 2013
Full Marks : 100
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.
Define decision problem, function problem and search problem with examples.
What do you mean by regular set? State and prove pumping lemma for regular sets. 10
Can you relate regular expression and context free grammar? If yes then how? Explain with 10
an example.
What do you mean by normal form? Change the following grammar into CNF.
aAAb
10
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
of all the stings of even length over alphabet {a, b}.
10
10
"Theory of computation deals with computational theory and complexity theory". Justify 10
this statement with examples.
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.
10
Pokhara University
Level: Master
Semester Spring
Programme: CS/CE
Course: Theory of Computation
Year
: 2013
Full Marks : 100
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.
State Ardens theorem. How do you a construct a Regular Expression using Ardens 10
Theorem? Explain with an example of your own.
A DFA can simulate the behavior of NFA by increasing the number of states. Justify this 10
statement with an example.
State the closure properties of regular expression. Also state and prove pumping lemma for 10
regular sets.
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.
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
AC|a
B aBa | b
C aSa
Why is PDA functionally stronger than FA? Explain. Design a PDA that processes the language 10
L containing equal number of 0s and 1s over = {0,1} and check whether the string
w=001011 is accepted or not.
What do you mean Instantaneous Description? Design a Turing machine which accepts all 10
the string of even length over }.
Differentiate between class P and class NP problems with examples. Do they reflect the
notion of decidable and undecidable problems? Explain.
10
10
10
Level: Master
Programme: CS/CE
Course: Theory of Computation
Pokhara University
Semester Fall
Year
: 2014
Full Marks : 100
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.
How can you tie up regular expression and grammar? Explain with an example.
For every finite automata there exists an equivalent regular expression. Justify this 10
statement with an example.
Define derivation tree. When is a grammar ambiguous? Show that the following grammar is 10
ambiguous.
S->AB|aaB
A->a|Aa
B->b
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
10
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.
10
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.
Level: Master
Programme: CS/CE
Course: Theory of Computation
Pokhara University
Semester Fall
Year
: 2015
Full Marks : 100
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.
Define Finite state machine with an example. Discuss the operational characteristics and 10
working principle of finite automata with an example.
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.
How can you determine the class of language of finite automata? Explain.
Explain Chomsky hierarchy of grammar with their respective mathematical models. Can you 10
relate regular expression and CFG? If Yes, Explain with an example.
10
How can you simplify a CFG? Find a reduced grammar equivalent to the grammar G
whose productions are-
10
What do you mean by Normal Form? Reduce the following grammar to CNF.
S1A | 0B, A1AA | 0S | 0, B0BB | 1S |1
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 as and
bs.
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?
10
10
10
10