/*! 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 3) [step by step] 9781133187790 | 91Ó°ÊÓ

91Ó°ÊÓ

Q45P

Page 158

Let A={wtwR|w,t∈{0,1}*and|w|=|t|}. Prove that A is not a CFL.

Q46P

Page 158

Consider the following CFG:

S→SS|TT→aTb|ab

Describe L(G)and show that G is ambiguous. Give an unambiguous grammar(H) where L(H)=L(G)and sketch a proof that (H)is unambiguous.

Q49P

Page 159

We defined the rotational closure of language Ato be RC(A)={yx|xy∈A} . Show that the class of CFLs is closed under rotational closure

Q4E

Page 155

Give context-free grammars that generate the following languages. In all parts, the alphabet ∑is {0,1}.

role="math" localid="1660714062992" a.{wwcontainsatleastthree1s}b.{wwstartsandendswiththesamesymbol}c.{wthelengthofwisodd}d.{wthelengthofwisoddanditsmiddlesymbolisa0}e.{ww=wR,thatis,wisapalindrome}f.Theemptyset.

Q50P

Page 159

We defined the CUT of language A to be CUT(A)={yxz|xyz∈A}. Show that the class of CFLs is not closed under CUT.

Q53P

Page 159

Show that the class of DCFLs is not closed under the following operations:

a. Union

b. Intersection

c. Concatenation

d. Star

e. Reversal

Q54P

Page 159

Let G be the following grammar:

S→T−|T→TaTb|TbTa|ε

  1. Show thatL(G)={w−||w c´Ç²Ô³Ù²¹¾±²Ô²õ e±ç³Ü²¹±ô n³Ü³¾²ú±ð°ù o´Ú a'²õ a²Ô»å b's} . Use a proof by induction on the length of W.
  2. Use the DK-test to show that G is a DCFG,
  3. Describe a DPDA that recognizesL(G)

Q5E

Page 155

Give informal descriptions and state diagrams of pushdown automata for the languages in Exercise 2.4

Q6E

Page 155

Give context-free grammars generating the following languages.

  1. The set of strings over the alphabet {a,b} with more a’s than b’s.
  2. The complement of the languagerole="math" localid="1660717618566" {anbnn≥0}
  3. role="math" localid="1660717878385" {w#xwRisasubstringofxforw.x∈0,1*}
  4. role="math" localid="1660718125664" {x1#2#...#xkk≥1,eachxi∈a,b*,andforsomeiandj,xi=xjR}

Q9E

Page 155

Give a context-free grammar that generates the language

A={aibjkki=jorj=kwherei,j,k≥0}

Is your grammar ambiguous? Why or Why not?

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