Theory of Computation (CSC262) Past Questions & Solutions

Tribhuvan University (TU) board exam past questions with verified step-by-step solutions for BSc CSIT Fourth Semester.

Core Course5 Exam Years

TRIBHUVAN UNIVERSITY

INSTITUTE OF SCIENCE AND TECHNOLOGY

2083 B.S.

Bachelor Level: B.Sc. CSIT

Semester: Fourth Semester

Subject: Theory of Computation (CSC262)

Full Marks: 60 / 80

Pass Marks: 24 / 32

Candidates are required to give their answers in their own words as far as practicable.

Group A

Long Answer Questions

Attempt any Two questions.

  1. 1
    Construct a nondeterministic finite automaton (NFA) over the alphabet $\{0,1\}$ that accepts all strings containing the substring 101. Using the subset-construction method, convert the NFA into an equivalent deterministic finite automaton (DFA).
  2. 2
    Simplify the following context-free grammar by successively removing useless symbols, nullable symbols, and unit productions, and write the resulting equivalent grammar: $S \to AB \mid aA$, $A \to aA \mid \epsilon$, $B \to bB \mid C$, $C \to b$, $D \to dD$.
  3. 3
    Design a Turing machine that accepts the language $L = \{0^n1^n \mid n \geq 1\}$, and specify its components, transition notation, and the sequence of moves used to accept an input string such as 0011.

Group B

Short Answer Questions

Attempt any Eight questions.

  1. 4
    Let $\Sigma = \{a,b\}$. Define the power of the alphabet, Kleene closure, and positive closure of $\Sigma$, and list the first five strings in $\Sigma^*$ and $\Sigma^+$.
  2. 5
    Differentiate between Moore and Mealy machines with example.
  3. 6
    Define an $\epsilon$-NFA and explain the concept of $\epsilon$-closure of a state with a suitable example.
  4. 7
    Explain the closure properties of regular languages under union, intersection, and complement operations.
  5. 8
    Using the pumping lemma for regular languages, determine whether the language $L = \{0^n1^n \mid n \geq 0\}$ is regular.
  6. 9
    Explain the types of derivations used in a context-free grammar (CFG), and show that the grammar $E \to E+E \mid E*E \mid (E) \mid id$ is ambiguous by constructing two distinct parse trees for the string $id + id * id$.
  7. 10
    Explain the two methods of accepting a language by a pushdown automaton (PDA), namely acceptance by final state and acceptance by empty stack, and state how they differ.
  8. 11
    What is meant by using a Turing machine as a subroutine, and why is this concept useful in designing complex Turing machines?
  9. 12
    What is Turing reducibility, and how can it be used to establish a relationship between the Circuit Satisfiability problem and another computational problem?