Context-Free Language (CFL) is a language which is generated by a context-free grammar or Type 2 grammar(according to Chomsky classification) and gets accepted by a Pushdown Automata.

Some very much important properties of a context-free language is:

Regularity- context-free languages are Non-Regular PDA language.

**Closure properties :**

The context-free languages are closed under some specific operation, closed means after doing that operation on a context-free language the resultant language will also be a context-free language.Some such operation are:

- Union Operation
- Concatination
- Kleene closure
- Reversal operation
- Homomorphism
- Inverse Homomorphism
- Substitution
- init or prefix operation
- Quotient with regular language
- Cycle operation
- Union with regular language
- Intersection with regular language
- Difference with regular language

Context free language is not closed under some specific operation, not-closed means after doing that operation on a context-free language the resultant language not remains be a context-free language anymore.

Some such operation are:

- Intersection
- Complement
- Subset
- Superset
- Infinite Union
- Difference, Symmetric difference (xor, Nand, nor or any other operation which get reduced to intersection and complement

- Test for Membership: Decidable.
- Test for Emptiness: Decidable
- Test for finiteness: Decidable

Rest the decision properties are undecidable in context-free language.

**Deterministic property :**

The context-free language can be:

- DCFL-Deterministic (which can be recognized by deterministic pushdown automata) context-free language
- NDCFL-Non-deterministic (can’t be rcognized by DPDA but NPDA) context free language.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- Ambiguity in Context free Grammar and Context free Languages
- Ambiguity in Context free Grammar and Context free Languages
- Closure Properties of Context Free Languages
- Union and Intersection of Regular languages with CFL
- Difference between Thread Context Switch and Process Context Switch
- Classification of Context Free Grammars
- Converting Context Free Grammar to Chomsky Normal Form
- Converting Context Free Grammar to Greibach Normal Form
- Check if the language is Context Free or Not
- Regular Expression Vs Context Free Grammar
- CYK Algorithm for Context Free Grammar
- Simplifying Context Free Grammars
- Closure properties of Regular languages
- Context-sensitive Grammar (CSG) and Language (CSL)
- Measure the time spent in context switch?
- Various Implicants in K-Map
- Inclusion-Exclusion and its various Applications
- Applications of various Automata
- Various terms in File System
- Advantages and Disadvantages of various CPU scheduling algorithms

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.