4.6.6 · D1Theory of Computation

Foundations — Regular languages — closed under union, intersection, complement, concatenation, Kleene star

2,014 words9 min readBack to topic

Before you can read the parent note, you need to be fluent in a small pile of symbols and pictures. Below, every one is built from zero, in an order where each rests on the one before. Nothing is used before it is drawn.


0. The alphabet — the box of letters we are allowed

Picture it as a literal box holding a few letter-tiles.

WHY the topic needs it. Every string, every machine, every language is defined relative to one fixed box of letters. If you change the box, you change the game. When the parent writes "strings over ", it means: pull tiles only from this box.


1. A string — a row of tiles

Picture: a string is a row of tiles laid end to end, read like a word.

WHY the topic needs it. The robots read one string at a time, tile by tile, and the answer YES/NO is about that one string. Strings are the things machines eat.


2. The empty string — the row with zero tiles

WHY the topic needs it. Kleene star (Section 5 of the parent) explicitly includes (" copies"). The -transitions used to glue machines are named after exactly this "read no tile" jump.


3. — the set of ALL possible strings

Picture: an infinite bag containing , then all length-1 strings, then all length-2 strings, and so on forever.

WHY the topic needs it. is the universe of everything. Every language lives inside it, and complement is measured against it: means "all strings except the ones in ."


4. A language — a chosen subset of the universe

Picture: draw the big oval ; a language is a circle inside it. Strings inside the circle are the accepted ones; everything outside is rejected.

WHY the topic needs it. The entire question "is this language regular?" is a question about a subset of . Closure operations combine these subsets.


5. Set operations — combining circles

Because languages are sets, we combine them with ordinary set operations. Look at the picture, then read each symbol.

The link De Morgan's Laws is why union is "free" once you have complement and intersection: — flip both, overlap, flip back.


6. Concatenation and — gluing rows of tiles

WHY the topic needs it. Section 4 of the parent (concatenation closure) is literally about . The example uses this glue.


7. The machines: DFA and NFA — the robots that say YES/NO


8. The formal machine tuple and its symbols

The parent writes a DFA as . Now every letter is earned:

WHY the topic needs it. Every construction in the parent (flip , product states, -glue) is written in exactly these symbols. Without them the proofs are unreadable.


9. Regular language & regular expression — the "club" itself


Prerequisite map

Alphabet Sigma

String w

Empty string epsilon

Universe Sigma-star

Language A subset of universe

Set ops union inter complement

Concatenation xy and AB

DFA robot

NFA with epsilon jumps

Tuple Q Sigma delta q0 F

Product Q-A times Q-B

Regular language club

Closure properties topic


Equipment checklist

Cover the answers and test yourself. If any line is fuzzy, reread its section.

What does mean, in one phrase?
The finite box of allowed letters.
Is a string or a set?
A string — the unique one of length .
How do and differ?
has one member; has none.
What is ?
The set of all strings over , every length including .
Define a language in five words.
Any subset of .
What does equal?
, everything except .
What is (language concatenation)?
All with , .
Why can a DFA be complemented by swapping ?
It lands in exactly one state per string.
Why can't you complement an NFA by swapping?
Multiple parallel paths can both accept and reject; determinize first.
What does give?
The next state from on tile .
What is a state in ?
A pair tracking both robots at once.
When is a language "regular"?
When some DFA/NFA (or regex) accepts it.

Recall One-line summary

Letters () build strings (), all strings form the universe (), a chosen subset is a language (), robots (DFA/NFA) recognise languages, and closure = rebuild a robot for the combined language.