How to prove that the class of regular languages is closed under a homomorphism.

2k Views Asked by At

I have created two homomorphisms

Homomorphism with the same language:

In this task, I consider the homomorphism $f: \Sigma \rightarrow \Sigma^*$ for the alphabet $\Sigma = \{0, 1\}$. In that case:

$f(0) = 1$

$f(1) = 0$

Given the string $s = 01001$, the corresponding $f(s)$ becomes $f(s) = 10110$.

Homomorphism without the same language:

$f: \sum \rightarrow \Gamma^*$ that uses different alphabets: $\Sigma = \{0, 1\}$ and $\Gamma = \{a, b\}$. In that case:

$f(0) = a$

$f(1) = b$

Given the string $s = 01001$, the corresponding $f(s)$ becomes $f(s) = abaab$.

Question: How do I prove that the class of regular languages is closed under a homomorphism based on my constructions above?

I got the following hint, but still can't figure it out: You can think of a DFA $M$ that recognizes $A$ and a homomorphism $f$, construct a second finite automata, $M_0$ that recognizes $B$, where $B = f(A)$. Then, is the new finite automata, $M_0$ , a DFA? if yes, you have proven that $B$ is accepted by $M_0$. Recall, that an operation is regular if it is defined between one or more regular languages, and the result of the operation is also a regular language.

1

There are 1 best solutions below

2
On BEST ANSWER

The standard proof to show that the class of regular languages is closed under homomorphisms is to use Kleene's theorem on regular languages. Indeed, it is easy to construct a regular expression for $f(R)$, given a regular expression for $R$.

If you insist to use automata, you can start with a deterministic automaton $\cal A$ for $R$ and replace every transition $p \xrightarrow{a} q$ by a transition $p \xrightarrow{f(a)} q$. This gives you an extended automaton (the transitions are now labelled by words) which can be converted to a NFA by adding new states and by "spelling" $f(a)$. Thus, for instance if $f(a) = 010$, you would obtain a transition $p \xrightarrow{0} p_1 \xrightarrow{1} p_2 \xrightarrow{0} q$, where $p_0$ and $p_1$ are new states.