Open In App

Closure properties of Regular languages

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

Closure properties on regular languages are defined as certain operations on regular language that are guaranteed to produce regular language. Closure refers to some operation on a language, resulting in a new language that is of the same “type” as originally operated on i.e., regular. Regular languages are closed under the following operations:

Consider that L and M are regular languages

  1. Kleen Closure: RS is a regular expression whose language is L, M. R* is a regular expression whose language is L*.
  2. Positive closure: RS is a regular expression whose language is L, M. 
    *** QuickLaTeX cannot compile formula:
    R^+  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    is a regular expression whose language is 
    *** QuickLaTeX cannot compile formula:
    L^+  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    .
  3. Complement: The complement of a language L (with respect to an alphabet 
    *** QuickLaTeX cannot compile formula:
    E  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    such that 
    *** QuickLaTeX cannot compile formula:
    E^*  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    contains L) is 
    *** QuickLaTeX cannot compile formula:
    E^*  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10000 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    –L. Since 
    *** QuickLaTeX cannot compile formula:
    E^*  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10000 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    is surely regular, the complement of a regular language is always regular.
  4. Reverse Operator: Given language L, 
    *** QuickLaTeX cannot compile formula:
    L^R  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    is the set of strings whose reversal is in L. Example: L = {0, 01, 100}; 
    *** QuickLaTeX cannot compile formula:
    L^R  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    ={0, 10, 001}. Proof: Let E be a regular expression for L. We show how to reverse E, to provide a regular expression 
    *** QuickLaTeX cannot compile formula:
    E^R  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    for 
    *** QuickLaTeX cannot compile formula:
    L^R  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    .
  5. 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).
  6. Intersection: Let L and M be the languages of regular expressions R and S, respectively then it a regular expression whose language is L intersection M. proof: Let A and B be DFA’s whose languages are L and M, respectively. Construct C, the product automaton of A and B make the final states of C be the pairs consisting of final states of both A and B.
  7. Set Difference operator: If L and M are regular languages, then so is L – M = strings in L but not M. Proof: Let A and B be DFA’s whose languages are L and M, respectively. Construct C, the product automaton of A and B make the final states of C be the pairs, where A-state is final but B-state is not.
  8. Homomorphism: A homomorphism on an alphabet is a function that gives a string for each symbol in that alphabet. Example: h(0) = ab; h(1) = 
    *** QuickLaTeX cannot compile formula:
    E  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    . Extend to strings by h(a1…an) =h(a1)…h(an). Example: h(01010) = ababab. If L is a regular language, and h is a homomorphism on its alphabet, then h(L)= {h(w) | w is in L} is also a regular language. Proof: Let E be a regular expression for L. Apply h to each symbol in E. Language of resulting R, E is h(L).
  9. Inverse Homomorphism : Let h be a homomorphism and L a language whose alphabet is the output language of h. 
    *** QuickLaTeX cannot compile formula:
    h^-1  
    
    
    
    *** Error message:
    Cannot connect to QuickLaTeX server: cURL error 28: Connection timed out after 10001 milliseconds
    Please make sure your server/PHP settings allow HTTP requests to external resources ("allow_url_fopen", etc.)
    These links might help in finding solution:
    http://wordpress.org/extend/plugins/core-control/
    http://wordpress.org/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3?replies=37
    (L) = {w | h(w) is in L}.

Note: There are few more properties like symmetric difference operator, prefix operator, substitution which are closed under closure properties of regular language. Decision Properties: Approximately all the properties are decidable in case of finite automaton.

(i) Emptiness 
(ii) Non-emptiness
(iii) Finiteness
(iv) Infiniteness
(v) Membership
(vi) Equality

These are explained as following below. (i) Emptiness and Non-emptiness:

  • Step-1: select the state that cannot be reached from the initial states & delete them (remove unreachable states).
  • Step 2: if the resulting machine contains at least one final states, so then the finite automata accepts the non-empty language.
  • Step 3: if the resulting machine is free from final state, then finite automata accepts empty language.
    • Step-1: select the state that cannot be reached from the initial state & delete them (remove unreachable states).
    • Step-2: select the state from which we cannot reach the final state & delete them (remove dead states).
    • Step-3: if the resulting machine contains loops or cycles then the finite automata accepts infinite language.
    • Step-4: if the resulting machine do not contain loops or cycles then the finite automata accepts finite language.

Frequently Asked Question

Q1. Are regular languages closed under difference?

Answer:

No, regular languages are not closed under difference. If L1,L2 and L1-L2 may not necessarily be a regular language.

Q2. How can closure properties be proven for regular languages?

Answer:

Closure properties for regular languages are often proven using constructions and properties of finite automata, regular expressions, or other equivalent representations. Mathematical proofs and induction are commonly employed in these demonstrations.

Q3. Can closure properties be extended to non-regular languages?

Answer:

No, closure properties like union, concatenation, and Kleene star are specific to regular languages. These properties do not necessarily hold for languages outside the class of regular languages.



Last Updated : 24 Nov, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads