closures

the set of all regular languages are closed under three operations – meaning that the results after the operation will still be in the same set – union, concatenation, and star.

theorem: the set of regular languages is closed under the regular operations.

union

if $A$ and $B$ are regular languages, then $A \cup B$ is also regular. this new regular language $C$ recognizes strings that are either in $A$ or in $B$.

we can construct a machine $N$ where $L(N) = L(N_1) \cup L(N_2)$ from two machines $N_1$ and $N_2$ like this:

it looks like this:

a union of L1 and L2

you might noticed the strange diagram. it might look complicated, but it is simply an abstraction; each rounded box, or “bubble”, is a finite automaton; inside the box there are the all the states and transitions.

by abstracting away the detail in the automaton, it helps us to visualize the operations better.

concatenation

if $A$ and $B$ are regular languages, then $A \circ B$ (concatenation) is regular too. this new language recognizes strings that start with something in $A$ and end with something from $B$.

to construct the concatenation, we

it looks like this:

concatenation of A and B

star operation

if $A$ is regular, $A$ is also regular. the star operation recognizes $\epsilon$ or any number of strings from $A$. to construct $A$:

it looks like this:

star operation