Show Closure of Regular Languages: $L_1$ and $L_2$

In summary, the conversation is discussing how to show that the class of regular languages is closed under an operation involving two languages, using a NFA and a homomorphic function. The transition function and construction of the automaton for accepting the intersection of two languages is also mentioned.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

How can we show that the class of regular languages is closed under the following operation??

Let $L_1$ and $L_2$ be laguages over $\Sigma=\{0, 1\}$.

The operation is: $$\{x \in L_1 | \text{ for some } y \in L_2, \text{ strings } x \text{ and } y \text{ contains equal numbers of } 1s \}$$

(Wondering)

Is the only way to show this to create a NFA of the new language?? (Wondering)
 
Physics news on Phys.org
  • #2
Let $M_{L_1}=(Q_{L_1},\Sigma ,\delta_{L_1},q_{L_1},F_{L_1})$ the DFA that recognizes $L_1$ and $M_{L_2}=(Q_{L_2},\Sigma ,\delta_{L_2},q_{L_2},F_{L_2})$ the DFA that recognizes $.L_2$. Let $M=(Q,\Sigma ,\delta,q,F)$ the NFA that recognizes the operation. $Q=Q_{L_1}\times Q_{L_2}, q=(q_{L_1},q_{L_2})$. Is this correct?? Which is the Transition function??
 
  • #3
When we "see" the number $1$ at $x \in L_1$, then we go to the next symbol of $y \in L_2$ to check if it also $1$.

Is this correct? What would be the general formula for the transition function?
 
  • #4
Let $f(x)$ be the function that erases all 0s from the word $x$. The result of your operation on $L_1$ and $L_2$ can be expressed as $L_1\cap\{x\mid f(x)\in f[L_2]\}$. But $f(x)\in f[L_2]\iff x\in f^{-1}[f[L_2]]$. Now, $f$ is a homomorphism, and regular languages are closed under homomorphic images and inverse images (Google it).
 
  • #5
Evgeny.Makarov said:
Let $f(x)$ be the function that erases all 0s from the word $x$. The result of your operation on $L_1$ and $L_2$ can be expressed as $L_1\cap\{x\mid f(x)\in f[L_2]\}$. But $f(x)\in f[L_2]\iff x\in f^{-1}[f[L_2]]$. Now, $f$ is a homomorphism, and regular languages are closed under homomorphic images and inverse images (Google it).

Is this, using an homomorphism, the only way to show it? (Wondering)
 
  • #6
I found in my book the following description of $M$:
  • $Q=Q_{L_1} \times Q_{L_2}$
  • for each $(q, r) \in Q$ and $\Sigma$, $\delta$ is defined as followed $$\delta \left (\left (q, r\right ), a\right )=\left\{\begin{matrix}
    \{(\delta_{L_1}(q,0),r)\} & \text{ if } a=0\\
    \{(\delta_{L_1}(q,1),\delta_{L_2}(r,1))\} & \text{ if } a=1\\
    \{(q,\delta_{L_2}(r,0))\} & \text{ if } a=\varepsilon
    \end{matrix}\right.$$
  • $q_0=(q_{L_1}, q_{L_2})$, and
  • $F=F_{L_1} \times F_{L_2}$
Could you explain to me the transition function $\delta$ ? (Wondering)
 
Last edited by a moderator:
  • #7
mathmari said:
Could you explain to me the transition function $\delta$ ?
Are you familiar with the construction of the automaton that accepts the intersection of two languages? It's from the proof that regular languages are closed under intersection. In fact, there are two proofs: one uses closure under union and De Morgan's law, and the other provides a direct construction. I am talking about the latter.
 

FAQ: Show Closure of Regular Languages: $L_1$ and $L_2$

What is the definition of "closure" in the context of regular languages?

In the context of regular languages, closure refers to the ability of a language to generate all possible combinations of strings that can be formed by combining strings from the original language using a particular operation.

What is the difference between the closure of a regular language and the closure of a non-regular language?

The closure of a regular language can be determined algorithmically, while the closure of a non-regular language cannot be determined algorithmically. This is because regular languages have well-defined rules and patterns, while non-regular languages do not.

What are the three basic operations that can be used to determine the closure of a regular language?

The three basic operations used to determine the closure of a regular language are concatenation, union, and Kleene star. These operations allow for the generation of all possible combinations of strings from the original language.

Can the closure of a regular language be a non-regular language?

Yes, the closure of a regular language can be a non-regular language. This can happen if the original language is not closed under the three basic operations, such as if it contains an infinite number of strings or if it cannot be represented by a finite automaton.

Why is the closure of regular languages important in theoretical computer science?

The closure of regular languages is important in theoretical computer science because it allows for the determination of whether a language is regular or not. It also helps in understanding the limitations and capabilities of different types of languages and automata, and forms the foundation for more complex formal language theories.

Similar threads

Replies
1
Views
1K
Replies
3
Views
2K
Replies
4
Views
2K
Replies
2
Views
2K
Replies
2
Views
2K
Replies
1
Views
1K
Replies
12
Views
3K
Replies
1
Views
1K
Back
Top