in Theory of Computation
2,146 views
1 vote
1 vote

State True/False:

class of context free languages are closed under union.

class of context free languages are closed under intersection.

class of context free languages are closed under complementation.

in Theory of Computation
2.1k views

1 Answer

1 vote
1 vote

Class of context free languages IS closed under union.- TRUE

Class of context free languages IS closed under intersection.- FALSE

Class of context free languages IS closed under complementation.- FALSE

Class of CFLs is not closed under intersection and complementation

  • intersection of 2 CFLs may or may not be a CFL - ($a^nb^nc^m \cap  a^mb^mc^n =a^nb^nc^n$ it is CSL but not NCFL )
  • Complement of CFL is always CSL but may not be CFL (Complement of a DCFL is always a DCFL, but complement of NCFL may or may not be an NCFL)
edited by

4 Comments

yes and intersection of two DCFL can be regular too rt?
0
0
@srestha I have edited your answer. When you say a language belongs to a set, it automatically belongs to any of its superset and hence all properties of the superset is applicable to it.
2
2
yes sir , ok thank u

u r so special , whenever u do anything, it looks very beautiful to us :)
1
1

Related questions