Sunteți pe pagina 1din 7

POKHARA UNIVERSITY

Level: Master
Semester Spring
Programme: CS/CE
Course: Theory of Computation

Year
: 2010
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.
1.

2.

3.

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.

S
b)

abSb | a | aAb, A

bS | aAAb

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

L= {an b2n: n>0}


4.

5.

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)

"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 undecidable 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.

6.

7.

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.

Write short notes on any two:

25

a)

Application of regular expression.

b)

Tractable and intractable problems.

c)

Some computing puzzles

======
POKHARA UNIVERSITY
Level: Master
Programme: MCS/MCE

Semester Fall

Course: Theory of Computation

Year
: 2012
Full Marks: 100
Pass Marks : 60
Time
: 4 hrs

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.
8.

Theory of computation deals with automata theory, complexity theory


and computability theory. Explain.

10

9.

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

10

10.

State and proof pumping lemma for context free language.


When is a grammar ambiguous? Show that the following grammar is
ambiguous.
S->AB| aabB, A->a|Aa, B-> b

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

11.

12.

B->aSB|bBX
X->SBD|aBx|ad
13.

Explain move of a PDA. Design a PDA for the language L= { wcw r |


w{a, b}*}

14.

The class of language accepted by pushdown automata is exactly the


class of context free languages. Justify this statement with an example.

15.

Define instantaneous description. Design a Turing machine which


compute the function f (m) = m+1 for each m that belongs to the set of
natural numbers.

16.

Define recursive and recursively enumerable language. Does recursive


language and recursively enumerable language give the notion of
decidable and un-decidable language? Explain.

10

17.

Explain decision problem, function problem and search problem with


example.

18.

Discuss briefly about recursively function theory.

19.

Discuss deterministic Turing machine and non- deterministic Turing


machine. How do these machines give the notion of class p and class NP
problems? Explain.

============
POKHARA UNIVERSITY
Level: Master
Semester Fall
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.
20.
21.
22.

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.
Can you relate regular expression and context free grammar? If yes then
3

10
10
10

23.
24.
25.

26.
27.

28.

29.

how? Explain with an example.


What do you mean by normal form? Change the following grammar into
CNF. SabSb | a | aAb, A bS | aAAb
Define moves of a PDA. Design a PDA for the following language. L= {a n
b2n: n>0}
What is Instantaneous description? Design a Turing machine that
recognizes the language of all the stings of even length over alphabet {a,
b}.
"Theory of computation deals with computational theory and complexity
theory". Justify this statement with examples.
Differentiate between recursive and recursively enumerable language. Do
these languages provide the notion of decidable and un-decidable
problems? Explain.
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 DFA can simulate the behavior of NFA by increasing the number of
states". Justify this statement with an example.

10
10
10

10
10

10

10

=======
POKHARA UNIVERSITY
Level: Master
Semester Spring
Programme: ME
Course: Theory of Computation

Year
: 2013
Full Marks: 100
Pass Marks: 60
Time
: 4 hrs.

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.
30.
31.
32.

State Ardens theorem. How do you a construct a Regular Expression


using Ardens Theorem? Explain with an example of your own.
A DFA can simulate the behavior of NFA by increasing the number of
states. Justify this statement with an example.
State the closure properties of regular expression. Also state and prove
pumping lemma for regular sets.
4

10
10
10

33.

34.

35.
36.

37.
38.
39.

Define CNF and GNF. Consider G with the production of S->aAB , A> bC , B->b, C->c. Construct an equivalent grammar in CNF and
GNF.
Explain the process of eliminating useless symbols and productions from
a CFG. Simplify the following grammar, eliminating both unit
productions and useless productions and symbols.
S A | Bb
AC|a
B aBa | b
C aSa
When is a grammar ambiguous? Prove that the following grammar is
ambiguous. E E * E E + E E - E x y
Why is PDA functionally stronger than FA? Explain. Design a PDA that
processes the language 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 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.
Briefly discuss the recursive function theory with examples.

10

10

10
10

10
10
10

=========
POKHARA UNIVERSITY
Level: Master
Semester Fall
Programme: ME CE/S.Sc.CS
Course: Theory of computation

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.
40.
41.
42.
43.

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 statement with an example.
State and proof the closure properties for Regular language.
Define derivation tree. When is a grammar ambiguous? Show that the following
5

8
10
10
10

grammar is ambiguous.

S->AB|aaB
A->a|Aa
B->b
Why do we need to simplify a grammar? Explain the process of eliminating null
production from a grammar. Simplify the following grammar.

44.

S->AB|C
A->B
B->aB|Bb||a
C->aCb
How can you decide whether a language is context free language or not? Explain
with an example.

45.
46.

For every CFG there is an equivalent Push down Automata.


Justify this statement with an example.
Define instantaneous description. How can you determine the
computability of a function? Explain with an example.
Define recursive and recursively enumerable language. How can
distinguish between decidable and un-decidable problem? Explain.8
Discuss briefly about recursively function theory.
Turing machine is functionally stronger than FA and PDA.
Justify. Does the complexity of TM play any role to determine class
P and class NP problems? Explain.

47.
48.
49.
50.

10
8
10
8
8
10

======
POKHARA UNIVERSI TY
Level: Master
Semester: Fall
Programme: M.Sc. CE/ CS
Course: Theory of Computation

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:
1.
2.

Define Finite state machine with an example. Discuss the operational


characteristics and working principle of finite automata with an example.
Why do we need to remove the epsilon transitions from finite automata?
6

10
10

3.
4.

5.

6.

7.

8.

9.

10.

Explain the 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 relate regular expression and CFG? If Yes,
Explain with an example.
How can you simplify a CFG? Find a reduced grammar equivalent to the
grammar G whose productions areSAB | CA|A|, BBC ||AB, Aa, CaB | b
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. 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 does TM is considered functionally stronger among all
of these?
Differentiate between recursive and recursively enumerable language. Do
these languages provide the notion of decidable and un-decidable
problems? Explain.
Discuss briefly about the recursive function theory.

10
10

10
10
10
10
10

10

10

10

S-ar putea să vă placă și