Sie sind auf Seite 1von 5

Rajalakshmi Institute of Technology

Department of Computer Science and Engineering Theory of Computation Part A Questions

THEORY OF COMPUTATION
UNIT I
1. 2. 3. 4. 5. 6. 7. 8. 9. What is a finite automaton? Give two examples. Is it true the language accepted by NFA is different from the regular language? Justify your answer. Define NFA with - transition. Is the NFAs with - transition are more powerful than the NFAs without - transition? Enumerate the difference between DFA and NFA List any four ways of theorem proving What is the principle of mathematical induction? Define the Language described by NFA and DFA State the relation among regular expression, DFA, NFA and FA with transition What is inductive proof? Find the language accepted by the DFA given below 20. Find the - closure of states 1, 2, and 4 in the following transition diagram 21. Construct a finite automata for the 15. Obtain an NFA without transition to the following NFA with transition 16. Describe the following sets by regular expression a. L1 = Set of all strings of 0s and 1s ending in 00 language {0n | n mod 3=2 n>0} 22. Construct a DFA over = { a, b } which produces not more than 3as 23. Construct an NFA for all strings over alphabet = { a, b } that contains a substring ab. 24. Construct a DFA to recognize odd number of 1s and even number 0s 25. Find the set of strings accepted by the finite automata. 19. Obtain the - closure of each state in the following NFA with - moves 18. Find the language accepted by the following automaton b. L2 = Set of all strings of 0s and 1s beginning with 0 and ending with 1 17. Obtain the - closure of states q0 and q1 in the following NFA with transition

10. Differentiate between proof by contradiction and proof by contra positive. 11. What is structural induction? 12. What is epsilon transition in finite automata? 13. Define Transition Diagram 14. Obtain the DFA equivalent to the following NFA

Compiled By B. Udaya, AP / CSE, RIT

Page No : 1

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part A Questions 26. Construct a DFA for the language over {0, 1}* such that it contains "000" as a substring. 27. Construct a DFA for the following a. b. All strings that contain exactly 4 zeros. All strings that dont contain the substring 110. 16. Prove or disprove the following for regular expression ( a + b )* cd for = { a, b, c, d } 17. What is ( 10, 11 )*? 18. Let L = { w | w { 0, 1 }* w does not contain 00 and is not empty }. Construct a regular expression that generates L. 19. Give the regular expression for set of all strings ending in 00. 20. Prove by pumping lemma, that the language 0 1 is not regular.
n n

UNIT II
1. 2. 3. 4. 5. 6. 7. 8. 9. What is a regular expression? Give an example Show that the complement of a regular language is regular. State pumping lemma and its advantages. What is meant by equivalent states in DFA? Prove or disprove that the regular languages are closed under concatenation and complement. What is minimization of automaton? Differentiate regular expression and regular language. Name any four closure properties of regular languages. Show that ( r*)* = r* for a regular expression r.

21. Is the set of strings over the alphabet { 0 } of the form 0n where n is not a prime is regular? Prove or disprove. 22. Is the language L = { 02n | n > 1 } is regular? Justify. 23. Give the regular expression for the following a. b. L1 = set of all strings of 0 and 1 ending in 00 L2 = set of all strings of 0 and 1 beginning with 0 and ending with 1.

UNIT III
1. 2. 3. 4. 5. 6. 7. State the definition for PDA. Give an example of PDA What are the different types of languages acceptances by a PDA and define them Define derivation tree for a CFG. Define the language generated by a PDA using final state of the PDA and empty state of that PDA. Is it true that the language accepted by a PDA by empty stack or that of final states are different language. What is the additional feature PDA has when compared with NFA? Is PDA superior over NFA in the sense of language accepted? Justify your answer. Is it true that non deterministic PDA is more powerful than that of deterministic PDA? Justify your answer.

10. Let R be any set of regular language. Is U R1 regular? Prove it. 11. Consider the alphabet = {a, b, (, ), +, *, ., }. Construct a context free grammar that generated all strings in * that are regular expression over the alphabet {a, b }. 12. Verify whether L = { a | n > 1 } is regular. 13. Construct a DFA fro the regular expression aa* | bb* 14. Show that * is by constructing its NFA using Thomsons construction. 15. Write regular expression for the following language over the alphabet = { 0, 1 } The set of all strings not containing 101 as substring. Provide justification that your Regular Expression is correct.
2n

Compiled By B. Udaya, AP / CSE, RIT

Page No : 2

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part A Questions 8. 9. Define instantaneous description of Pushdown automata. What is meant by empty production removal in PDA? 24. Write a context free grammar to generate the set { ambncp | m + n = p and p > 1 } 25. Let the production of a grammar be S 0B | 1A, A 0 | 0S | 1AA, B 1 | 1S | 0BB. For the string 0110 find the rightmost derivation. 26. Find whether the language { ambmcm | m > 0 } is context free or not. 27. Show that the grammar S a | Sa | bSS | SSb | SbS is ambiguous. 28. Find out the context free language S aSb | aAb, A bAa | ba. 29. Construct a PDA to accept the language { (ab)n | n > 1 } by empty stack. 30. Give a semi three grammar generating { ai | i is a positive power of 3 } 31. Consider the following grammar G with productions, S ABC | BaB, A aA | BaC | aaa, B bBB | a, C CA | AC. Give the CFG with no useless variables that generates the same language. 32. Is the grammar id | E E E + is ambiguous? Justify. 33. Is the grammar below ambiguous S SS | ( S ) | S ( S ) | E?
n n

10. What is a CFG? 11. Define the term ambiguity in grammars. 12. Mention the use of context free grammar. 13. Is the language of Deterministic PDA and Non deterministic PDA same? Justify. a. What is the height of the parse tree to represent a string of length n using Chomsky normal form? 14. What do you mean by expressive power of a grammar? 15. Let G = ({S,C}, { a, b }, P, S ) where P consist of S aCa C aCa | b find L(G) 16. Consider G whose productions are S aAS | a, A SbA | SS | ba. Show that S aabbaa and construct a derivation tree whose yield in aabbaa. 17. Find L( G ) where G = ( { S }, { 0, 1 }, { S 0S1, S }, S } 18. Construct a context free grammar for generating the language L = { a b | n > 1 } or Construct a CFG over {a, b} generating a language consisting of equal number of a's and b's. 19. Let G be the grammar S aB | bA, A a | aS | bAA, B b | S | aBB. For the string aaabbabbba find leftmost derivation. 20. Explain what actions take place in the PDA by the transitions ( q, a, Z ) = { ( p1, 1 ), ( p2, 2 ) . . . ( pm, m )} ( q, , Z ) = { ( p1, 1 ), ( p2, 2 ) . . . ( pm, m )} 21. Find the language generated by the grammar S aB | bA , A a | aS | bAA, B b | bS | aBB. 22. Show that id + id * id can be generated by two distinct leftmost derivation in the grammar E E + E | E * E | ( E ) | id 23. For the grammar S A | B, A 0A | , B 0B | 1 B | give the leftmost and rightmost derivation of the following string 00101. 7. 6. 4. 5. 1. 2. 3.

UNIT IV
Define Turing machine. Define instantaneous description and move of a Turing machine. When a recursively enumerable language is said to be recursive. Is it true that the language accepted by a non deterministic Turing machine is different from recursively enumerable language? Define Multitape Turing machine Explain the basic Turing machine model and explain in one move. What are the actions take place in a Turing Machine. Describe multitape Turing machine and explain in a single move, what are the action that take place in it. Explain how a Turing machine can be regarded as a computing device to compute integer function.

Compiled By B. Udaya, AP / CSE, RIT

Page No : 3

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part A Questions 8. Describe the non deterministic Turing machine model. Is it true the non deterministic Turing Machine models are more powerful than the basic Turing Machine? 9. When a language is said to be recursive? Is it true that every regular set is not recursive? 10. Explain the multitape Turing machine model. Is it more powerful than the basic Turing machine? Justify your answer. 11. Can you say the language generated by a Context Free Grammar in CNF is finite or infinite? If so how? If not why? 12. What is the language for which the Turing Machine has both accepting and rejecting configuration? Can this be called CFL? 13. The binary equivalent of a positive integer is stored in a tape. Write the necessary transitions to multiply that integer by 2. 14. State the pumping lemma for context free language. 15. What are the useless symbols in a grammar? 16. Differentiate multitape and multitrack Turing machine. 17. What is the minimum number of stacks needed for simulating a Turing machine using multi stack machine? 18. Define Greibach Normal Form. 19. Construct a Turing machine for zero function f : N N, f( x ) = 0 20. When does a Turing machine become an algorithm? 21. Convert the following grammar in Greibach Normal Form S ABb | a, A aaA | B, B bAb 22. Design a Turing machine with no more than three states that accepts the language a(a+b)*. Assume = { a, b } 23. Is the language { } 1 | = n c b a L n n n is context free? Justify. 9. 6. 7. 8. 1. 2. 3. 4. 5. 24. What is the height of the parse tree to represent a string of length 'n' using Chomsky normal form? 25. Construct a Turing machine to compute 'n mod 2' where 'n' is represented in the tape in unary form consisting of only 0's. 26. Design a TM that accepts the language of odd integers written in binary. 27. State the two normal forms and give an example. 28. Convert the following grammar into an equivalent one with no unit productions and no useless symbols S ABA, A aAA | aBC | bB, B A | bB | Cb, C CC | cC. 29. What is Chomsky normal form? 30. Is the context free language is closed under complementation? Justify. 31. What are the applications of Turing machine? 32. List the closure properties of Context free Languages?

UNIT V
When we say a problem is decidable? Give an example of undecidable problem Explain the modified Posts correspondence problem Give two properties of recursively enumerable sets which are undecidable. Give two examples of undecidable problem Is it true that complement of a recursive language is recursive? Justify your answer. When a language is said to be recursive or recursively enumerable? Show that complement of a recursive language is recursive When a problem is said to be decidable or undecidable? Give an example of an undecidable. What do you mean by universal Turing Machine? 10. Show that union of recursive language is recursive.

Compiled By B. Udaya, AP / CSE, RIT

Page No : 4

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part A Questions 11. Show that the following problem is undecidable Given two Context Free Grammar G1 and G2. Is L(G1) L ( G2 ) = ? 12. Define Diagonal Language Ld. 13. Differentiate between recursive and recursively enumerable language. 14. Mention any two undecidable properties for recursively enumerable language. 15. What is meant be halting problem? 16. What is post correspondence problem? 17. Prove the theorem If L is a language generated by some TM M1, then L is recursively enumerable set. 18. When do you say a problem is NP Hard? 19. State two languages which are not recursively enumerable. 20. State Rices Theorem 21. Show that the collection of all Turing machine is countable. 22. Mention the difference between decidable and undecidable problems. 23. Define the classes P and NP. 24. How to prove that the post Correspondence Problem is Undecidable? 25. Show that any PSPACE hard language is also NP hard. 26. Mention any two decidable problems.

Compiled By B. Udaya, AP / CSE, RIT

Page No : 5

Das könnte Ihnen auch gefallen