Theory of Computation BSC CSIT Old Questions
Theory of Computation BSC CSIT Old Questions
Theory of Computation BSC CSIT Old Questions
com
Tribhuvan University
Institute of Science and Technology
2067
IOST, TU
https://genuinenotes.com
https://genuinenotes.com
Tribhuvan University
Institute of Science and Technology
2067
IOST, TU
https://genuinenotes.com
https://genuinenotes.com
Tribhuvan University
Institute of Science and Technology
2068
Group B (6X8=48)
9. Show that for any regular expression, there is a NFA that accepts the same language
represented by r. Convert the regular expression (a+b) (aa+ba)* + ab(a+b)* bba into NFA.
10. How a NFA can be converted into a DFA? Convert the following NFA into equivalent DFA.
0,1
P 0 Q 0,1 R 0,1
SS
11. Define CFG. Convert the following CFG into Chomsky Normal Form.
S → |Sbb|aabb|Aa|Bb|
A → Aa|a,
B → Bb|b|ɛ
12. Define the language of PDA that accepts by Final state. Explain, how a PDA accepting by empty
stack can be converted into a PDA final state.
13. Explain about multi tape TM. Show that every language accepted by a multi-tape Turing Machine
is also accepted by one tape Turing Machine.
14. Explain the following terms.
(a) Big Oh and Big Omega
(b)Class P and NP
(c)CNF SAT Problem
(d)Turing Decidable and Acceptable problems.
IOST, TU
https://genuinenotes.com
https://genuinenotes.com
Tribhuvan University
Institute of Science and Technology
2069
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
1. What do you mean by finite automata? Explain deterministic finite automata with example.
2. Explain the finite automata with Epsilon Transition.
3. Explain the closure properties of context free languages with example.
4. Differentiate between deterministic and non-deterministic PDA.
5. Explain the non-deterministic Turing machines with example.
6. Define the Turing machine. What are the roles of Turing machines?
7. What is a universal Turing machine?
8. Differentiate between class P and class NP.
Group B (6x8=48)
9. Design a constructive method to prove that the complement of the language accepted by an NFA is accepted
by a DFA.
10. What do you mean by regular expressions? Explain with example of pumping lemma for regular languages.
11. Define the non-deterministic finite automata (NFA) and write down recursive definition of for NFA and A.
12. Draw Turing machine to accept palindromes over {a, b}.
13. Give a detailed description of ambiguity in context free grammar.
14. Explain the following:
a) Minimization of finite state machine
b) Push down automata (PDA).
c) Halting problems
d) Computational complexity
IOST, TU
https://genuinenotes.com
https://genuinenotes.com
Tribhuvan University
Institute of Science and Technology
2070
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Group B (6x8=48)
IOST, TU
https://genuinenotes.com
https://genuinenotes.com
Tribhuvan University
Institute of Science and Technology
2071
6.) what do you mean by a CNF grammar? Convert the following grammar into CNF.
S→abSb | aa
7.) what are unrestricted grammar? How they differ with CFG? Explain.
8.) Define the term Class P and Class NP with example.
Group B (6x8=48)
9.) What are the algebraic rules for regular expressions? Also show that if L, M, N are any regular
language then show that L(M U N) = L.M U L.N.
10.) Prove that for any given NFA N accepting a language L there exists a DFA D such that L(N) = L(D).
11.) Define regular grammar. Show with suitable example that the language described by regular
grammar are accepted by a finite automata.
12.) What do you mean by the Chomsky Heirarchy in the formal language theory? Explain in detail.
13.) Construct a PDA that accepts a language of palindrome of even length from an alphabet {a,b}.
14.) Show that a Turing Machine with one tape and a Turing Machine with multiple tape are
equivalent.
IOST, TU
https://genuinenotes.com
https://genuinenotes.com
Tribhuvan University
Institute of Science and Technology
2072
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
1. Define the term: Kleene closure, union, concatenation and power of an alphabet with example.
2. Construct a DFA that accepts only the strings ab, abb and baa not more from {a, b}*.
3. Find the regular expression corresponding to the following languages over {0, 1}*.
a) The language of all strings containing exactly two 0's.
b) The language of all strings containing 00 or 101 as substrings.
4. Construct the FA recognizing the language corresponding to the following regular expressions.
a) (11 + 10)*01
b) (111 + 100)*10
5. State the pumping lemma for regular language. Show by example, how can you use it to prove that a
language is not regular.
6. Explain the method to convert a given CFG into equivalent PDA.
7. What do you mean by problem reduction? Also explain about NP-Completeness.
8. What is the role of a Turing machine? Explain.
Group B (6x8=48)
9. What is finite automata? Describe its different variations with suitable examples.
10. Describe the method of subset construction to convert a given NFA into equivalent DFA with suitable
example.
11. Give the formal definition of Push Down Automata. Construct a PDA accepting the language
n n
L {0 1 | n 0}
12. Given the following grammar,
S → AAC |
A → aAb | ab | ɛ
C → aC | a | ɛ
Simplify the grammar and convert it into equivalent grammar in CNF.
13. Define a Turing machine. Construct a Turing machine that accepts the languages
n
L {a bn | n 0}
14. Write short notes on (Any two):
a) Unrestricted Grammar
b) Universal Turing Machine
c) CNF-SAT problem Complexity
IOST, TU
https://genuinenotes.com