V.M.K.V ENGINEERING COLLEGE DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING III YEAR-V SEMESTER THEORY OF COMPUTATION QUESTION BANK UNIT I PART A 1. Give short notes about Formal proof. 2. List out the proofs associated with FA. 3. Give the mathematical definition of Additional forms of proof. 4. What are the components are involved in Finite Automation? 5. Give the mathematical definition of inductive proof. 6. List out the needs of finite automation. 7. Give the formal definition of DFA. 8. What are the needs of epsilon in NFA? 9. Give the formal definition of NFA. 10. Differentiate NFA and DFA. 11. List out the various advantages in DFA. 12. Write various advantages in NFA over than DFA. 13. How will you find out the input string is accepted or not? 14. How will you make a final state in the NFA with epsilon to NFA without epsilon conversion? 15. Define transition function with one simple example. 16. How will you make a final state in the NFA to DFA conversion? 17. Construct DFA for The set of all strings 0’s and 1’s that end with 11. 18. Construct DFA for Set of all strings over {0,1} with 4 consecutive 0’s. 19. Obtain the DFA equivalent to the following NFA.
20. Consider the transition diagram as shown below.
Check whether the input string abab is accepted by FA? 21. Consider the DFA as shown below
Show how the string w1=aabba & w2=aba is proceed. 22. Write various applications of automata theory? 23. Construct a NFA for all strings over alphabet ∑={a,b} that contains a substring ‘ab’. 24. Write short notes on ε-closure function? 25. Define Symbol. PART B 1. List out various proofs in TOC and Explain. 2. Construct a DFA equivalent to the NFA M=({p,q,r,s},{0,1}, δ , p , {s}) Where δ is defined in the following table.
3. Prove that, If L be a set accepted by a NFA, then there exists a DFA that accept L. 4. For a NFA- ε ε
moves shown below, construct an equivalent NFA without
moves.
5. Construct NFA without ε moves from the NFA given in the diagram?
6. Prove that, Let r be a regular expression then there exist a NFA ε − transition that accepts L(r). 7. Construct a deterministic finite automata equivalent to M=({q0,q1,q2,q3},{a,b}, δ,q0,{q3}) where δ is, δ(q0,a)=(q0,q1}, δ(q0,b)=(q0}, δ(q1,a)=(q2}, δ(q1,b)=(q1}, δ(q2,a)=(q3}, δ(q2,b)=(q3}, δ(q3,b)=(q2}. 8. Construct an equivalent DFA for the following NFA given below,
9. Construct an equivalent DFA for the following NFA given below,
10. Give Brief explanation about NFA to DFA Conversion.
UNIT-II PART-A 1.
Give short notes about regular Expression.
2.
Check (a+b)*(cd) is a regular expression?
3.
Check (a.b+) is a regular expression?
4.
Write the kleen’ s theorem for regular expression.
5.
List out the closure properties of regular sets.
6.
Where we are using pumping lemma and what is that importance?
7.
Write the applications of pumping lemma.
8.
Prove L={0i1j | i>j} is not regular
9.
Differentiate recursive and non recursive production.
10.
State Regular language
11.
Find the shortest string that is not in the language represented by the regular
expression a*(ab)*b*. 12.
Find a regular expression corresponding to the language of all strings over the
alphabet { a, b } that contain exactly two a's.
13.
Find the shortest string that is not in the language represented by the regular
expression a*b(ab)*b*. 14.
Find a regular expression corresponding to the language of all strings over the
alphabet { a,b } that do not end with ab. 15.
Construct a regular expression for the language L has set of all string over {a,b}
with three consecutive b’s. 16.
Write a regular expression for the set of all strings not containing ‘101’ as
substring. 17.
Write a regular expression for the set of all strings over (0,1} does not include
‘011’ or ‘001’. 18.
State whether the following statements are true (or) false a. Every subset of a regular set is regular. b. Every finite subset of a non regular set is regular. c. The number 1,2,4,8………2n written in binary is accepted by a FA.
19.
How to construct Regular expression from FA?
20.
Show that L={anbncn|n>=0}is not regular.
21.
Show that L={anbn|n>=0}is not regular
22.
Give the advantages of regular expressions.
23.
Differentiate FA and Regular expression?
24.
Write a regular expression for the set of all strings where substring ‘11’ never
occurs after a substring ‘00’. 25.
Write a regular expression for the set of all strings containing both the substring
‘01’ and substring ‘10’.
PART-B 1. Construct a finite automata equivalent of the following regular expression ((0+1)(0+1))*+((0+1)(0+1)(0+1))* 2.
States that any language accepted by a finite automaton is regular.
3.
Explain the Kleen’ s theorem in detail.
4.
Explain in detail about construction of FA from Regular expression.
5.
Construct a NFA for the regular expression r=1*0+0.
6.
Construct a NFA for the regular expression r=((01+001)*0*)*
7.
Briefly explain about pumping lemma.
8.
Prove the following grammars are not regular,
a.
L={w | w € {0,1}* and has equal number of 0’s and 1’s.
b.
L={1i 0i | i>j} is not regular.
9.
Draw a NFA Diagram for following regular expression (aa(ba)*+b*aba*)
10.
Draw a NFA Diagram for following regular expression (ab+(aab)*)(aa+a)
UNIT III PART – A 1. List out the various advantages in CFG over Regular expressions? 2. State Context free grammer. 3. Give the formal definition of CFG. 4. Give notes about terminal? 5. Differentiate terminal and non terminal. 6. Let G be the grammar S aB/bA, Aa/aS/bAA, Bb/bS/aBB. For the string aaabbabbba find a left most derivation. 7. Find the language generated by the grammar SaSb, Sab 8. Find L(G). G=({S,C},{a,b},P,S) where P consists of SaCa, CaCa / b. 9. Give short notes about left most derivation. 10. List out various problems by ambiguity.
11. Why left factoring is occurred? 12. How do you simplify the context free grammar? 13. Construct a grammar for the Language L=(an b an / n>=1}. 14. List out the applications of Pumping Lemma? 15. Draw the basic diagram for PDA. 16. Why we are using the stack in PDA? 17. Why we are going to pushdown automata. 18. State that acceptance of a PDA by final state. 19. Give short notes about instantaneous description of a PDA. 20. Write the pumping lemma for context free language. 21. List out the ways to accept PDA? 22. Give the diagrammatic representation of PDA. 23. Give the difference between reading the final state and empty stack. 24. Find PDA for The set of all strings of balance parenthesis are properly nested. 25. List out various needs of stack in PDA. PART – B 1. Explain in detail about simplification of CFG. 2. Find the language are generated by the following grammars. a. S -> 0S1 / 0A1, A->1A/1 b. S->0s1/0A/0/1B/1, A->0A/0, B->1B/1 3. Construct a PDA accepting { an b2n : n>=1} by final state with neat example. 4. a) Show that an bn cn is not context free language. b) Construct a PDA equivalent to the following grammar S->aAA, A->aS|bS|a . Test whether abaaaa is accepted by PDA 5. Construct a PDA accepting { an bm an : m,n > 1} by empty store. 6. Construct a PDA accepting { an b3n : n>=1} by empty store. 7. Construct a PDA equivalent to the following grammar S->AA|a, A->SA|b . Test whether abbabb is accepted by PDA. 8. Design a PDA that accepts a Language an bmcn where n,m >= 1.
9. Construct a PDA accepting {
an bmcmdn where n,m >= 1. } by final state.
10. a) Construct a PDA equivalent to the following grammar S->aABB|aAA, A->aBB|a,B->bBB|A . b) Prove the theorem, If L is L(M2) for some PDA M2, then L is N(M1) for some PDA M1.
UNIT IV PART – A 1. Give the importance of CNF. 2. Write the procedure to eliminate ε − production. 3. Determine whether the grammar G has a useless production ? SA,AaA/ε , Β bA 4. List out the operations are involved in CFG to CNF form. 5. Write the steps are involved in CFG to GNF form? 6. Give short notes about lemma1 in GNF. 7. Give short notes about lemma2 in GNF. 8. Give formal definition of Turing machine. 9. Write short notes about Turing machine? 10. What are the parameters available in transition function of Turing machine? 11. How subroutine is implemented in Turing machine? 12. Why we are using multiple tracks in Turing machine? 13. Write short notes about two way infinite tapes? 14. Give notes about instantaneous description of TM. 15. Write definition of multitape Turing machine? 16. Distinguish finite state machine and Turing machine. 17. List out the advantages in Turing machines over CFG?
18. Draw the model for Turing machine. 19. Give short notes about unit production. 20. List out the importance of GNF. 21. How Turing machine works according as transducers. 22. Why we are using finite control? 23. Write short notes about checking of symbols? 24. List out the various elements of Turing machine? Give the representation of Turing machine. 25. How Turing machine works according as acceptors. PART B 1. Convert the following grammar in to CNF SaAa / bBb / ε AC / a BC/ b CCDE / ε DA / B /ab 2. Construct the GNF grammar for the following. SAA / a A SS / b 3. Convert the grammar in to CNF SaSaA / A AabA/b 4. Convert the following grammar in to GNF S AB ABS / b BSA / a 5. Transform the grammar with productions SabAB AbAB / ε
BBAa / A /ε
in to CNF?
6. Design a Turing machine to compute the concatenation functions f(n1,n2)=n1n2. 7. Design a Turing machine to compute f(x)=x+1. 8. Construct a Turing machine that f(x+y)=x+y perform the given addition operation. 9. Construct a Turing machine to accept the language L={0n1n | n>=1}. 10. Construct a TM for zero function f: N->N, f(x)=0. UNIT V PART A 1. State Rice theorem. 2. List out the various problems in Undecidability? 3. Give short notes about universal language. 4. State Decidability. 5. List out some of the undecidable problems. 6. Give short notes about halting problem. 7. Mention the use of reducibility? 8. State Rice theorem. 9. List out the non trivial properties in Rice theorem. 10. Give example for partial recursive and total recursive functions. 11. Differentiate recursive and recursively enumerable language. 12. Define equivalence problem. 13. When a problem is said to be decidable? Give example of a decidable problem. 14. How universal Turing machine is differ from Turing machine? 15. List out the various properties of recursively enumerable set that are not decidable? 16. List out the various the properties of universal language? 17. How the halting problem is occurred in Turing machine? 18. Give short notes about recursive. 19. What is the relationship between computability and decidability? 20. List out some of the decidable problems.
21. Give short notes about recursively enumerable language. 22. Give formal definition about phase structure grammar. 23. Why the halting problem occurred? 24. Write the various methods are involved for correcting undecidable problem? 25. List out the various the properties of recursive and recursively enumerable language? PART B 1. a). Show that union of recursive language is recursive. b). Show that if a language L and its complement L’ are both recursively enumerable then L is recursive. 2. Show that the complement of a recursive language is recursive. 3. Show that the universal language Lu is not recursive. 4. Show that Ln is recursively enumerable. 5. Discuss in detail about Universal Turing Machine. 6. Define Ld and show that Ld is not recursively enumerable. 7. For any recursively enumerable language, it is undecidable to determine whether L is empty. 8. Explain the halting problem is undecidable. 9. State whether the totality problem is undecidable. 10. Explain in detail about Equivalence problem.