User menu

User login

You are here

Primary tabs

homomorphism of languages

Let Σ1subscriptnormal-Σ1\Sigma_{1} and Σ2subscriptnormal-Σ2\Sigma_{2} be two alphabets. A functionh:Σ1*→Σ2*normal-:hnormal-→superscriptsubscriptnormal-Σ1superscriptsubscriptnormal-Σ2h:\Sigma_{1}^{*}\to\Sigma_{2}^{*} is called a homomorphism if it is a semigroup homomorphism from semigroupsΣ1*superscriptsubscriptnormal-Σ1\Sigma_{1}^{*} to Σ2*superscriptsubscriptnormal-Σ2\Sigma_{2}^{*}. This means that

Since the alphabet Σ1subscriptnormal-Σ1\Sigma_{1}freely generatesΣ1*superscriptsubscriptnormal-Σ1\Sigma_{1}^{*}, hhh is uniquely determined by its restriction to Σ1subscriptnormal-Σ1\Sigma_{1}. Conversely, any function from Σ1subscriptnormal-Σ1\Sigma_{1} extends to a unique homomorphism from Σ1*superscriptsubscriptnormal-Σ1\Sigma_{1}^{*} to Σ2*superscriptsubscriptnormal-Σ2\Sigma_{2}^{*}. In other words, it is enough to know what h⁢(a)hah(a) is for each symbol aaa in Σ1subscriptnormal-Σ1\Sigma_{1}. Since every word www over Σnormal-Σ\Sigma is just a concatenation of symbols in Σnormal-Σ\Sigma, h⁢(w)hwh(w) can be computed using the second condition above. The first condition takes care of the case when www is the empty word.

Suppose h:Σ1*→Σ2*normal-:hnormal-→superscriptsubscriptnormal-Σ1superscriptsubscriptnormal-Σ2h:\Sigma_{1}^{*}\to\Sigma_{2}^{*} is a homomorphism, L1⊆Σ1*subscriptL1superscriptsubscriptnormal-Σ1L_{1}\subseteq\Sigma_{1}^{*} and L2⊆Σ2*subscriptL2superscriptsubscriptnormal-Σ2L_{2}\subseteq\Sigma_{2}^{*}. Define

If L1,L2subscriptL1subscriptL2L_{1},L_{2} belong to a certain family of languages, one is often interested to know if h⁢(L1)hsubscriptL1h(L_{1}) or h-1⁢(L2)superscripth1subscriptL2h^{{-1}}(L_{2}) belongs to that same family. We have the following result:

1.

If L1subscriptL1L_{1} and L2subscriptL2L_{2} are regular, so are h⁢(L1)hsubscriptL1h(L_{1}) and h-1⁢(L2)superscripth1subscriptL2h^{{-1}}(L_{2}).

2.

If L1subscriptL1L_{1} and L2subscriptL2L_{2} are context-free, so are h⁢(L1)hsubscriptL1h(L_{1}) and h-1⁢(L2)superscripth1subscriptL2h^{{-1}}(L_{2}).

3.

If L1subscriptL1L_{1} and L2subscriptL2L_{2} are type-0, so are h⁢(L1)hsubscriptL1h(L_{1}) and h-1⁢(L2)superscripth1subscriptL2h^{{-1}}(L_{2}).

However, the family ℱℱ\mathscr{F} of context-sensitive languages is not closed under homomorphisms, norinverse homomorphisms. Nevertheless, it can be shown that ℱℱ\mathscr{F} is closed under a restricted class of homomorphisms, namely, λλ\lambda-free homomorphisms. A homomorphism is said to be λλ\lambda-free or non-erasing if h⁢(a)≠λhaλh(a)\neq\lambda for any a∈Σ1asubscriptnormal-Σ1a\in\Sigma_{1}.

Remarks.

Every homomorphism induces a substitution in a trivial way: if h:Σ1*→Σ2*normal-:hnormal-→superscriptsubscriptnormal-Σ1superscriptsubscriptnormal-Σ2h:\Sigma_{1}^{*}\to\Sigma_{2}^{*} is a homomorphism, then hs:Σ1→P⁢(Σ2*)normal-:subscripthsnormal-→subscriptnormal-Σ1Psuperscriptsubscriptnormal-Σ2h_{s}:\Sigma_{1}\to P(\Sigma_{2}^{*}) defined by hs⁢(a)={h⁢(a)}subscripthsahah_{s}(a)=\{h(a)\} is a substitution.

One can likewise introduce the notion of antihomomorphism of languages. A mapg:Σ1*→Σ2*normal-:gnormal-→superscriptsubscriptnormal-Σ1superscriptsubscriptnormal-Σ2g:\Sigma_{1}^{*}\to\Sigma_{2}^{*} is an antihomomorphism if g⁢(α⁢β)=g⁢(β)⁢g⁢(α)gαβgβgαg(\alpha\beta)=g(\beta)g(\alpha), for any words α,βαβ\alpha,\beta over Σ1subscriptnormal-Σ1\Sigma_{1}. It is easy to see that ggg is an antihomomorphism iffg∘revgrevg\circ\operatorname{rev} is a homomorphism, where revrev\operatorname{rev} is the reversaloperator. Closure under antihomomorphisms for a family of languages follows the closure under homomorphisms, provided that the family is closed under reversal.

References

1 S. Ginsburg, The Mathematical Theory of Context-Free Languages, McGraw-Hill, New York (1966).