CSC262 Theory of Computation

Theory of Computation TU Board 2080 (new course) question paper

12 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Science in Computer Science and Information Technology

Semester 4 · TU Board 2080 (new course)

Course Title: Theory of Computation (CSC262)

Full Marks: 60Pass Marks: 24Time: 3 hours

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

Group A

Attempt any TWO question.(2 × 10 = 20)

  1. 1.

    Describe the extended transition function of NFA. Construct a NFA, using transition table and transition diagram , over {0, 1} that accept the string having substring 01 and ends with 1. Show the acceptance of 0111.

    10
  2. 2.

    Define CFG. Construct a CFG that generates the language of all palindromes over {a,b} that do not contain the substring aa. Show the leftmost derevation and construct the equivalent parse tree for string babbbab.

    10
  3. 3.

    How Turing Machine is used as a computing function? Construct a TM for simulating a function f(x) = 2x for x = {1}. Itetrate the TM for input 11 and generate the output 1111.

    10

Group B

Attempt any EIGHT question.(8 × 5 = 40)

  1. 4.

    Differentiate Kleen closure from positive closure. Compute positive and Kleen closure of {ab}.

    5
  2. 5.

    Design a Melay machine over {a, b} that generates output 'A' if the input string ends with aa else output 'B' if the string ends with bb.

    5
  3. 6.

    Construct regular expression over {1,2,….9} that represents

    1. strings of even numbers with length 4 starting with 2 and ending with 8.
    2. strings starting with odd numbers and ending with even numbers.
    5
  4. 7.

    Prove that th language L ={a^n b^n c^n | n≥0} is not a context free grammar.

    5
  5. 8.

    Construct a PDA that accepts string over Σ ={a,b} that contains equal number of a's followed by equal number of b's. Show acceptance of aabb and aab.

    5
  6. 9.

    Describe how multi-stack TM is different from the semi-infinite tape TM?

    5
  7. 10.

    What is intractability? Define time and space complexity of turing machine.

    5
  8. 11.

    How conversion of PDA to CFG done ? Illustrate with example.

    5
  9. 12.

    State Arden's theorem. Convert following DFA into its regular expression using Arden theorem.

    [figure in the original paper]

    5

— The End —