Equality of formal languages

257 Views Asked by At

Given two languages $L$, $M$, I am to prove that $(L^*M^*)^* = (L \cup M)^*$.

Formal languages and automata theory is relatively new to me, but this one looks like something that requires simple set theory. I am having a little problem with completing my argument so as to make it entirely rigorous though.

So I'd like to show inclusion in both directions, i.e. any element that belongs to the left-hand side of the equation belongs to the right-hand side - and the other way round.

$$ \begin{align*} \subseteq: &x \in (L^*M^*)^* \text{ iff} \\ &x \in \bigcup \lbrace (L^*M^*)^n : n \in \mathbb{N} \rbrace \text{ iff}\\ &\exists_{n \in \mathbb{N}} x \in (L^*M^*)^n \text{ iff}\\ &\exists_{n \in \mathbb{N}} x \in (\lbrace w\cdot v : w \in \bigcup \lbrace L^i : i \in \mathbb{N} \rbrace \wedge v \in \bigcup \lbrace M^j : j \in \mathbb{N} \rbrace \rbrace)^n \end{align*} $$

Then the other side: $$ \begin{align*} \supseteq: &x \in (L \cup M)^* \text{ iff} \\ &x \in \bigcup \lbrace (L \cup M)^n : n \in \mathbb{N} \rbrace \text{ iff} \\ &\exists_{n \in \mathbb{N}} x \in (L \cup M)^n \end{align*} $$

I don't know how to take it from here though (or perhaps there is a better way to justify the equality)?

1

There are 1 best solutions below

4
On BEST ANSWER

If I understand correctly, it might be easier to approach this as containment rather than showing and iff sequence for elements.

The two results used are that $(A^*)^* = A^*$, and also, if $A \subseteq B$, then $A^* \subseteq B^*$.

We have $L^l M^m \subseteq (L \cup M)^{l+m} \subseteq (L \cup M)^*$ for all $l,m$, hence $L^* M^* \subseteq (L \cup M)^*$, and hence $(L^* M^*)^* \subseteq ((L \cup M)^*)^* = (L \cup M)^*$.

In the other direction, $L \cup M \subseteq L^* M^*$, hence $(L \cup M)^* \subseteq (L^* M^*)^*$.