# Various Properties of context free languages (CFL)

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.

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.

## Recommended Posts:

- Closure Properties of Context Free Languages
- Ambiguity in Context free Grammar and Context free Languages
- Ambiguity in Context free Grammar and Context free Languages
- Check if the language is Context Free or Not
- Simplifying Context Free Grammars
- CYK Algorithm for Context Free Grammar
- Classification of Context Free Grammars
- Regular Expression Vs Context Free Grammar
- Converting Context Free Grammar to Chomsky Normal Form
- Converting Context Free Grammar to Greibach Normal Form
- Closure properties of Regular languages
- Difference between Thread Context Switch and Process Context Switch
- Context-sensitive Grammar (CSG) and Language (CSL)
- Measure the time spent in context switch?
- Principle of programming languages | Set 1
- Union and Intersection of Regular languages with CFL
- Construct Pushdown Automata for given languages
- ACID Properties in DBMS
- Properties of Boolean Algebra
- Mathematics | Power Set and its Properties

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.