Homomorphism

Homomorphism is a closure property of regular languages that allows the mapping of input and output elements of a language to another language without changing its properties.

We can say, if LL is a regular language, then its homomorphism HH is:

Note: The homomorphism of a regular language is also regular

Example

Let's discuss an example below:

Suppose there is a language LL that has inputs in the set Σ {a,b}\Sigma \ \{ a,b \}. We'll map the elements of this language with Γ{0,1}\Gamma \{ 0,1 \}.

First, the homomorphic images of each input symbol/alphabet are determined. In this case, we may take:

Take L={aa,bab}L=\{ aa,bab\} then:

The language above is the homomorphism of the language LL.

Closure under homomorphism

Now we'll see the proof of how homomorphism is closed under regular languages. The algorithm is:

  • Let EE be a regular expression of a certain language.

  • Map each symbol/alphabet with its homomorphic image.

  • The resulting RE will be H(L)H(L) which must be regular.

Suppose:

Let a regular expression of a regular language LL be 001+0001+0^* .

Then H(L)H(L) is the language of acacbc+acacacbc + ac^*.

By equating, we see that H(L)H(L) is also a regular language.

Free Resources

Copyright ©2026 Educative, Inc. All rights reserved