Closure properties of Regular languages Last Updated : 12 Jul, 2025 Comments Improve Suggest changes 43 Likes Like Report A closure property is a characteristic of a class of languages (such as regular, context-free, etc.) where applying a specific operation (like union, intersection, concatenation, etc.) to languages within that class results in a language that is also within the same class.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 languagesKleen Closure: RS is a regular expression whose language is L, M. R* is a regular expression whose language is L*.Positive closure: RS is a regular expression whose language is L, M. R^+ is a regular expression whose language is L^+ .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.Reverse Operator: Given language L, L^R is the set of strings whose reversal is in L. Example: L = {0, 01, 100}; L^R ={0, 10, 001}. Proof: Let E be a regular expression for L. We show how to reverse E, to provide a regular expression E^R for L^R .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).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.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.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) = E . 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).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}.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.OperationClosed (Regular Languages)UnionYesIntersectionYesSet DifferenceYesComplementYesConcatenationYesKleene StarYesKleene PlusYesReversalYesHomomorphismYesInverse HomomorphismYesSubstitutionYesIntersection with Regular LanguageYesUnion with Regular LanguageYesSubset NoInfinite UnionNo Create Quiz Comment A anupriyasingh317 Follow 43 Improve A anupriyasingh317 Follow 43 Improve Article Tags : Computer Subject GATE CS Theory of Computation Explore Automata _ IntroductionIntroduction to Theory of Computation5 min readChomsky Hierarchy in Theory of Computation2 min readApplications of various Automata4 min readRegular Expression and Finite AutomataIntroduction of Finite Automata3 min readArden's Theorem in Theory of Computation6 min readSolving Automata Using Arden's Theorem6 min readL-graphs and what they represent in TOC4 min readHypothesis (language regularity) and algorithm (L-graph to NFA) in TOC7 min readRegular Expressions, Regular Grammar and Regular Languages7 min readHow to identify if a language is regular or not8 min readDesigning Finite Automata from Regular Expression (Set 1)4 min readStar Height of Regular Expression and Regular Language3 min readGenerating regular expression from Finite Automata3 min readCode Implementation of Deterministic Finite Automata (Set 1)8 min readProgram for Deterministic Finite Automata7 min readDFA for Strings not ending with "THE"12 min readDFA of a string with at least two 0âs and at least two 1âs3 min readDFA for accepting the language L = { anbm | n+m =even }14 min readDFA machines accepting odd number of 0âs or/and even number of 1âs3 min readDFA of a string in which 2nd symbol from RHS is 'a'10 min readUnion Process in DFA4 min readConcatenation Process in DFA3 min readDFA in LEX code which accepts even number of zeros and even number of ones6 min readConversion from NFA to DFA5 min readMinimization of DFA7 min readReversing Deterministic Finite Automata4 min readComplementation process in DFA2 min readKleene's Theorem in TOC | Part-13 min readMealy and Moore Machines in TOC3 min readDifference Between Mealy Machine and Moore Machine4 min readCFGRelationship between grammar and language in Theory of Computation4 min readSimplifying Context Free Grammars6 min readClosure Properties of Context Free Languages11 min readUnion and Intersection of Regular languages with CFL3 min readConverting Context Free Grammar to Chomsky Normal Form5 min readConverting Context Free Grammar to Greibach Normal Form6 min readPumping Lemma in Theory of Computation4 min readCheck if the language is Context Free or Not4 min readAmbiguity in Context free Grammar and Languages3 min readOperator grammar and precedence parser in TOC6 min readContext-sensitive Grammar (CSG) and Language (CSL)2 min readPDA (Pushdown Automata)Introduction of Pushdown Automata5 min readPushdown Automata Acceptance by Final State4 min readConstruct Pushdown Automata for given languages4 min readConstruct Pushdown Automata for all length palindrome6 min readDetailed Study of PushDown Automata3 min readNPDA for accepting the language L = {anbm cn | m,n>=1}2 min readNPDA for accepting the language L = {an bn cm | m,n>=1}2 min readNPDA for accepting the language L = {anbn | n>=1}2 min readNPDA for accepting the language L = {amb2m| m>=1}2 min readNPDA for accepting the language L = {am bn cp dq | m+n=p+q ; m,n,p,q>=1}2 min readConstruct Pushdown automata for L = {0n1m2m3n | m,n ⥠0}3 min readConstruct Pushdown automata for L = {0n1m2n+m | m, n ⥠0}2 min readNPDA for accepting the language L = {ambncm+n | m,n ⥠1}2 min readNPDA for accepting the language L = {amb(m+n)cn| m,n ⥠1}3 min readNPDA for accepting the language L = {a2mb3m|m>=1}2 min readNPDA for accepting the language L = {amb2m+1 | m ⥠1}2 min readNPDA for accepting the language L = {aibjckdl | i==k or j==l,i>=1,j>=1}3 min readConstruct Pushdown automata for L = {a2mc4ndnbm | m,n ⥠0}3 min readNPDA for L = {0i1j2k | i==j or j==k ; i , j , k >= 1}2 min readNPDA for accepting the language L = {anb2n| n>=1} U {anbn| n>=1}2 min readNPDA for the language L ={wÐ{a,b}* | w contains equal no. of a's and b's}3 min readTuring MachineTuring Machine in TOC7 min readTuring Machine for addition3 min readTuring machine for subtraction | Set 12 min readTuring machine for multiplication2 min readTuring machine for copying data2 min readConstruct a Turing Machine for language L = {0n1n2n | nâ¥1}3 min readConstruct a Turing Machine for language L = {wwr | w ∈ {0, 1}}5 min readConstruct a Turing Machine for language L = {ww | w ∈ {0,1}}7 min readConstruct Turing machine for L = {an bm a(n+m) | n,mâ¥1}3 min readConstruct a Turing machine for L = {aibjck | i*j = k; i, j, k ⥠1}2 min readTuring machine for 1's and 2âs complement3 min readRecursive and Recursive Enumerable Languages in TOC6 min readTuring Machine for subtraction | Set 22 min readHalting Problem in Theory of Computation4 min readTuring Machine as Comparator3 min readDecidabilityDecidable and Undecidable Problems in Theory of Computation6 min readUndecidability and Reducibility in TOC5 min readComputable and non-computable problems in TOC6 min readTOC Interview preparationLast Minute Notes - Theory of Computation13 min readTOC Quiz and PYQ's in TOCTheory of Computation - GATE CSE Previous Year Questions2 min read Like