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
SUMMARY

The discussion focuses on demonstrating that the class of regular languages is closed under a specific operation involving two languages, $L_1$ and $L_2$, over the alphabet $\Sigma=\{0, 1\}$. The operation is defined as the set of strings $x$ in $L_1$ such that there exists a string $y$ in $L_2$ with equal numbers of 1s in both strings. Participants suggest constructing a Non-deterministic Finite Automaton (NFA) to recognize this operation, utilizing the transition function defined by the states of the DFAs for $L_1$ and $L_2$. The discussion also highlights the use of homomorphisms and the closure properties of regular languages under homomorphic images and inverse images.

PREREQUISITES
  • Understanding of Non-deterministic Finite Automata (NFA)
  • Familiarity with Deterministic Finite Automata (DFA)
  • Knowledge of homomorphisms in formal languages
  • Concept of closure properties of regular languages
NEXT STEPS
  • Study the construction of NFAs for language operations
  • Learn about homomorphic images and inverse images in formal languages
  • Explore the intersection of regular languages and its proofs
  • Investigate the transition functions in NFAs and DFAs
USEFUL FOR

The discussion is beneficial for computer scientists, formal language theorists, and students studying automata theory, particularly those interested in the properties and operations of regular languages.

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