Docsity

Theory of Computation: Problem Set 8 - Prof. Phillip W. Rogaway, Assignments of Computer Science

Toggle sidebar
bg1
ECS 120: Theory of Computation Handout PS #8
UC Davis — Phil Rogaway May 15, 2007
Problem Set 8
Problem 1.
Part A. Suppose that Lis r.e. Show that L∗is r.e.
Part B. Suppose that Lis recursive. Show that L∗is recursive.
Problem 2. Classify each of the following problems as either decidable—I see how to decide
this language; r.e.—I don’t see how to decide this language, but I can see a procedure
to accept this language; co-r.e.—I don’t see how to decide this language, but I can see a
procedure to accept the complement of the language; neither: I don’t see how to accept
this language nor its complement.
Part A. {hMi:Mis a TM that accepts some string of prime length}.
Part B. {hMi:Mis a C-program that halts on hMi}.
Part C. {hGi:Gis a CFG and Gaccepts an odd-length string}.
Part D. {hMi:Mis a TM and Mhas 150 states}.
Part E. {hMi:Mis a TM and L(M) = L(M)∗}.
Part F. {hMi:Mis a TM and L(M) = ∅}.
Part G. {hMi:Mis a TM and L(M) is r.e. }.
Part H. {hG1, G2i:G1and G2are CFGs and L(G1) = L(G2)}.
Part I. {hMi:Mis a TM and Mwill visit state q25 when run on some input x}.
Part J. {hMi:Mis a TM and Mmakes use of at most 50 tape cells when run on blank tape}.
Problem 3. Recall that L={ww :w∈ {a, b}∗}is not context free. Exhibit an unrestricted
grammar for it. An unrestricted grammar is like a CFG except that rules can look like
aBC b →accbDe, for example: left-hand sides can contain any string of terminal and
nonterminals with at least one nonterminal.

Partial preview of the text

Download Theory of Computation: Problem Set 8 - Prof. Phillip W. Rogaway and more Assignments Computer Science in PDF only on Docsity!

ECS 120: Theory of Computation Handout PS # UC Davis — Phil Rogaway May 15, 2007

Problem Set 8

Problem 1.

Part A. Suppose that L is r.e. Show that L∗^ is r.e.

Part B. Suppose that L is recursive. Show that L∗^ is recursive.

Problem 2. Classify each of the following problems as either decidable—I see how to decide this language; r.e.—I don’t see how to decide this language, but I can see a procedure to accept this language; co-r.e.—I don’t see how to decide this language, but I can see a procedure to accept the complement of the language; neither: I don’t see how to accept this language nor its complement.

Part A. {〈M 〉 : M is a TM that accepts some string of prime length}.

Part B. {〈M 〉 : M is a C-program that halts on 〈M 〉}.

Part C. {〈G〉 : G is a CFG and G accepts an odd-length string}.

Part D. {〈M 〉 : M is a TM and M has 150 states}.

Part E. {〈M 〉 : M is a TM and L(M ) = L(M )∗}.

Part F. {〈M 〉 : M is a TM and L(M ) = ∅}.

Part G. {〈M 〉 : M is a TM and L(M ) is r.e. }.

Part H. {〈G 1 , G 2 〉 : G 1 and G 2 are CFGs and L(G 1 ) = L(G 2 )}.

Part I. {〈M 〉 : M is a TM and M will visit state q 25 when run on some input x}.

Part J. {〈M 〉 : M is a TM and M makes use of at most 50 tape cells when run on blank tape}.

Problem 3. Recall that L = {ww : w ∈ {a, b}∗} is not context free. Exhibit an unrestricted grammar for it. An unrestricted grammar is like a CFG except that rules can look like aBCb → accbDe, for example: left-hand sides can contain any string of terminal and nonterminals with at least one nonterminal.