/*! 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}

91影视

A homomorphism is a function f:-*from one alphabet to strings over another alphabet. We can extend f to operate on strings by defining:f(w)=f(w1)f(w2)f(wn),wherew=w1w2wnandeachwi.

We further extend fto operate on languages by defining f(A)={f(w)|wA},for any language A.

a. Show, by giving a formal construction, that the class of regular languages is closed under homomorphism. In other words, given a DFA Mthat recognizes Band a homomorphism f, construct a finite automaton role="math" localid="1660800566802" M0that recognizes f(B).Consider the machine role="math" localid="1660800575641" M0that you constructed. Is it a DFA in every case?

b. Show, by giving an example, that the class of non-regular languages is not closed under homomorphism.

Short Answer

Expert verified

a)The class of regular languages is closed under homomorphism.

b) The class of non-regular languages is not closed under homomorphism.

Step by step solution

01

Homomorphism.

A homomorphism is function h:**defined as follows:

h()=and for a,h(a)is any string in *.

鈥 For a=a1a2...an*(n2),h(a)=h(a1)h(a2)...h(an).

鈥 A homomorphism h maps a stringa * to a string in* by mapping each character of a to a string h(a)*.

鈥 A homomorphism is a function from strings to strings that 鈥渞espects鈥 concatenation: for anyx,y*,h(xy)=h(x)h(y). (Any such function is a homomorphism.)

02

The class of regular languages is closed under homomorphism

a).

Regular languages are closed under homomorphism, i.e., if Lis a regular language and his a homomorphism,

thenh(L)is also regular.

Proof:

Use the representation of regular languages in terms of regular expressions to argue this.

鈥 Define homomorphism as an operation on regular expressions

鈥 Show that L(h(R))=h(L(R))

鈥 Let (R)be such that L=L(R).LetR0=h(R).Thenh(L)=L(R).

h()= andfora,h(a) is any string in* .

鈥 For a=a1a2...an*(n2),h(a)=h(a1)h(a2)...h(an).

鈥 A homomorphism h maps a string a* to a string in* by mapping each character of a to a string h(a)*.

鈥 A homomorphism is a function from strings to strings that 鈥渞espects鈥 concatenation: for any x,y*,h(xy)=h(x)h(y).(Any such function is a homomorphism.)

Hence, the class of regular languages is closed under homomorphism is proved.

03

The class of non-regular languages is not closed under homomorphism.

b).

鈥 Show that L(h(R))=h(L(R))

鈥 Let Rbe such that L=L(R).LetR0=h(R).Thenh(L)=L(R).

h()=and for a,h(a) is any string in *.

鈥 For a=a1a2...an*(n2),h(a)=h(a1)h(a2)...h(an).

鈥 A homomorphism h maps a string a* to a string in* by mapping each character of a to a string h(a)*.

鈥 A homomorphism is a function from strings to strings that 鈥渞espects鈥 concatenation: for anyx,y*,h(xy)=h(x)h(y). (Any such function is a homomorphism.)

These properties does not follows by non-regular language so, it is not closed under homomorphism.

Hence, the class of non-regular languages is not closed under homomorphism.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91影视!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Let M1andM2 be DFAs that have k1 and k2states, respectively, and then let U=L(M1)L(M2) .

  1. Show that if U, then U contains some string s, where |s|<max(k1,k2) .
  2. Show that if U*, then Uexcludes some string s , where |s|<k1k2 .

For any string w=w1,w2,,wn, the reverse of w, written wR , is the string w in reverse order,wnw2w1. For any language A,letAR=wR|wA.Show that if A is regular, so is AR.

Question: Let ={0,1}and let

D={w|wcontainsanequalnumberofoccurrencesofthesubstrings01and10}.

Thus101D because 101 contains a single 01 and a single 10, but 1010Dbecause 1010 contains two 10 s and one .01 Show that D is a regular language.

We define the avoids operation for languages A and B to be

AavoidsB={w|wAandwdoesntcontainanystringinBasasubstring}.

Prove that the class of regular languages is closed under the avoids operation.

Let N be an NFA with k states that recognizes some language A.

a. Show that if Ais nonempty, Acontains some string of length at most k.

b. Show, by giving an example, that part (a) is not necessarily true if you replace both A鈥檚 byA .

c. Show that If Ais nonempty, Acontains some string of length at most 2k.

d. Show that the bound given in part (c) is nearly tight; that is, for each k, demonstrate an NFA recognizing a languagerole="math" localid="1660752484682" Ak' where role="math" localid="1660752479553" Ak'is nonempty and where Ak'鈥檚 shortest member strings are of length exponential in k. Come as close to the bound in (c) as you can.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.