High School

Suggest regular languages [tex]L_1[/tex] and [tex]L_2[/tex] over \(\{0,1\}\) such that:

1. [tex]L_1 \not\subseteq L_2[/tex]
2. [tex]L_2 \not\subseteq L_1[/tex]
3. \((L_1 \cup L_2)^* = L_1^* \cup L_2^*\)

(b) Prove or disprove whether condition 3 above holds for any regular languages, [tex]L_1[/tex] and [tex]L_2[/tex].

Answer :

a). We have proved all the given conditions.

b). It is true that condition 3 holds for all regular languages L1 and L2.

(a) Regular languages L1 and L2 can be suggested as follows:

Let [tex]L_1={0^{(n+1)} | n\geq 0}[/tex]

and

[tex]L_2={1^{(n+1)} | n\geq 0}[/tex]

We have to prove three conditions:1. L1 ⊈ L2:

The given languages L1 and L2 both are regular but L1 does not contain any string that starts with 1.

Therefore, L1 and L2 are distinct.2. L2  L1:

The given languages L1 and L2 both are regular but L2 does not contain any string that starts with 0.

Therefore, L2 and L1 are distinct.3. (L1 ∪ L2)* = L1* ∪ L2*:

For proving this condition, we need to prove two things:

First, we need to prove that (L1 ∪ L2)* ⊆ L1* ∪ L2*.

It is clear that every string in L1* or L2* belongs to (L1 ∪ L2)*.

Thus, we have L1* ⊆ (L1 ∪ L2)* and L2* ⊆ (L1 ∪ L2)*.

Therefore, L1* ∪ L2* ⊆ (L1 ∪ L2)*.

Second, we need to prove that L1* ∪ L2* ⊆ (L1 ∪ L2)*.

Every string that belongs to L1* or L2* also belongs to (L1 ∪ L2)*.

Thus, we have L1* ∪ L2* ⊆ (L1 ∪ L2)*.

Therefore, (L1 ∪ L2)* = L1* ∪ L2*.

Therefore, we have proved all the given conditions.

(b)It is true that condition 3 holds for all regular languages L1 and L2.

This can be proved by using the fact that the union of regular languages is also a regular language and the Kleene star of a regular language is also a regular language.

To know more about string, visit:

https://brainly.com/question/30099412

#SPJ11