How can we modify the proof if the alphabet in $M_1$ and the alphabet in $M_2$ are not the same? (Regular Language, Sipser)

79 Views Asked by At

enter image description here I am reading "Introduction to the Theory of Computation 3rd Edition" by Michael Sipser.

How can we modify the proof if the alphabet in $M_1$ and the alphabet in $M_2$ are not the same?

We cannot calculate $\delta((r_1, r_2), a) := (\delta_1(r_1, a), \delta_2(r_2, a))$ if $a \in \Sigma_1 - \Sigma_2$ for example.

1

There are 1 best solutions below

1
On BEST ANSWER

The proof given really gives the proof for the following theorem:

Theorem 1: If $A_1$ and $A_2$ are regular languages over an alphabet $\Sigma$, then $A_1\cup A_2$ is a regular language over an alphabet $\Sigma$.

The following proposition generalizes the above theorem for languages $A_1$ and $A_2$ over different alphabets:

Proposition: If $A_1$ is a regular language over an alphabet $\Sigma_1$ and $A_2$ is a regular language over an alphabet $\Sigma_2$, then $A_1\cup A_2$ is a regular language over alphabet $\Sigma_1 \cup\Sigma_2$.

Proof:

Lemma: For alphabets $\Sigma_1$ and $\Sigma_2$, if $A$ is a regular language over $\Sigma_1$, then $A$ is a regular language over $\Sigma_1\cup\Sigma_2$.

Proof: Let $M_1$ recognize $A$ where $M_1=(Q,\Sigma_1,\delta_1,q_0,F)$. We will construct another DFA $M_2$ that will recognize $A$ over the alphabet $\Sigma_1\cup\Sigma_2$. Let $M_2=(Q\cup\{q'\}, \Sigma_1\cup\Sigma_2,\delta_2,q_0,F)$ where

  • $\delta_2(q,\sigma)=\delta_1(q,\sigma)$ for all $q\in Q$ and $\sigma\in\Sigma_1$.
  • $\delta_2(q,\sigma)=q'$ for all $q\in Q\cup\{q'\}$ and $\sigma\in\Sigma_2-\Sigma_1$
  • $\delta_2(q',\sigma)=q'$ for all $\sigma\in\Sigma_1\cup\Sigma_2$

$M_2$ recognizes $A$ so $A$ is a regular language over $\Sigma_1\cup\Sigma_2$.

By our lemma, languages $A_1$ and $A_2$ are regular languages over $\Sigma_1\cup\Sigma_2$. By Theorem $1$, $A_1\cup A_2$ is a regular language over alphabet $\Sigma_1 \cup\Sigma_2$. This completes the proof of the proposition.