/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Free solutions & answers for Introduction to Theory of Computation Chapter 2 - (Page 1) [step by step] 9781133187790 | 91Ó°ÊÓ

91Ó°ÊÓ

10E

Page 155

Give an informal description of a pushdown automaton that recognizes the language in Exercise 2.9.

11E

Page 155

Convert the CFG given in Exercise 2.1 to an equivalent PDA, using the procedure given in Theorem 2.20

12E

Page 156

Convert the CFG given in Exercise 2.3 to an equivalent PDA, using the procedure given in Theorem 2.20.

Q12E

Page 129

Convert the CFG given in Exercise 2.3 to an equivalent PDA, using the procedure given in Theorem 2.20.

Q13E

Page 156

Let G=(V,Σ,R,S)be the following grammar. V={S,T,U};Σ={0,#};R is the set of rules:

S→TT|UT→0T|T0|#U→0U00|#

a. DescribeL(G) in English.

b. Prove thatL(G)is not regular.

Q14E

Page 156

Convert the following CFG into an equivalent CFG in Chomsky normal form, using the procedure given in Theorem 2.9.

A→BAB|B|εB→00|ε

Q1E

Page 154

Recall the CFG G4 that we gave in Example 2.4. For convenience, let’s rename its variables with single letters as follows.
E→E+TTT→T×FFF→(E)a

Give parse trees and derivations for each string.

a. a

b. a+a

c. a+a+a

d. ((a))

Q23P

Page 163

Let D={xy|x,y∈{0,1}*and|x|=|y|butx≠y}.X1,…,XnShow thatD is a context-free language.

Q24P

Page 163

Let E={aibj|i≠jand2i≠j}. Show thatE is context-free language.

Q27P

Page 157

Let G=(V,Σ,R,⟨STMT⟩)be the following grammar.

⟨STMT⟩→⟨ASSIGN⟩|⟨IF-THEN⟩|⟨IF-THEN-ELSE⟩⟨IF-THEN⟩→ifconditionthen⟨STMT⟩⟨IF-THEN-ELSE⟩→ifconditionthen⟨STMT⟩else⟨STMT⟩⟨ASSIGN⟩→a:=1

Σ={if,condition,then,else,a:=1}V={⟨STMT⟩,⟨IF-THEN⟩,⟨IF-THEN-ELSE⟩,⟨ASSIGN⟩}

G is a natural-looking grammar for a fragment of a programming language, but G is ambiguous.

a. Show that G is ambiguous.

b. Give a new unambiguous grammar for the same language

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Access millions of textbook solutions in one place

Recommended explanations on Computer Science Textbooks