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

  • $\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, 2018 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$ Nov 16, 2018 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, 2018 at 11:25

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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