0
$\begingroup$

We know that if we have two languages produced by one regular grammar, then any language produced from the union, intersection, and so on would be regular.

What if we have a regular grammar that produces language A and a different regular grammar that produces language B. Then could the closure properties still be used in order to produce another regular language C?

For example, is $A\cap B$ a regular language (intersection)? Is $A\|B$ a regular language (concatenation)?

$\endgroup$
  • $\begingroup$ Union, intersection are of two different languages by default. Take a moment to think. If the same language is used, what can you get? You will not describe any property as closed under identity operation, since all of them are trivially. Does this answer your question? $\endgroup$ – John L. Nov 15 '18 at 22:04
  • $\begingroup$ @Apass.Jack Not exactly. What i'm talking about is that the union indeed is a different language, but if lets say S1={a,b} ,S2={c,d} , and A,B are reagular languages produced from S1,S2 accordingly, would A||B still produce a regular language? $\endgroup$ – Antonis Paragioudakis Nov 16 '18 at 11:18
  • $\begingroup$ Yes, A||B is a regular language as long as both A and B are regular. You can check various closure properties. $\endgroup$ – John L. Nov 16 '18 at 11:25
1
$\begingroup$

A grammar produces exactly one language; it makes no sense to speak of two languages produced by the same grammar.

The closure properties of regular languages apply to any regular languages.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.