Closure properties between 2 languages of different types

101 Views Asked by At

Whenever said - The intersection between a Context Free Language and a Regular Language is always Context Free, what is the best logical way to confirm the statement?
I have this Chomsky hierarchy in mind that I refer whenever closure properties between Type-m and Type-n languages are asked but sometimes I come up with a wrong result.

How do you people logically solve it? What is the best simplest way?

1

There are 1 best solutions below

0
On

To prove closure there are several types of arguments. For example you can show that there is an algorithmic way to form a grammar of type-m for the intersection of a type-m with an type-n language (which works for the context free and regular case). Another way is to use the machine characterisation of a class of languages (i.e. construct a push down automaton that accepts the intersection in the context-free with regular case). To show the intersection is not always of a certain type you can use the different pumping lemmata (or Myhill-Moore theorem in the regular case) with a particular example.

You see this is a very general answer, however if you are looking for a specific case, tell us and I can try to answer more specifically to the setting in question.