You are on page 1of 4

G.H.RAISONI COLLEGE OF ENGG.

NAGPUR DEPARTMENT OF INFORMATION TECHNOLOGY SESSION - 2009-10 SUBJECT: THEORY OF COMPUTATIONS SEMESTER: IV SEM QUESTION BANK

UNIT I : Q.1.1 Define finite automata and specify its application. Q.1.2 What are closure properties of regular sets? Q.1.3 Give statement of pumping lemma for regular sets and its proof. Q.1.4 What is mean by optimization of DFA? Explain each step in optimization of DFA. Q.1.5 Define Moore and Mealy machine. P.1.1 Construct finite automata for all strings over { 0, 1} that do not contain 101 as substring. P.1.2 Construct finite automata for language L = { w | w {a,b}* and n(a) w MOD 3 > n(b) w MOD 3 } Where n(a) w represents number of as in w and n(b) w represents number of bs in w P.1.3 Construct a finite automata for strings over decimal digits that represents decimal number divisible by 3. P.1.4 Given that L1 = { w | w {a,b}* and w ends with aa } L2 = { w | w {a,b}* and w contains ab as substring } Construct finite automata for language L = L1 L2. P.1.5 Construct finite automata for accepting strings over {a, b} that contains at most one pair of consecutive as and at most one pair of consecutive bs. UNIT II : Q.2.1 Show that every regular set can be represented by regular expression. Q.2.2 Describe in English the language represented by following regular expression i) (0 | 1)* ii) (a | b)*(ab | ba)(a | b)* iii) a | b | | (a | b)(a | b)(a | b)(a | b)* iv) (0 | 1)* ( 00 | 11) v) (0*10*10*10*)* Q.2.5 Give the deterministic finite automata accepting the following languages over the alphabet { a, b} i) The set of allstring ending in 00 ii) The set of all strings such that every block of five consecutive symbols contains at least two 0s. Q.2.4 Give the steps to obtain regular expression from finite automata

Q.2.5 Write down steps involved in obtaining right linear grammar equivalent to left linear grammar. Q.2.6 Differentiate between DFA, NFA and -NFA. P.2.1 Find minimum state DFA for the regular expression (0 | 1)*(00 | 11) P.2.2 Find minimum state DFA for the regular expression 10 + ( 0 + 11 ) 0*1 P.2.3 Find regular expression for the finite automata shown in Fig. P.2.3

0 q0

1 1 q1

0 0 q2

Fig. P.2.3 P.2.4 Minimize the finite automata shown in Fig P.2.4

q0 b q4 b

q1

b q2 a, b a, b q3

aa a

q5 a q6 b

q7

a, b

Fig. P.2.4 P.2.5 Find an equivalent right linear grammar for the following grammar : S A1 A A10 | 01 UNIT III : Q.3.1 Define Push down automata. Q.3.2 What are normal forms of the context free grammar? Explain each in brief. Q.3.3 What are the steps involved in reduction of grammar symbol? Q.3.4 What is mean by Non-deterministic push down automata? How it differs with deterministic one ? Is the power of both same?

Q.3.5 Q.3.6 Q.3.7 Q.3.8 P.3.1

Define parser? Explain the working of LR(0) parser. Give statement of pumping lemma for CFG. What are closure properties of CFL? What are decision properties of CFL.? Construct push down automata for L = { wcwR | w {a,b}* and wR represents reverse of w } P.3.2 Construct push down automata for L = { 0m1n0m+n | m, n >=1 } P.3.3 Construct push down automata for L = { wwR | w {a,b}* and wR represents reverse of w } P.3.4 Construct push down automata for L = { ambn | m, n >=1 and m n } P.3.5 Use CYK algorithm to determine whether the string aaaaa is member of language generated by the CFG G = ( {S, A, B, C}, {a, b}, P, S) where P = { S AB | BC A BA | a B CC | b C AB | a } P.3.6 Construct LR(0) parser for the grammar given below. Also check whether the string id+id*id is accepted by your parser or not. EE+T|T TT*F|F F ( E ) | id P.3.7 Bring the following grammar into CNF and GNF S 0S0 | 1S1 | 0 | 1 UNIT IV : Q.4.1 Define Turing machine? Explain basic model and instantaneous description. Q.4.2 What happens when Non determinism is introduced in TM? How it can be simulate by deterministic TM? Q.4.3 Write short note on universal Turing machine. Q.4.4 What are closure properties of recursively enumerable language? Q.4.5 What are types of Turing Machine? P.4.1 Construct TM for L = { wcwR | w (a + b }* & wR represents reverse of w } P.4.2 Construct TM for L = {ww | w (a, b)+ } P.4.3 Design Non deterministic TM that accepts the language L={an | n is not a prime number} P.4.4 Design a TM for L={anbncn | n 1} P.4.5 Design a TM find 2s complement of n binary number P.4.6 Design a TM to convert unary number to binary number. UNIT V

Q.5.1 What is mean by Halting problem? Is halting problem solvable? Verified your answer? Q.5.2 Define linear bounded automata? Q.5.3 Give the grammar for L={anbncn |n1} also give derivation for a3b3c3 Q.5.4 Explain Chomsky hierarchy of language? Q.5.5 What PCP? Explain MPCP? Q.5.6 Define primitive recursive function? Q.5.7 What is PR predicates? Q.5.8 Write short note on bounded minimalization and unbounded minimalization? P.5.1 Show that empty tape problem is unsolvable? P.5.2 Is PCP solution exist for the following instance of list? Is yes specify. List X y 1 1 111 2 10111 10 3 10 1

P.5.3 Is PCP solution exist for the following instance. S.N. 1 2 3 List A 10 011 101 List B 101 11 011

P.5.4 Show that following function as PR 1. ABS(x, y) 2. MAX(x, y) 3. MIN(x, y) P.5.5 Show that PrNo(n) is primitive recursive Where PrNo(n) return TRUE in n is prime otherwise FALSE.

N. V. Chaudhari

You might also like