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

  • Context: MHB 
  • Thread starter Thread starter mathmari
  • Start date Start date
  • Tags Tags
    Language Regular
Click For Summary

Discussion Overview

The discussion revolves around demonstrating the closure of regular languages under a specific operation involving two languages, $L_1$ and $L_2$, defined over the alphabet $\Sigma=\{0, 1\}$. The operation considers strings from $L_1$ that have an equal number of 1s as some string from $L_2$. Participants explore various methods to show this closure, including the construction of an NFA and the use of homomorphisms.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant questions whether the only way to show the closure is to create an NFA for the new language.
  • Another participant proposes a construction of an NFA using the states of the DFAs for $L_1$ and $L_2$, asking for clarification on the transition function.
  • A participant describes a method involving a function that erases all 0s from a word, suggesting that the operation can be expressed in terms of intersections and homomorphic images.
  • Another participant reiterates the homomorphism approach and inquires if it is the only method to demonstrate the closure.
  • One participant shares a specific definition of the transition function for the NFA and requests an explanation of its components.
  • A later reply references the construction of an automaton that accepts the intersection of two languages, mentioning two proofs for the closure of regular languages under intersection.

Areas of Agreement / Disagreement

Participants express differing views on the methods to demonstrate the closure of regular languages, with no consensus reached on a single approach. Some focus on automata construction, while others emphasize homomorphic properties.

Contextual Notes

Participants have not fully resolved the specifics of the transition function or the implications of the proposed methods, leaving some assumptions and mathematical steps unaddressed.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

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
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??
 
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?
 
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).
 
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)
 
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:
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K