Theory of Computation

advertisement
POKHARA UNIVERSITY
Level: Bachelor
Semester – Spring
Programme: BE
Course: Theory of Computation
Year
: 2010
Full Marks: 100
Pass Marks: 45
Time
: 3hrs.
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)
Design a DFA which accepts the language L={w Є (0, 1)* / second
symbol of w is ‘0’ and fourth symbol is 1}.
b)
Prove that the language L={anban for n=0,1,2,3,…} is not regular.
7
8
OR
a)
“The union, intersection and complement of regular languages are
also regular”. Prove the statement presented.
b)
Consider the following NFA with Є-transition.
δ/∑
a
b
c
Є
q0
{q0}
{Φ}
{Φ}
{ q1}
q1
{Φ}
{q1}
{Φ}
{q2}
*q2
{Φ}
{Φ}
{q2}
{Φ}
7
8
Convert this NFA with Є-transition into NFA without Є-transition.
2.
3.
4.
a)
What do you mean by Parse tree and Yield of parse tree? If a CFG is
S
aSb/SS Є, show that Grammer is ambiguous.
b)
What is CNF? Convert following grammar into CNF.
S
abSb/a/aAb
A
bS/aAAb
8
7
a)
Design a PDA for the language: L= {Wcw r/w  (a,b)*}.Where w r is
reversal of ‘w’.
8
b)
In what aspect PDA is strongr than Finite Automata? State the
closure properties of Context free languages.
7
a)
Explain about decision algorithm for CFL.
7
1
5.
b)
What is recursive function theory?Explain.
8
a)
Give formal definition of Turing Machine. Design Turing machine
that can compute a function: f(x)=x+1.
8
b)
Give the properties of recursive and recursively enumerable
language.
7
OR
a)
b)
6.
7.
What is a Turing Machine? Describe any three types of Turing
Machine.
7
Discuss the Recursive function theory. Prove that the complement of
two recursive languages is recursive.
8
a)
What are two main factors for judging the performance of any
program? Explain.
b)
Explain in brief the P and NP complete problems with suitable
examples.
Write short notes on any two:
7
8
2×5
a)
Church Hypothesis
b)
Undecidable problem
c)
Tractable and Intractable Problems
2
Download