Computer science Automata and formal languages Theorem
Closure properties of regular languages
Builds on Regular languageKleene starHomomorphismDeterministic finite automaton
Statement
Let and be alphabets, and let be regular languages. Then the following languages are regular:
- the union , the intersection , the difference and the complement ;
- the concatenation ;
- the Kleene star ;
- the reversal ;
- the image and, for a regular , the preimage , where and are monoid homomorphisms.
Remarks
Complement: swap accepting and non-accepting states of a complete DFA for . Intersection: run DFAs for and in parallel on the product of their state sets, accepting when both accept; union and difference work the same way. Concatenation, star and reversal are easiest with nondeterministic automata: glue automata with -moves, or reverse all arrows and swap initial and accepting states. For the preimage, a DFA for moves on the letter the way a DFA for moves on the word . For example, the words over with an even number of 's and an odd number of 's form a regular language, as the intersection of two regular languages. The class is not closed under infinite unions: every language is a union of singletons, and is not regular.
Going deeper
For a student
Closure properties are a main tool for showing that a language is not regular. For instance, if were regular, then would be regular, which the pumping lemma rules out. Context-free languages, in contrast, are not closed under intersection or complement. The constructions are effective, so they also give algorithms, for example to decide whether two DFAs accept the same language by testing the symmetric difference for emptiness.
Reading path
To understand this page from the ground up, read these 5 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Deterministic finite automaton concept
- Homomorphism concept
- Kleene star concept
- Regular language concept
- Closure properties of regular languages statement
Further reading
About this page
| Tag | 446KZ8HJ5F |
|---|---|
| URI | m2://446KZ8HJ5F |
| Kind | statement, theorem |
| Writing | W0 stub |
| MSC | 68Q45 |
| Status | This copy of the site has no build data. Run m2 status 446KZ8HJ5F. |
| About | Regular language |
| Uses | Regular language, Kleene star, Homomorphism, Deterministic finite automaton |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.