Show that if K is regular and M any language, then L is regular

In summary, the conversation discusses how to show that if a language $K$ is regular and $M$ is any language, then the language $L$ defined as $L=\{k |km \in K \text{ for some } m \in M\}$ is also regular. The solution involves constructing a DFA that accepts $K$ and making certain states accepting based on the extension of the transition function to strings. The only difference between this DFA and the DFA for $K$ is the set of final states. The conversation ends with confirmation that the understanding is correct.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

Let $L=\{k |km \in K \text{ for some } m \in M\}$.

How can we show that if $K$ is regular and $M$ is any language, then $L$ is regular?? (Wondering)
 
Physics news on Phys.org
  • #2
This is a nice problem. Take a DFA $(Q,\Sigma,\delta,q_0,F)$ that accept $K$ and make $q\in Q$ accepting iff $\delta(q,m)\in F$ for some $m\in M$. Here $\delta(q,m)$ is the extension of the transition function to strings.
 
  • #3
Evgeny.Makarov said:
This is a nice problem. Take a DFA $(Q,\Sigma,\delta,q_0,F)$ that accept $K$ and make $q\in Q$ accepting iff $\delta(q,m)\in F$ for some $m\in M$. Here $\delta(q,m)$ is the extension of the transition function to strings.

So, is the transition function of $L$ the same as the transition function of $K$ ? If it stands that $\delta(q,m)\in F$ for some $m \in M$, then we make $q$ an accepting state. So the difference of the description of the two DFA's is the set of final states. Have I understood it correctly?
 
  • #4
Yes, you understood it correctly.
 
  • #5
Evgeny.Makarov said:
Yes, you understood it correctly.

Great! Thank you very much! (Smile)
 

FAQ: Show that if K is regular and M any language, then L is regular

What does it mean for a language to be "regular"?

A regular language is a type of formal language that can be recognized and generated by a deterministic finite automaton (DFA) or a non-deterministic finite automaton (NFA). This means that there exists a finite set of rules that can be used to recognize and generate all possible words in the language.

What is the significance of K being regular in this statement?

If K is regular, it means that it can be recognized and generated by a DFA or NFA. This is important because it allows us to use the properties and rules of regular languages to prove that L is also regular.

How does the regularity of K and M relate to the regularity of L?

If K and M are regular languages, it means that they can be recognized and generated by DFAs or NFAs. In this statement, we are using the properties and rules of regular languages to prove that L, which is a combination of K and M, is also regular.

Can you provide an example of how this statement can be used?

For example, if we know that the language K is regular because it can be recognized by a DFA, and the language M is also regular because it can be generated by a NFA, then we can use the closure properties of regular languages to show that the language L, which is a concatenation of K and M, is also regular.

Is this statement true for all languages?

Yes, this statement is true for all languages. Regular languages have well-defined properties and rules that can be used to prove the regularity of other languages. Therefore, as long as K is regular and M is any language, L will also be regular.

Similar threads

Replies
4
Views
2K
Replies
1
Views
2K
Replies
3
Views
2K
Replies
1
Views
1K
Replies
6
Views
2K
Replies
1
Views
1K
Replies
24
Views
4K
Replies
18
Views
3K
Replies
5
Views
2K
Back
Top