Tribhuvan University
Institute of Science and Technology
Bachelor Level/Second Year/ Fourth Semester/ Science Full Marks: 80
Computer Science and Information Technology (CSc.251) Pass Marks: 32
(Thoery of Computation) Time: 3 hours
Candidates are required to give their answers in their own words as far as possible.
The figures in the margin indicate full marks.
Attempt all the questions.
-
Convert the NFA-ε into NFA without ε.
-
Find the regular expressions describing the following languages over alphabet {0, 1}*.
(a) The language of all strings containing atleast two 0's.
(b) The language of all strings containing both 00 and 010 as substrings. -
Construct FA recognizing the languages described by following regular expressions.
(a) (10* + 01*)11*
(b) (0 + 1)*(01+1000)0*
- What do you mean by a CFG in CNF? What are the criteria to be a CFG in CNF? Explain.
- Define the term Regular Grammar. What is the relation of Regular Grammar with other grammars? Explain
- Define the universal Turing machine and describe its role.
- Show that the complement of a recursive language is recursive.
- Explain, how can you encode a Turing machine into universal language.
- Describe the extended transition function of a NFA. Construct a NFA accepting the language over {a, b}* with each strings containing three consecutive b's. Show by extended function that it accepts abbb.
-
Define the term immediate left recursion. How can you convert a grammar with immediate left recursion into equivalent grammar
without left recursion? Remove left recursion from the following grammar.
S -> S1S
S1 -> S1 + T| T
T -> T*F| F
F -> (S1)| a - Contruct a PDA that accepts the strings of language L ={wwR| w is in {a,b}*}.
- Describe multi tape Turing machine. Show that multi-tape Turing machine and one tape Turing machines are equivalent.
- Define class P and NP with example. Show that: If P1 is NP complete and three is a polynomial time reduction of P1 to P2 then P2 is NP-complete.
-
Write short notes on (Any two)
(a) Solvable vs Unsolvable problems
(b) CNF Satisfiability
(c) Recursive and Recursively Enumerable Languages
No comments:
Post a Comment