Solutions: Theory of Computation (TOC) Question Bank 2076

Tribhuvan University

Institute of Science and Technology

2076

Bachelor Level / fourth-semester / Science

Computer Science and Information Technology (CSC257)

Theory of Computation

Full Marks: 60 + 20 + 20

Pass Marks: 24 + 8 + 8

Time: 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.

Section A

Attempt any Two questions. (2x10=20)

  1. Define the NFA with ε-transition and ε-closure of a state. Show that for every regular expression r, representing a language L, there is ε-NFA accepting the same language. Also, convert the regular expression (a+b)*ab* into an equivalent Finite Automaton.

  2. How can you define the language accepted by a PDA? Explain how a PDA accepting a language by an empty stack is converted into an equivalent PDA accepting by the final state and vice-versa.

  3. Define a Turing machine. Construct a TM that accepts L = {wcwR | w∈(0, 1) and c is ε or 0 or 1. Show that the string 0110 is accepted by this TM with the sequence of Instantaneous Description (ID).

Section B

Attempt any Eight questions. (8x5=40)

  1. Give the formal definition of DFA. Construct a DFA accepting all strings of {0, 1} with an even number of 0’s and an even number of 1’s.

  2. Define Chomsky Normal Form and Greibach Normal Form in reference to CFG. Give a suitable example of each.

  3. Give the regular expressions for the following language over the alphabet {0, 1}.

    • Set of all strings with the 2nd symbol from the right is 1.
    • Set of all strings starting with 00 or 11 and ending with 10 or 01.
  4. Show that the language L={0m1m | m>=1} is not a regular language.

  5. Describe the Turing machines with multiple tape, multiple track, and storage in state.

  6. Construct an NFA accepting the language of {0, 1} with each string ending with 01 and convert it into an equivalent DFA.

  7. Construct a PDA accepting the language over {0, 1} representing strings with an equal number of 0s and 1s. Show by the sequence of IDs that 0101 is accepted by this PDA.

  8. Define the complexity of a Turing machine. Explain about big Oh, big Omega, and big Theta notation used for complexity measurement.

  9. What do you mean by tractable and Intractable problems? Explain with reference to TM.

Post a Comment

Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.