CSIT 4th Semester
Theory Of Computation Board Question Paper 2081


CSC 262-2081 ✡
Tribhuvan University
Institute of Science and Technology
2081
Bachelor Level/Second Year/Fourth Semester/Science
Computer Science Information Technology (CSC 262)
(Theory Of Computation)
(New Course)
Full Marks:60 Pass Marks:24 Time:3 hours

Candidates are required to give their answers in their own words as for as practicable.
The figures in the margin indicate full marks

Section A
Long Answer Questions
Attempt any Two question.
[2x10=20]
1.

Mention the transition function of PDA. List the two ways that PDA accepts the string. Convert the following CFG to PDA.
\(S \rightarrow AS \mid \epsilon\)
\(B \rightarrow aAb \mid Bb \mid ab\)

2.

List any two regular operators. Minimize the following finite state machine using Table Filling algorithm.
finite state machine diagram for minimization

3.

Define Turing machine as enumerators of strings of a language. Encode the Turing machine \(TM: (\{q_0, q_1, q_2\}, \{a, b\}, \{a, b, B\}, \delta, q_0, B, F)\), with input \(w: ba\) and \(\delta\) is defined as follows.
\(\delta(q_0, b) = (q_1, a, R)\), \(\delta(q_1, a) = (q_1, b, R)\), \(\delta(q_2, b) = (q_1, a, R)\), \(\delta(q_1, B) = (q_2, b, L)\)

Section B

Attempt any Eight questions

[8x5=40]
4.

Does machine always refer to hardware? Justify. Define positive closure and kleene closure.

5.

What is undecidable problem? Discuss about Post's Correspondence Problem.

6.

Define the language of a grammar. For the grammar \(S \rightarrow 0S0 \mid 0 \mid 1 \mid \epsilon\), show the leftmost derivation for the string 00100 with its parse tree.

7.

Define \(\epsilon\) - closure of a state. Differentiate between Moore and Mealy machine.

8.

Represent the following regular grammar to finite automata.
\(S \rightarrow a \mid aA \mid bB \mid \epsilon\)
\(A \rightarrow aA \mid aS\)
\(B \rightarrow bS \mid \epsilon\)

9.

Design the DFA that accepts binary string ending with "00" and show its extended transition function for the string 111000.

10.

Convert the following grammar to CNF.
\(S \rightarrow AAB\), \(A \rightarrow aAb \mid \epsilon\), \(B \rightarrow aB \mid a\)

11.

For the following Turing Machine, test whether the string "( ) ) (" is accepted or rejected and show it in transition

()XYB
\(q_0\)\((q_1, X, R)\)\((q_3, Y, R)\)
\(q_1\)\((q_1, (, R)\)\((q_2, Y, L)\)\((q_0, X, R)\)\((q_1, Y, R)\)
\(q_2\)\((q_2, (, L)\)\((q_0, X, R)\)\((q_2, Y, L)\)
\(q_3\)\((q_3, Y, R)\)\((q_4, B, R)\)
\(q_4\)

12.

Differentiate between Class P and Class NP problem. Mention the transition function of DFA, NFA and \(\epsilon\) - NFA.