EXPECTED QUESTIONS
BRANCH: CSE SEMESTER: 5TH
SUB: THEORY OF COMPUTATION
PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH
Short questions:
1. What is the difference between DFA and NFA?
2. Design a NFA which accepts set of all binary strings 1100 or 1010 as substring.
3. Write the regular expression over alphabet Ʃ={a,b,c}, containing atleast one a and atleast one b.
4. State the difference between Moore machine and Mealy machine? What is the length of the
output string for Moore machine for input string of length k?
5. Design a DFA for the language containing all strings on which leftmost symbol differs from
rightmost symbol over Ʃ={a,b}?
6. Define the meaning of terminals and non-terminals.
7. What do you understand by decidable?
8. Design PDA for the grammar given below:
S->aS|a|c
9. State Chomsky normal form with an example.
10. Describe Chomsky’s classification of language of automata theory.
11. What is the difference between language and grammar?
12. Write at least two difference between natural language and formal language.
13. Distinguish between context free context sensitive language.
14. State the difference between NP-complete and NP- hard problems.
15. Explain what it means for a language to be class P ? Give two examples of class P problem.
16. What do you mean by recursive and recursively enumerable language?
17. What is the difference between finite automata and turing machine.
18. What is theory of computation?
19. Define linear bounded automata with an example.
20. Explain decidability concept of CFG.
21. What do you understand by a language accepted by PDA by empty stack.
22. Design a DFA for even number of 1’s over Ʃ={0,1}.
23. What is a useless symbol and how can they be removed from a grammar?
EXPECTED QUESTIONS
BRANCH: CSE SEMESTER: 5TH
SUB: THEORY OF COMPUTATION
PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH
24. What is maximum number of states in a DFA that is converted from an NFA of n number of
states.
25. What is ambiguity in CFG? Explain with an example.
26. What is Church Turing hypothesis?
27. What Clique problem? Explain with an example.
28. Define PCP(post correspondence problem).
29. What is muti-tape and multi-head turing machine.
30. Define the ID(instantaneous description) of PDA.
31. Differentiate between positive closure and kleen closure .
32. What is transition system? Explain with example.
33. Design an NFA which accept set of all binary strings containing the 3rd
symbol from the left end
is 1 and 2nd
symbol from left end is 0 .
34. What is –closure of a set? Explain with an example.
35. What is godel number?
36. Consider the following grammar
S->a|abSb|aAb
A->bS|aAAb| ϵ
And derive the string abababb by using rm (rightmost) derivation.
Long questions:
1. Construct a DFA equivalent to M=({q0,q1}, {0,1}, δ, q0, { q0 }) Where δ is defined by
its state table as follows.
__________________________________________________
State/Alphabet 0 1
__________________________________________________
 q0 q0 q1
q1 q1 q0, q1
___________________________________________________
2. Define pumping lemma. Show that L={an
| n is prime } is not regular.
3. State and prove Arden’s theorem ?
EXPECTED QUESTIONS
BRANCH: CSE SEMESTER: 5TH
SUB: THEORY OF COMPUTATION
PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH
Find out the regular expression for the following transition diagram.
0 1 1 0,1
1 1 0
4. Define Griebach normal form. Convert the following grammar to Griebach normal form
S ->AA|a, A->SS|b
5. Let P be the set of all palindromes over {a,b}. Construct the grammar that generates P.
6. Design a turing machine to find 1’s complement of a binary number.
7. Costruct NFA for the following regular expression
i) a(ab)*aa
ii) (ab+bb)*
8. Show that P is closed under a) union, b) concatenation and c)complementation
9. What is the difference between moore machine and mealy machine ?
10. Design a DFA for the language which will accept all binary strings divisible by 3 .
11. Show that the language L={an
cbn
|n≥ 1} is accepted by a PDA.
12. Prove that for every NFA ,if L is the step accepted by NFA, then there exists a DFA which also
accepts L.
13. State and prove undecidability of post correspondence problem.
14. State and prove Arden’s theorem.
15. Write short notes on:
a) Universal turing machine
b) Church turing hypothesis
c) Normal form
d) Counter machine
16. Prove or disprove the following regular expression r,s
a) (R+S)*=R*+S*
b) (rs+r)*=r*+(sr+r)*
17. Give a context free grammar that generates the language L={w|{a,b}*:w contains atleast three a’s}
18. Find the language generated by the following
q3
q2q1
EXPECTED QUESTIONS
BRANCH: CSE SEMESTER: 5TH
SUB: THEORY OF COMPUTATION
PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH
a) S->0S1|0A, A->1A|1
b) S->0S1|0A|0|1B|1A
19. What is Ackermann’s function.
Compute the value of A(1,1), A(2,1) using Ackermann’s function.

Expected Questions TC

  • 1.
    EXPECTED QUESTIONS BRANCH: CSESEMESTER: 5TH SUB: THEORY OF COMPUTATION PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH Short questions: 1. What is the difference between DFA and NFA? 2. Design a NFA which accepts set of all binary strings 1100 or 1010 as substring. 3. Write the regular expression over alphabet Ʃ={a,b,c}, containing atleast one a and atleast one b. 4. State the difference between Moore machine and Mealy machine? What is the length of the output string for Moore machine for input string of length k? 5. Design a DFA for the language containing all strings on which leftmost symbol differs from rightmost symbol over Ʃ={a,b}? 6. Define the meaning of terminals and non-terminals. 7. What do you understand by decidable? 8. Design PDA for the grammar given below: S->aS|a|c 9. State Chomsky normal form with an example. 10. Describe Chomsky’s classification of language of automata theory. 11. What is the difference between language and grammar? 12. Write at least two difference between natural language and formal language. 13. Distinguish between context free context sensitive language. 14. State the difference between NP-complete and NP- hard problems. 15. Explain what it means for a language to be class P ? Give two examples of class P problem. 16. What do you mean by recursive and recursively enumerable language? 17. What is the difference between finite automata and turing machine. 18. What is theory of computation? 19. Define linear bounded automata with an example. 20. Explain decidability concept of CFG. 21. What do you understand by a language accepted by PDA by empty stack. 22. Design a DFA for even number of 1’s over Ʃ={0,1}. 23. What is a useless symbol and how can they be removed from a grammar?
  • 2.
    EXPECTED QUESTIONS BRANCH: CSESEMESTER: 5TH SUB: THEORY OF COMPUTATION PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH 24. What is maximum number of states in a DFA that is converted from an NFA of n number of states. 25. What is ambiguity in CFG? Explain with an example. 26. What is Church Turing hypothesis? 27. What Clique problem? Explain with an example. 28. Define PCP(post correspondence problem). 29. What is muti-tape and multi-head turing machine. 30. Define the ID(instantaneous description) of PDA. 31. Differentiate between positive closure and kleen closure . 32. What is transition system? Explain with example. 33. Design an NFA which accept set of all binary strings containing the 3rd symbol from the left end is 1 and 2nd symbol from left end is 0 . 34. What is –closure of a set? Explain with an example. 35. What is godel number? 36. Consider the following grammar S->a|abSb|aAb A->bS|aAAb| ϵ And derive the string abababb by using rm (rightmost) derivation. Long questions: 1. Construct a DFA equivalent to M=({q0,q1}, {0,1}, δ, q0, { q0 }) Where δ is defined by its state table as follows. __________________________________________________ State/Alphabet 0 1 __________________________________________________  q0 q0 q1 q1 q1 q0, q1 ___________________________________________________ 2. Define pumping lemma. Show that L={an | n is prime } is not regular. 3. State and prove Arden’s theorem ?
  • 3.
    EXPECTED QUESTIONS BRANCH: CSESEMESTER: 5TH SUB: THEORY OF COMPUTATION PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH Find out the regular expression for the following transition diagram. 0 1 1 0,1 1 1 0 4. Define Griebach normal form. Convert the following grammar to Griebach normal form S ->AA|a, A->SS|b 5. Let P be the set of all palindromes over {a,b}. Construct the grammar that generates P. 6. Design a turing machine to find 1’s complement of a binary number. 7. Costruct NFA for the following regular expression i) a(ab)*aa ii) (ab+bb)* 8. Show that P is closed under a) union, b) concatenation and c)complementation 9. What is the difference between moore machine and mealy machine ? 10. Design a DFA for the language which will accept all binary strings divisible by 3 . 11. Show that the language L={an cbn |n≥ 1} is accepted by a PDA. 12. Prove that for every NFA ,if L is the step accepted by NFA, then there exists a DFA which also accepts L. 13. State and prove undecidability of post correspondence problem. 14. State and prove Arden’s theorem. 15. Write short notes on: a) Universal turing machine b) Church turing hypothesis c) Normal form d) Counter machine 16. Prove or disprove the following regular expression r,s a) (R+S)*=R*+S* b) (rs+r)*=r*+(sr+r)* 17. Give a context free grammar that generates the language L={w|{a,b}*:w contains atleast three a’s} 18. Find the language generated by the following q3 q2q1
  • 4.
    EXPECTED QUESTIONS BRANCH: CSESEMESTER: 5TH SUB: THEORY OF COMPUTATION PREPARED BY:ASST.PROF.SANTOSH KUMAR RATH a) S->0S1|0A, A->1A|1 b) S->0S1|0A|0|1B|1A 19. What is Ackermann’s function. Compute the value of A(1,1), A(2,1) using Ackermann’s function.