Open In App

Closure properties Table in TOC

Last Updated : 22 Sep, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The Below Table shows the Closure Properties of Formal Languages :

REG = Regular Language
DCFL = deterministic context-free languages, 
CFL = context-free languages,
CSL = context-sensitive languages,
RC = Recursive.
RE = Recursive Enumerable

Consider L and M are regular languages :

  1. The Kleene star –
     âˆ‘*, is a unary operator on a set of symbols or strings, ∑, that gives the infinite set of all possible strings of all possible lengths over ∑ including λ.
  2. Kleen Plus – 
    The set ∑+ is the infinite set of all possible strings of all possible lengths over ∑ excluding λ.
  3. Complement – 
    The complement of a language L (with respect to an alphabet E such that E* contains L) is E*–L. Since E* is surely regular, the complement of a regular language is always regular.
  4. Reverse Operator – 
    Given language L, LR is the set of strings whose reversal is in L.
  5. Complement –
    The complement of a language L (with respect to an alphabet E such that E* contains L) is E*–L. Since E* is surely regular, the complement of a regular language is always regular.
  6. Union –
    Let L and M be the languages of regular expressions R and S, respectively. Then R+S is a regular expression whose language is(L U M).
  7. Intersection – 
    Let L and M be the languages of regular expressions R and S, respectively, then it is a regular expression whose language is L intersection M.
  8. Set Difference operator – 
    If L and M are regular languages, then so is L – M = strings in L but not M.
  9. Homomorphism –
    A homomorphism on an alphabet is a function that gives a string for each symbol in that alphabet.
  10. Inverse Homomorphism – 
    Let h be a homomorphism and L a language whose alphabet is the output language of h. h-1 (L) = {w | h(w) is in L}.
  11. Substitution –
    substitution is a letter-to-language mapping, which is likewise extended to a string-to-language mapping. By identifying a singleton language {x} to the tx, morphisms are seen as special cases of substitutions.
  12. Left quotient – Left quotient , or quotient of a language L by a word w is The language Lw = {x ∈ Σ* | wx ∈ L}
    The right quotient of L1 with L2 is the set of all strings x where you can pick some  y from L2 and append it to x to get something from L1. That is, x is in the quotient if there is y in L2 for which xy is in L1.)
Operations REG DCFL CFL CSL RC RE
Union Y N Y Y Y Y
Intersection Y N N Y Y Y
Set Difference Y N N Y Y N
Complement Y Y N Y Y N
Intersection with a Regular Language Y Y Y Y Y Y
Union with a Regular Language Y Y Y Y Y Y
Concatenation Y N Y Y Y Y
Kleene Star Y N Y Y Y Y
Kleene Plus Y N Y Y Y Y
Reversal Y N Y Y Y Y
Epsilon-free Homomorphism Y N Y Y Y Y
Homomorphism Y N Y N N Y
Inverse Homomorphism Y Y Y Y Y Y
Epsilon-free Substitution Y N Y Y Y Y
Substitution Y N Y N N Y
Subset N N N N N N
Left Difference with a Regular Language (L-Regular) Y Y Y Y Y Y
Right Difference with a Regular Language (Regular-R) Y Y N Y Y N
Left Quotient with a Regular Language Y Y Y N Y Y
Right Quotient with a Regular Language Y Y Y N Y Y

NOTE : If we do union, intersection or set difference of any language with regular language, language doesn’t change .
Example   

  • CFL ∩ Regular is CFL. 
  • CFL ∪ Regular is CFL. 

It’s always a good idea to convert the secondary operations into primary operations.
Let L1 and L2 be two languages.
 

NOTE :  For ⊆ , ⊇ , infinite union, infinite intersection, infinite set difference, No language is closed.  
              Under these operations, language may or may not be regular.

Let us consider some cases with concatenation operation :

  • Regular . Regular                   ⇒                       Regular
  • Regular . Non-Regular           ⇒                       May or may not be regular
  • Non-Regular . Non-Regular  â‡’                      May or may not be regular
  • If L1 . L2 is regular                 ⇒                       L1 may or may not be regular
  • If L1 . L2 is regular                 ⇒                       L2 may or may not be regular
  • If L1 . L2 is Non-Regular        â‡’                        Atleast one of them should be Non-regular. 

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads