Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

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=w1w2···wnandeachwiΣ.

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 “respects” 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 “respects” 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 “respects” 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 Vaia!

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

If A is any language, let A13-13be the set of all strings in A with their middle thirds removed so that

A13-13={xz|forsomey,|x|=|y|=|z|andxyzA}.

Show that if A is regular, then A13-13is not necessarily regular

Question:Read the informal definition of the finite state transducer given in Exercise 1.24. Prove that no FST can output WR for every input if the input and output alphabets are {0,1}

Use the pumping lemma to show that the following languages arenot regulara.   A1={0η1η2η|n0}b.   A2={ωωω|ω{a,b}*}c.   A3={a2η|n0}(Here,a2ηmeansastringof2ηa's.)a.   A1={0η1η2η|n0}b.   A2={ωωω|ω{a,b}*}c.   A3={a2η|n0}(Here,a2ηmeansastringof2ηa's.)

Let D={w|wcontains an even number of a’s and an odd number of b’s and does not contain the substring ab}. Give a DFA with five states that recognizes role="math" localid="1663218927815" Dand a regular expression that generatesrole="math" localid="1663218933181" D.(Suggestion: DescribeD more simply.)

Give regular expressions generating the languages of Exercise 1.6.

a. {begins with a 1 and ends with a 0}

b. { w|wcontains at least three 1s}

c. { w|wcontains the substring 0101 (i.e., w = x0101y for some x and y)}

d. { w|whas length at least 3 and its third symbol is a 0}

e. { w|wstarts with 0 and has odd length, or starts with 1 and has even length}

f. { w|wdoesn’t contain the substring 110}

g. { w|the length of wis at most 5}

h. { w|wis any string except 11 and 111}

i. { w|every odd position of w is a 1 }

j. { contains at least two 0s and at most one 1}

k. {ε,0}

l. { w|wcontains an even number of 0 s, or contains exactly two 1s}

m. The empty set

n. All strings except the empty string

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.

Sign-up for free