Está en la página 1de 11

Rajalakshmi Institute of Technology

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

THEORY OF COMPUTATION
UNIT I 1. 2. 3. 4. Prove that there exists a DFA for every NFA Explain different forms of proof with examples Discuss on the relation between DFA and minimal DFA Prove that it L be a language accepted by a NFA then there exists a DFA accepting L. Is the converse true? Justify your answer. Or Prove that a language L is accepted by some DFA if L is accepted by some NFA. 5. If L is accepted by an NFA with - transition then show that L is accepted by an NFA without - transition 6. 7. Explain the extended transition function for NFA, DFA and - NFA. Describe the fundamental differences in the rules for forming DFA and NFA. Are these differences important in terms of the languages they can recognize? Give a reason for your answer? 8. 9. Distinguish NFA and DFA with examples. Construct a DFA equivalent to the NFA. M = ({ p, q, r, s}, {0, 1 }, , P, { q, s} ) where is defined in the following table p q r s p q r 0 { q, s } {r} {s} --1 {q} { q, r } {p} {p} 15. Construct a NFA accepting the same set of strings over { a, b } ending in aba. Use it to construct a DFA accepting the same set of strings. 16. Consider - NFA. Computer the - closure of each state and find its equivalent DFA 0, 1 q 0 p Compiled By B. Udaya, AP / CSE, RIT 1 q {q} 12. Convert the following NFA to its equivalent DFA p q r *s 0 { p, q } {r} {s} {s} 1 {p} {r} --{s} 11. Construct DFA equivalent to the NFA given below s {s} {s}

13. Construct a DFA equivalent for the given diagram 14. Convert the following NFA to a DFA p q r a {p} {r} --b { p, q } {r} --NFA with the transition

10. Construct DFA equivalent to the NFA given below 0 { p, q } {r} {s} 1 {p} {r} ---

a {p}

b ---

c ---

Page No : 1

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions q *r {r} {r} {r} 22. Prove the following by the principle of induction 17. Construct an NFA accepting L given by L ={ x | {a, b }*| |x| > 3 and the third symbol of x from the right is b} 18. Consider the following - NFA compute the - closure of each state and find its equivalent DFA p q r 19. Construct an { q, r } ----NFA a --{p} --without 24. Construct a DFA that accepts all the strings on { 0, 1 } except those containing the substring 101. 25. Draw the transition diagram for recognizing the set of all operators in C 20. Convert the following NFA to a DFA using the subset construction algorithm p q r --{p} {q} a {p} {q} {r} b {q} {r} --c {r} --{p} 21. Construct the finite automata without transition for the finite automata language 26. Construct a DFA that will accept strings on { a, b } where the number of bs divisible by 3. 27. Construct a finite automata that accepts the set of all strings in { a, b, c }* such that the last symbol in input string appears earlier in the string. 28. Draw state transition diagram for FA over { a, b } containing substring aabb 29. Construct a DFA accepting all strings w over { 0, 1 } such that the number of 1s in w is 3 mod 4 30. Construct the transition diagram of a finite automata accepting all binary strings with even number of 0s and 1s 31. Construct the deterministic finite automata for accepting the set of all strings with three consecutive 0s. Compiled By B. Udaya, AP / CSE, RIT b {q} {r} --c {r} { p, q } {r} n K2 = n( n + 1 ) ( 2n + 1 ) K=1 6 23. For the finite state machine M given in the following table, test whether the strings 101101, 11111 are accepted by M States q0 q1 q2 q3 transition for the following NFA 0 q0 q3 q0 q1 1 q1 q0 q3 q2

Page No : 2

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions 32. Construct a DFA that accept the following language { x e { a, b }: | x |a = odd and | x |b = even } 33. Construct DFA to accept the language L = { w | w is of even length and begins with 11 } 34. Prove that there is no x in ( a, b )* such that ax = xb 35. Prove that for every integer n > 0 the number 42n+1 + 3n+2 is a multiple of 13 36. Show that the maximum edges in a graph (with no self loops or parallel edges) is given by ( n ( n 1 ) / 2 ) where n is the number of nodes 37. Prove the 2 is not rational 38. Prove by induction on n that i = n ( n + 1 ) 2 39. Show that a connected graph G with n vertices and n 1 edges (n>2) has at least one leaf. 40. Prove that if n is a positive integer such that n mod 4 is 2 or 3 then n is not perfect square. 7. 8. 9. Prove that regular sets are closed under substitution. Discuss on equivalence and minimization of automata Discuss the relation between DFA and minimal DFA

10. Discuss on regular expression 11. State and explain the conversion of DFA into regular expression using Ardens theorem. Illustrate with an example 12. What are the closure property of regular sets 13. Prove that if L is accepted by a DF then L is denoted by a regular expression 14. Explain the closure properties for regular languages 15. Prove that if two states are not distinguished by the table filling algorithm then the states are equivalent 16. Construct an NFA equivalent to ( 0 + 1 )* ( 00 + 11 ). 17. Construct an NFA equivalent to the regular expression (0+1)* (00+11)(0+1)* 18. Construct an NFA equivalent to the regular expression 10 + ( 0 + 11 ) 0*1 19. Construct an NFA equivalent to the regular expression ((0+1)(0+1) ( 0 + 1 ) )* 20. Construct an NFA equivalent to the following regular expression ((10)(0+1))*01

UNIT II
1. 2. 3. 4. 5. 6. Let r be a regular expression. Then prove that there exists an NFA with transition that accept L(r). For a given RE r, prove that there exists an NFA with transition that accept L( r ). Prove that if L = L( A ) for some DFA A, then there is a regular expression R such that L = L( R ) Explain the construction of NFA with transition from any given regular expression Show that the regular languages are closed under intersection and reversal. State and prove using an example, the properties of regular language

21. Construct an NFA for the regular expression r = 1 * 0 +0 22. Construct an NFA to accept the language indicated by the following regular expression ((01+001)*0*)* 23. Construct transition diagram of a finite automata corresponding to the regular expression ( ab + c* )*b. 24. Convert the regular expression a( a +b)* a into - NFA and find the minimal state DFA. 25. Construct a NFA for the regular expression ( a / b )*abb and draw its equivalent DFA. 26. Write a regular expression for binary strings beginning with 1 and not having two consecutive 0s

Compiled By B. Udaya, AP / CSE, RIT

Page No : 3

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions 27. Construct the NFA and DFA for the regular expression ( a* / b* )* 28. Define regular expression. Show that ( 1 + 00 * 1 ) + ( 1 + 00 * 1 ) * ( 0 + 10 * 1 ) = 0*1 ( 0 + 10 * 1 )* 29. Construct a minimized DFA that can be derived from the following regular expression 0*(01)(0/111)* 30. Find an equalities for the following RE and prove for the same a. b. c. b + ab* + aa* b + aa*ab* a* ( b + ab * ) a ( a + b )* + aa ( a + b )* + aa ( a + b )* 38. Show that the language { 0p, p is prime } is not regular. 39. Find whether the language { ww, w is in ( 1 + 0 )* and ( 1k | k = n2, n > 1 } are regular or not. 40. Using pumping lemma for the regular sets, prove that the language L = {ambn | m > n } is not regular 41. Prove that the following languages are not regular a. b. { 02n | n > 1 } { ambnam+n | m > 1 and n > 1 }

1 1

0,1 2

42. Obtain the regular expression R for the following DFA A such that L (A ) = L ( R ) 43. Construct a Regular Expression corresponding to the state diagram given in the following figure.

31. State the algorithm for minimizing of a DFA. Construct a minimized DFA for the RE (a+b)(a+b)* and trace for the string baaab 32. Construct an NFA for the following RE ( a + b )* ab 33. Consider the alphabet A = {a, b } and the language L = { bb, bab, baab, baaab, } over a a. b. c. d. Is A * finite or infinite? Give a brief reason for your answer. Write down a RE that represents the above language L Write down a regular grammar which describes the above language Draw the DFA corresponding to the above language L.
i i n n n n

44. Obtain the regular expression that denotes the language accepted by q1 q2 q3

34. Show that the set L = { 0 1 | i > 1 } or L = { a b | n > 1 } or L = { 0 1 | n > 1 } is not regular 35. Show that the set L = { 0i2 | i is an integer, i > 1 } is not a regular 36. Show that the set L = { 0n2 | n is an integer, n > 1 } or L = { 0n2 | n Z+ }is not regular 37. Find whether the following languages are regular or not a. b. c. L = { w { a, b } | w = wR } L={0 1 2
n m n+m

45. Fine the regular expression for the set of all strings denoted by R132 from the deterministic finite automata given below.

1
1

| n, m > 1 }

0 0
Compiled By B. Udaya, AP / CSE, RIT

3 1 0, 1 Page No : 4

L = { 1k | k = n2, n > 1 }

d. L1 / L2 = { x | some y L2, x L1 }

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions 46. verify whether the finite automata M1 and M2 given below are equivalent over { a, b }

52. Find the RE corresponding to the following automata States 47. Construct a minimum state automata equivalent to a given automata M whose transition table is given below. 48. Find the regular expression corresponding to the finite automata given below q0 q1 q2 q3 53. Construct a Regular Expression for the following DFA using Kleenes theorem 0 49. Fine the regular expression for the set of all strings denoted by R23
2

a q0 q2 q3 q0 q0 q1 q1

b q3 q5 q4 q5 q6 q4 q3

q4 q5 q6

1 B B B

*A B C

A C A

from the

deterministic finite automata given below.

54. Construct a minimized automata for the following automata to define the 50. Construct a regular expression to the transition diagram. same language States q0 q1 q2 51. Fine the regular expression for the set of all strings denoted by R132 from the deterministic finite automata given below. *q3 q4 a q1 q0 q3 q3 q3 b q0 q2 q1 q0 q5

Compiled By B. Udaya, AP / CSE, RIT

Page No : 5

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions q5 q6 q7 q6 q5 q6 q4 q6 q3 12. Define ambiguity, leftmost derivation and rightmost derivation with an example. 13. Prove that every language recognized by a PDA is context free. 14. Explain the difference between acceptance by final state and empty stack in PDA. 15. What is deterministic PDA? Explain with an example 16. Prove that if w is a string of a language then there is a parse tree with yield

UNIT III
1. 2. 3. 4. 5. 6. 7. 8. 9. Let G = ( V, T, P, S ) be Context Free Grammar. Then prove that S * if and only if there is a derivation tree in grammar G with yield If L is N(M1) the language accepted by empty stack for some PDA M, then L is L(M2) language accepted by final state for some PDA M2. If L is L(M2) for some PDA M2, then show that L is N(M1) for some PDA M1. If L is context free language then prove that there exists a PDA M such that L = N(M) If L is context free language then prove that there exists a PDA M such that L = N(M) language accepted by empty stack Define deterministic PDA. Is it true that DPDA and PDA are equivalent in the sense of language acceptance is concern? Justify your answer Explain different types of acceptance of PDA. Are they equivalent in sense of language acceptance? Justify your answer. Prove that if L = N(PN) for some PDA PN = ( Q, , , N, q0, Z0 ) then there is a PDA PF such that L = L(PF) Explain in detail about equivalence of PDA and CFG 10. Prove that a CFL can be recognized by a PDA by empty stack. 11. Let G be a CFG snd let A*w in G. Then show that there is a leftmost derivation of w

w and also prove that if A=> w then it implies that w is a string of the language L defined by a CFG. 17. Let G be the grammar S 0B | 1A, A 0 | 0S | 1AA, B 1 | 1S | 0BB. For the string 00110101 find its leftmost derivation and derivation tree. 18. If G is the grammar S SbS | a, show that G is ambiguous. 19. Let G be the grammar S aS | aSbS | . Prove that L ( G ) = { x | each prefix of x has at least as many as as bs } 20. Show that E E + E | E * E | ( E ) | id is ambiguous 21. Find a CFG with no useless symbols equivalent to S AB | CA, A a, B BC | AB, C aB | b 22. Show that the grammar S a | Sa | bSS | SSb | SbS is ambiguous 23. Show that the grammar S aSb | bSaS | is ambiguous and what is the language generated by this grammar? 24. Write a grammar to recognize all prefix expressions involving all binary arithmetic operators. Construct parse tree for the sentence -*+abc/de, using your grammar 25. Is S aSb | aAb, the context free language. 26. Let the grammar S aB | bA A a | aS | bAA B b | bS | aBB for the string aabbbbaa find LMD, RMD and parse tree. 27. Explain about parse tree. For the following grammar Compiled By B. Udaya, AP / CSE, RIT A bAa, A ba is the CFG. Determine

Page No : 6

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions S aB | bA A a | aS | bAA B b | bS | aBB 43. Show that set of all strings over { a, b } consisting of equal number of as and bs is accepted by a DPDA 44. Construct a CFG accepting L { ambn | n < m } and construct a PDA 45. Design a PDA for recognizing the language { ambncm | m,n > 1}using empty stack. 46. Let M = ( {q0, q1}, {0, 1 }, { X, Z0 }, , q0, Z0, ) where is given by ( q0,0,Z0 ) = { ( q0,XZ0 ) } ( q0,1,X ) = { ( q1, ) } ( q1,,X ) = { ( q1, ) } ( q0,0,X ) = { ( q0,XX ) } ( q1,1,X ) = { ( q1, ) } ( q1,,Z0 ) = { ( q1, ) } For the string aaabbabbba, find i) Left most derivation ii) Rightmost derivation iii)Parse tree 28. Find a derivation tree of a * b + a * b given that a * b + a * b is in L( G ) where G is given by S S + S | S * S | a | b 29. Show that the grammar S a | abSb | aAb, A bS | aAAb is ambiguous 30. Consider the grammar S iCtS | iCtSeS | a C b where i,t and e stand for if, then and else an C and S for Conditional and statement respectively. i. Construct a leftmost derivation for the sentence w = ibtibtaea ii. Show the corresponding parse tree for the above sentence iii. Is the above grammar ambiguous ? if so prove it. iv. Remove the ambiguity if any and prove that both the grammar produces the same languages 31. Construct a PDA accepting {anbman | m,n >1 } by empty stack. Also construct the corresponding context free grammar accepting the same set. 32. Construct a PDA for the language { anb2n | n > 0 } 33. Construct a PA for the set of palindrome over the alphabet { a,b } 34. Construct a PDA for { anbma2(m+n) | n,m > 0 } 35. Construct a PDA accepting by empty stack the language { ambmcn | m,n > 1} 36. Construct the CFG for the language L(G) = { ambn | m# n, m , n > 0 } 37. Construct PDA for the language L = { wwR | w in ( a + b )* } 38. Construct a PDA accepting the language {(ab)n | n > 1 } by empty stack. 39. Construct a transition table for PDA which accepts the language L = { anb2n | n > 1 }. Trace your PDA for the input with n = 3. 40. Construct the CFG for the language L(G) = { anban | n > 1 } 41. Construct PDA for the language L = { wcw | w in ( 0 + 1 )* } 42. Construct a CFG for the set { aibjck | i # j or j # k }

Construct a CFG G = ( V, T, P, S ) generating N(M) 47. Construct a PDA for the grammar S aB | bA S aAA A a | aS | bAA A aS | bS | a B b | bS | aBB 48. Construct an unrestricted PDA equivalent to the grammar given below 49. Construct a PDA that will accept the language generated by the grammar G = ({S,A}, {a,b}, S,P) with the production S AA | a, A SA | b 50. Construct an NPDA that accept the language generated by the grammar S aSbb | abb 51. Construct a PDA equivalent to the following grammar S aAA, A aS | bS | a 52. Consider the CFG = ( {S, T, C, D}, {a,b,c,d}, S, P) where P is S cCD | dTC | T cDC | cST | a C aTD | D dC | d

Present PDA that accepts the language generated by this grammar. Your PA must accept by empty store, it must start with S on its stack and it must be based on above grammar 53. Convert the grammar S aSb | A, A bSa | S | to a PDA that accepts the same language by empty stack.

Compiled By B. Udaya, AP / CSE, RIT

Page No : 7

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions 54. Construct the push down automata for S aSb | ab 55. Find the PDA equivalent to the given CFG with the following productions S A A BCB ba Cac 12. State and prove CNF for CFL. 13. State and prove pumping lemma for CFL. 14. Prove that TM with one way infinite tape and two way infinite tape are equivalent. 15. Explain the closure properties of context free languages. 16. Discuss about programming techniques for Turing Machine. 17. Explain about the closure properties of CFL. 18. Prove that every grammar with productions can be converted to an equivalent grammar without productions. 19. State the techniques for Turing machine construction? Illustrate with a simple language 20. Explain the different models of Turing machines 21. Design a Turing machine to compute proper subtraction m n 22. Design a Turing Machine M to implement the function multiplication using the subroutine copy. Or Design a TM to compute f(m, n) = m * n, m, n N. 23. Explain how a Turing Machine with the multiple tracks of the tape can be used to determine the given number is prime or not? 24. Design a Turing Machine to compute f ( m + n ) = m + n m, n > 0 and simulate their action on the input 0100. 25. Design a Turing Machine to accept the language L = { 0n 1n | n > 1 } and simulate its action on the input 00111. 26. Design a TM M fro f( x, y, z ) = 2( x + y ) z, z < 2( x + y ) and x, y, z are stored in the tape in the form 0x10y1oz1. 27. Design a Turing machine which reverse the given string { abb } 28. Construct Turing Machine for the language L = { 1n0n1n | n > 1 } or anbncn or { ai bi ci | i > 0 } 29. Construct the Turing machine for the language L = { wwR | w is in ( 0 + 1 )* }

Unit IV
1. 2. Is it possible that a Turing Machine could be considered as a computer of functions from inters? If yes, justify your answer. Describe the following Turing Machine and their working. Are they more powerful than the basic Turing Machine? i) Multi tape Turing Machine ii) Multi dimensional Turing Machine iii) Non Deterministic Turing machine 3. 4. 5. 6. 7. 8. 9. Explain how the finite control of a Turing Machine can be used to hold a finite amount of information with an example. Explain how a multiple track in the TM can be used for testing given positive integer is a prime or not. Suppose G is a CFG and w of length l is in L(G). How long is a derivation of w in G if G is in CNF and if G is in GNF? Show that every CFL without can be generated by a CFG in CNF. Show that if L is accepted by a multitape Turing Machine, it is accepted by single tape Turing Machine also. Show that context free languages are closed under union operation but not under intersection Prove that the set of CFL is closed under union and kleene closure. 10. Write short notes on checking off symbol. 11. Prove that every non empty CFL is generated by a CFG with no useless symbols.

Compiled By B. Udaya, AP / CSE, RIT

Page No : 8

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions 30. Design a TM to compute n . 31. Construct a TM to move an input string over the alphabet A = {a} to the right one cell. Assume that the tape head starts some where on a blank cell to the left of the input string. All other cells are blank, labeled by ^. The machine must move the entire string to the right one cell, learning all remaining cells blank. 32. Find a grammar in Chomsky Normal Form equivalent to S aAbB, A aA | a, B bB | b 33. Find a grammar in Chomsky Normal Form equivalent to S aAD, A aB | bAB, B b, D d 34. Begin with the grammar S 0A0 | 1B1 | BB, B C, B S | A, C S | . And simplify using the safe order. i. Eliminate production ii. Eliminate unit production iii. Eliminate useless production iv. Put the grammar in CNF 35. Obtain the CNF equivalent to the grammar S bA | aB, A bAA | aS | a, B aBB | bS | b 36. Simplify the following grammar and find its equivalent in CNF S AB | CA, B BC | AB, A a, C aB | b 37. Convert the grammar with production into CNF A bAB | , B Baa | 38. Convert the following grammar in CNF A BCD | b B Yc | d C gA | c D dB | a Yf 39. Convert the grammar S AB | aB, A aab |, B bbA into CNF 40. Convert the following grammar into CNF S cBA, S A, A cB, A AbbS, B aaa 41. Reduce the following grammar to CNF Compiled By B. Udaya, AP / CSE, RIT
2

S a | AAB

A ab | aB |

B aba |

42. Convert the following grammar into an equivalent one with no unit productions and no useless symbols. Convert to CNF S A | CB A C | D B 1B | 1 C 0C | 0 D 2D | 2 43. Construct a grammar in Greibach Normal Form equivalent to the grammar S AA | a, A SS | b 44. Convert to Greibach Normal Form of the grammar G = ( { A1, A2, A3}, {a, b}, P , A1 ) where P consists of the following A1 A2A3 Form 46. Find the GNF equivalent to the grammar S AA | 0, A1 A2A3 S a | AB A SS | 1 A2 A3A1 | a A3 A1A2 |b A a | BC
i j i j

A2 A3A1 | b

A3 A1A2 | a

45. Convert the grammar S AB, A BS | b, B SA | a into Greibach Normal

47. Obtain Greibach Normal Form for the grammar 48. Convert the following grammar to GNF Bb Cb 49. Show that L = { a b c d | i > 1, j > 1 } is not a context free language 50. Show that the language {0n 1n 2n | n > 1} or {an bn cn | n > 1} or {aibici | i > 1 } is not a context free language. 51. Determine whether the language given by L = { an2 | n > 1 } is context free or not. 52. Construct a TM M for a language L = { anbn | n > 1 } 53. Define pumping lemma for context free language. Show that L={aibj ck|i<j<k} is not context free. 54. Is the language L = { anbncmdm | n, m > 1 } is context free? Justify with planning lemma

Page No : 9

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions d. Prove that the halting problem of Turing Machine over { 0, 1 }* as unsolvable. e. Consider the language of all TMs that gives no input eventually writes a non blank symbol on their tapes. Explain why this set is decidable. Why does this non conflict with the halting problem 12. Show that it is undecidable for arbitrary CFGs G1 and G2 whether L( G1 ) n L( G2 ) is a CFL. 13. Explain the Post correspondence problem with an example. Discuss the decidability of Posts correspondence problem 14. Prove that the function fadd( x, y ) = x + y is primitive recursive. 15. Define the class P and NP. Write short notes on NP hard and NP complete problems. Explain the difference between P and NP problems 16. Write short notes on recursive and recursively enumerable language 17. Prove Lne is recursively enumerable 18. Prove Ld is on recursively enumerable 19. State and prove Rices theorem for recursively enumerable index sets 20. Let = { a, b }*. Let A and B be the lists of three strings as given below A = { b, bab3, ba } B = { b3, bc, a } Does this instance of PCP have a solution? Justify your answer 21. Does PCP with two lists x = (b, b, ab3, ba ) and y = ( b3, ba, a ) have a solution. 22. Prove that the punch card puzzle is NP complete. 23. Explain the difference between tractable and intractable problems with an example 24. Show that the characteristics function of the set of all even numbers is recursive. 25. Consider the TM M and w = 01 where M = ({ q1, q2, q3 }, { 0, 1 }, , q1, B, { q3 }) and is given by Compiled By B. Udaya, AP / CSE, RIT

Unit V
1. Define Universal language Lu. Show that Lu is recursively enumerable but not recursive or Define the language Lu. Check whether Lu is recursively enumerable? Or Lu is recursive? Justify your answer. 2. 3. 4. 5. 6. 7. 8. 9. Show that the complement of a recursive language is recursive. If a language L and its complement L are both recursively enumerable then show that L and hence L is recursive. Show that union of recursive language is recursive Define the language Ld and show that Ld is not recursively enumerable language. Explain the Halting Problem. Is it decidable or undecidable problem? Whether the problem of determining given recursively enumerable language is empty or not is decidable? Justify your answer. Describe how a Turing Machine can be encoded with 0 and 1 give an example. Find whether the following languages are recursive or recursively enumerable. a. b. c. d. Union of two recursive languages Union of two recursively enumerable languages If L and complement of L are recursively enumerable. Lu

10. Show that Finding whether the given CFG is ambiguous or not is undecidable by reduction technique. 11. Show that halting problem of TM is undecidable. Or a. b. c. Show that there exists a TM for which the halting problem is unsolvable. Discuss any two undecidable problems about the Turing machine. State the halting problem of TMs.

Page No : 10

Rajalakshmi Institute of Technology


Department of Computer Science and Engineering Theory of Computation Part B Questions 0 q1 q2 q3 q2, 1, R q2, 0, L q3, 0, L ----1 q2, 1, L q1, 0, R q2, 0, R --B

Reduce the above problem to Posts Correspondence problem and find whether that PCP has a solution or not. 1. Let = { 0, 1 }. Let A and B be the list of three strings each defined as Does this PCP have a solution? i 1 2 3 List A wi 1 10111 10 List B xi 111 10 0

26. Obtain the code for < M, 1011 > where M = ({ q1, q2, q3 }, { 0, 1, B }, , q1, B, { q2 }) have moves ( q1, 1 ) = ( q3, 0, R ) ( q2, 1 ) = ( q2, 0, R ) ( q3, 0 ) = ( q1, 1, R ) ( q3, B ) = ( q3, 1, L )

Compiled By B. Udaya, AP / CSE, RIT

Page No : 11

También podría gustarte