Closure Properties of Regular Languages
Context: FIT2014_MOC · which operations keep you inside the regular languages · each proof picks the formalism (regex or FA) that makes it easy — via Kleene’s Theorem
Quick Revision
- 🎯 Objective: the class of regular languages is closed under complement, union, intersection and concatenation ➔ combining regular languages these ways always yields a regular language.
- ⚡ Key Constraint: there is no operator on regular expressions, so intersection cannot be proved like union — it goes through De Morgan on complements.
📝 Definition
- Closed ➔ if performing an operation on regular languages always produces another regular language, the class is closed under that operation.
- Proof strategy ➔ Kleene’s Theorem lets you switch representation freely: prove each closure in whichever of regex/FA/NFA makes it trivial.
🧮 The four closure theorems
1. Complement — use the automaton
Theorem. The complement of a regular language is regular. Proof (outline). regular ⟹ some regex defines it ⟹ by Kleene’s Theorem some FA recognises it ⟹ swap Final and non-Final states to get an FA for ⟹ by Kleene’s Theorem a regex defines .
2. Union — use the regular expression
Theorem. is regular. Proof. Let be regexes for . Then is a regular expression by clause 3(iii) of the inductive definition (Regular Expressions), and it describes .
3. Intersection — via De Morgan
Theorem. is regular.
- Why not mimic union? ➔ regular expressions have no operation, so there is nothing to write down directly. Proof.
4. Concatenation — use the regular expression
Theorem. is regular. Proof sketch. is a regular expression by clause 3(ii) of the inductive definition, and it describes exactly .
⚖️ Summary matrix
| Operation | Closed? | Cleanest proof route |
|---|---|---|
| complement | ✓ | FA — swap Final / non-Final |
| union | ✓ | regex — clause 3(iii) |
| intersection | ✓ | De Morgan on complements |
| concatenation | ✓ | regex — clause 3(ii) |
| Kleene star | ✓ | regex — clause 3(iv) |
| symmetric difference | ✓ | build from |
| subsets of a regular language | ✗ | any language is a subset of the regular |
| supersets of a regular language | ✗ | any language is a superset of the regular |
When It Flips: closure proofs are exercises in choosing the right representation. Complement is trivial on a DFA and awkward on a regex; union is trivial on a regex. Kleene's Theorem is what licenses hopping between them mid-proof.
🎯 Why closure matters
- A proof technique ➔ closure gives the fastest non-regularity arguments: if is known non-regular, then is non-regular. This is exactly how EQUAL is settled in Proving a Language Non-Regular.
- Symmetric difference ➔ strings in but not , or in but not is regular, being expressible with , and complement.
⚠️ Common Mistakes
- 💡 No in the regex syntax ➔ don’t “prove” intersection closure by writing ; that is not a regular expression. Route it through De Morgan.
- 💡 Subsets and supersets are NOT closed ➔ is regular and every language is one of its subsets, so subset-closure would make every language regular — plainly false.
- 💡 Complement needs a deterministic machine ➔ the swap trick requires a total DFA; see the trap in Finite Automata (DFA and NFA).
🧠 Active Recall
Why can't intersection closure be proved the same way as union closure?
Answer
- Short answer: the union proof works because is itself a regular expression (clause 3(iii) of the inductive definition). Regular expressions have no intersection operator, so there is no analogous expression to write down.
- Why: De Morgan detour ➔ instead use closure under complement and union: , where each step stays inside the regular languages.
Are the regular languages closed under taking subsets? Justify.
Answer
- Short answer: No. is regular, and every language over is a subset of it — including non-regular ones like . So a subset of a regular language need not be regular.
- Why: One counterexample suffices ➔ closure is a universal claim, so a single non-regular subset of a regular language refutes it (and symmetrically, is regular yet every language is a superset of it).