Você está na página 1de 8

Rajalakshmi Institute of Technology

Department of Computer Science and Engineering THEORY OF COMPUTATION Part A Anna University Previous Semester Questions
Nov / Dec 2005 UNIT I Nov / Dec 2003 1. Obtain the DFA equivalent to the following NFA 2. Obtain an NFA without transition to the following NFA with transition 2. April / May 2004 1. 2. Is it true the language accepted by NFA is different from the regular language? Justify your answer. Describe the following sets by regular expression a. b. L1 = Set of all strings of 0s and 1s ending in 00 L2 = Set of all strings of 0s and 1s beginning with 0 and ending with 1 Nov / Dec 2004 1. Obtain the - closure of states q0 and q1 in the following NFA with transition Find the - closure of states 1, 2, and 4 in the following transition diagram Nov / Dec 2006 1. Construct a finite automata for the language {0n | n mod 3=2 n>0} April / May 2007 1. 2. 1. 1. 2. April / May 2005 1. Find the language accepted by the following automaton Nov / Dec 2008 2. Define NFA with - transition. Is the NFAs with - transition are more powerful than the NFAs without - transition? 1. Define the Language described by NFA and DFA 3. What is a finite automaton? Give two examples. Enumerate the difference between DFA and NFA List any four ways of theorem proving Define automata What is the principle of mathematical induction? Construct a DFA over = { a, b } which produces not more than 3as April / May 2006 1. Find the language accepted by the DFA given below 1. Obtain the - closure of each state in the following NFA with - moves

Nov / Dec 2007

April / May 2008

April / May 2009

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 Anna University Previous Semester Questions
1. 2. substring ab. Nov / Dec 2009 --April / May 2010 1. 2. Construct a DFA to recognize odd number of 1s and even number 0s State the relation among regular expression, DFA, NFA and FA with transition Nov / Dec 2010 1. 2. 1. 2. What is inductive proof? Find the set of strings accepted by the finite automata. Differentiate between proof by contradiction and proof by contra positive. Construct a DFA for the language over {0, 1}* such that it contains "000" as a substring. Nov / Dec 2011 1. 2. 3. What is structural induction? State the difference between NFA and DFA. Construct a DFA for the following a. b. 1. 2. 1. 2. All strings that contain exactly 4 zeros. All strings that dont contain the substring 110. 1. 2. Nov / Dec 2003 --April / May 2004 --Nov / Dec 2004 1. Show that ( r*)* = r* for a regular expression r. April / May 2005 --Nov / Dec 2005 1. Define regular expression and give an example. April / May 2006 --Nov / Dec 2006 Let R be any set of regular language. Is U R1 regular? Prove it. Consider the alphabet = { a, b, (, ), +, *, ., }. Construct a context free grammar that generated all strings in * that are regular expression over the alphabet { a, b }. UNIT II Differentiate between DFA and NFA. April / May 2013 1. 2. What is meant by DFA? Define the term transition. Construct an NFA for all strings over alphabet = { a, b } that contains a

April / May 2011

April / May 2012 What is epsilon transition in finite automata? Specify the main difference between DFA and NFA. Define a) Finite automat b) Transition Diagram April / May 2007 1. 2. 1. Verify whether L = { a2n | n > 1 } is regular. Mention the closure properties of regular language Show that the complement of a regular language is regular.

Nov / Dec 2012 State the principle of induction.

Nov / Dec 2007

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 Anna University Previous Semester Questions
2. 3. 4. What is meant by equivalent states in DFA? April / May 2011 1. 2. 1. Prove that the complement of a regular language is also regular. Prove by pumping lemma, that the language 0 1 is not regular. Is the set of strings over the alphabet { 0 } of the form 0n where n is not a prime is regular? Prove or disprove. April / May 2012 1. 2. Is the language L = { 02n | n > 1 } is regular? Justify. What is minimization of automaton?
n n

State pumping lemma and its advantages. Consider the alphabet = { a, b, (, ), +, *, ., }. Construct a context free grammar that generated all strings in * that are regular expression over the alphabet { a, b }.

Nov / Dec 2011

April / May 2008 1. 1. 2. 3. 1. Construct a DFA fro the regular expression aa* | bb* Show that the complement of a regular language is also regular. Show that * is by constructing its NFA using Thomsons construction. State pumping lemma and its advantages. 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. 2. Prove or disprove the following for regular expression ( a + b )* cd for = { a, b, c, d } Nov / Dec 2009 1. 1. 2. What is ( 10, 11 ) ?
*

Nov / Dec 2008

Nov / Dec 2012 1. Give the regular expression for the following a. b. 2. 1. 2. 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.

April / May 2009

Differentiate regular expression and regular language. What is a regular expression? Name any four closure properties of regular languages.

April / May 2013

April / May 2010 Let L = { w | w { 0, 1 }* w does not contain 00 and is not empty }. Construct a regular expression that generates L. Prove or disprove that the regular languages are closed under concatenation and complement. Nov / Dec 2010 1. 2. Give the regular expression for set of all strings ending in 00. State pumping lemma for regular set. 3. 2. Nov / Dec 2003 1.

UNIT III Let G = ( { S, C }, { a, b }, P, S ) where P consist of S aCa C aCa | b find L(G) 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. Define push down automata

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 Anna University Previous Semester Questions
4. What are the different types of languages acceptances by 1. 2. 3. 4. 1. For the grammar S aCa, C aCa | b find L(G). Show that id + id * id can be generated by two distinct leftmost derivation in the grammar E E + E | E * E | ( E ) | id Give an example of a PDA. Explain the acceptance of a PDA with empty stack. For the grammar S A | B, A 0A | , B 0B | 1 B | give the leftmost and rightmost derivation of the following string 00101. 2. 3. Construct context free grammar to generate { anbn | n Z+} Is it true that deterministic pushdown automata and nondeterministic pushdown automata are equivalent in the sense of language of acceptance? Justify your answer. 4. 1. 2. Define instantaneous description of Pushdown automata. Write a context free grammar to generate the set {ambncp | m+ n = p and p > 1} Define the language generated by a PDA using final state of the PDA and empty state of that PDA. April / May 2007 1. 2. 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. Define the language generated by a PDA using the two methods of accepting language. Nov / Dec 2007 1. 2. Find whether the language { ambmcm | m > 0 } is context free or not. Define the language recognized by the PDA using empty stack. a PDA and define them April / May 2004 1. 2. 3. 4. Find L( G ) where G = ( { S }, { 0, 1 }, { S 0S1, S }, S } Define derivation tree for a CFG. Give an example of a PDA. Define the acceptance of a PDA by empty stack. Is it true that the language accepted by a PDA by empty stack or that of final states are different language. Nov / Dec 2004 1. 2. 3. 4. Construct a context free grammar for generating the language L={anbn| n > 1 } Let G be the grammar S aB | bA, A a | aS | bAA, B b | S | aBB. For the string aaabbabbba find leftmost derivation. 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. 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 )} April / May 2005 1. 2. 3. 4. Find the language generated by the grammar S aB | bA , A a | aS | bAA, B b | bS | aBB. Obtain a parse tree for the string aaabbabbba generated by the grammar S aB | bA, A a | aS | bAA, B b | S | aBB. What are the different ways in which a PDA accepts a language? Define them. Is it true that non deterministic PDA is more powerful than that of deterministic PDA? Justify your answer. Nov / Dec 2005

April / May 2006

Nov / Dec 2006

April / May 2008

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 Anna University Previous Semester Questions
1. 2. 1. 2. 1. 2. 1. 2. 3. 4. Let S aB | bA, A aS | bAA | a, B bS | aBB | b. 2. 3. Is the language of Deterministic PDA and Non deterministic PDA same? Justify. What is the height of the parse tree to represent a string of length n using Chomsky normal form? Nov / Dec 2011 1. 1. 2. 1. 2. Is the grammar below ambiguous S SS | ( S ) | S ( S ) | E? Is the grammar E E + E / id is ambiguous? Justify. Mention the use of context free grammar. What is an ambiguous grammar? Give example. What are the different types of language accepted by a PDA and define them?
m m m

derive the string aaabbabba as leftmost derivation. What is meant by empty production removal in PDA? Show that the grammar S a | Sa | bSS | SSb | SbS is ambiguous. Find whether the language { a b c | m > 0 } is context free or not. Find out the context free language S aSb | aAb, A bAa | ba. Define Instantaneous description of PDA. What do you mean by expressive power of a grammar? Construct a PDA to accept the language { (ab) | n > 1 } by empty stack. Give a semi three grammar generating { a | i is a positive power of 3 } For a PDA M = ( Q, , , , q0, Z0, F ) define the language accepted by the final state. April / May 2010 1. 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. 2. 1. 2. 1. State the definition for PDA. Write down the context free grammar for the language { } 1 | = n b a L n n . Is the grammar id | E E E + is ambiguous? Justify. 2. 1. Construct a CFG over {a, b} generating a language consisting of equal number of a's and b's.
i n

Nov / Dec 2008

April / May 2009

April / May 2012

Nov / Dec 2009

Nov / Dec 2012

April / May 2013 1. What is a CFG? 2. Define the term ambiguity in grammars. UNIT IV Nov / Dec 2003 1. 2. 1. 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.

April / May 2004

Nov / Dec 2010

April / May 2011

Nov / Dec 2004

Compiled By B. Udaya, AP / CSE, RIT

Page No : 5

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering THEORY OF COMPUTATION Part A Anna University Previous Semester Questions
2. Explain how a Turing machine model and explain in one Nov / Dec 2007 1. 2. 1. 2. 1. 2. What is meant by multitape Turing machine? What are the useless symbols in a grammar? State the pumping lemma for CFG. Define Turing machine. Differentiate multitape and multitrack Turing machine. What is the minimum number of stacks needed for simulating a Turing machine using multi stack machine? April / May 2009 1. 2. 1. 2. 3. 1. 2. Define Greibach Normal Form. Construct a Turing machine for zero function f : N N, f( x ) = 0 When does a Turing machine become an algorithm? State Greibach Normal Form. State the pumping lemma for context free language. Convert the following grammar in Greibach Normal Form S ABb | a, A aaA | B, B bAb Design a Turing machine with no more than three states that accepts the language a ( a + b ) *. Assume = { a, b } Nov / Dec 2010 1. 2. What is Turing machine? Is the language { } 1 | = n c b a L n n n is context free? Justify. move. What are the actions take place in a Turing Machine. April / May 2005 1. 2. 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. Nov / Dec 2005 1. Describe the non deterministic Turing machine model. Is it true the non deterministic Turing Machine models are more powerful than the basic Turing Machine? 2. When a language is said to be recursive? Is it true that every regular set is not recursive? April / May 2006 1. 2. Define basic Turing Machine. Explain the multitape Turing machine model. Is it more powerful than the basic Turing machine? Justify your answer. Nov / Dec 2006 1. 2. 3. Can you say the language generated by a Context Free Grammar in CNF is finite or infinite? If so how? If not why? What is the language for which the Turing Machine has both accepting and rejecting configuration? Can this be called CFL? The binary equivalent of a positive integer is stored in a tape. Write the necessary transitions to multiply that integer by 2. April / May 2007 1. 2. State the pumping lemma for context free language. Define Turing Machine.

April / May 2008

Nov / Dec 2008

Nov / Dec 2009

April / May 2010

April / May 2011

Compiled By B. Udaya, AP / CSE, RIT

Page No : 6

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering THEORY OF COMPUTATION Part A Anna University Previous Semester Questions
1. 2. What is the height of the parse tree to represent a string 1. 2. 1. 2. When we say a problem is decidable? Give an example of undecidable 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. April / May 2005 1. 2. 1. 2. 1. 2. 1. 2. 1. 2. 1. 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? When a problem is said to be undecidable? Give an example. Show that union of recursive language is recursive. Show that the following problem is undecidable Given two Context Free Grammar G1 and G2. Is L(G1) L ( G2 ) = ? UNIT V Nov / Dec 2003 1. 2. When we say a problem is decidable? Give an example of undecidable problem Explain the modified Posts correspondence problem Define Ld. Differentiate between recursive and recursively enumerable language. Mention any two undecidable properties for recursively enumerable language. Define diagonal language A aAA | aBC | bB, of length 'n' using Chomsky normal form? Construct a Turing machine to compute 'n mod 2' where 'n' is represented in the tape in unary form consisting of only 0's. Nov / Dec 2011 1. 2. 3. Design a TM that accepts the language of odd integers written in binary. State the two normal forms and give an example. Convert the following grammar into an equivalent one with no unit productions and no useless symbols S ABA, B A | bB | Cb, April / May 2012 1. 2. 1. 2. 1. 2. What is Chomsky normal form? Is the context free language is closed under complementation? Justify. State the pumping lemma for CFLs. What are the applications of Turing machine? What is meant by Greibach Normal Form? List the closure properties of Context free Languages. C CC | cC.

Nov / Dec 2004

Nov / Dec 2005

Nov / Dec 2012

April / May 2006

April / May 2013

Nov / Dec 2006

April / May 2007

Nov / Dec 2007

April / May 2004

April / May 2008

Compiled By B. Udaya, AP / CSE, RIT

Page No : 7

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering THEORY OF COMPUTATION Part A Anna University Previous Semester Questions
1. 2. What is meant be halting problem? 2. 1. Nov / Dec 2008 1. 2. 1. 2. 1. 2. 1. 2. 1. 2. 1. 2. 1. 2. 1. Give an example of languages which are not recursively enumerable. Define diagonal language. Prove the theorem If l is a language generated by some TM M1, then L is recursively enumerable set. Define Posts correspondence problem. When do you say a problem is NP Hard? State two languages which are not recursively enumerable. State Rices Theorem Show that the collection of all Turing machine is countable. What is recursively enumerable language? Mention the difference between decidable and undecidable problems. Prove that the complement of recursive languages is recursive. Define the classes P and NP. How to prove that the post Correspondence Problem is Undecidable? Show that any PSPACE hard language is also NP hard. Mention any two decidable problems. 2. 1. 2. What is recursively enumerable language? When we say a problem is decidable? Give an example of undecidable problem. What is recursively enumerable language? What is meant by recursively enumerable language? Define the class NP problem What is post correspondence problem? Nov / Dec 2012

April / May 2013

April / May 2009

Nov / Dec 2009

April / May 2010

Nov / Dec 2010

April / May 2011

Nov / Dec 2011

April / May 2012

Compiled By B. Udaya, AP / CSE, RIT

Page No : 8

Você também pode gostar