next up previous contents
Next: Other Decision Problems for Up: Further Properties of Regular Previous: Total DFA   Contents

Closure of Regular Languages

By the definition of regular expressions (and by Thompson's algorithm), we know that the union, concatenation and Kleene closure of regular languages must also be a regular language. It is reasonable to ask: does this hold for other ``set-theoretic'' operations, such as intersection, difference and complement? We prove that these languages are regular by constructing the appropriate automata.

Let $L_1$ and $L_2$ be regular languages over the alphabet $\Sigma$, and let $M_1$ and $M_2$ be their corresponding total DFAs.

Let us define the components of $M_1$ and $M_2$ as follows:

Now we can define:

  1. The intersection of $L_1$ and $L_2$ is the machine $M_1 \cap M_2$ defined by:

  2. The difference of $L_1$ and $L_2$ is the machine $M_1 - M_2$, defined as for intersection, except that the set of final states is now: $\{(p,q)\; \mid\; p\, \in\, P_f\; and\; q\, \not\in\, Q_f\}$

  3. The complement of the language $L_1$ is the machine $M_1$', which is simply $M_1$ with the final and non-final states swapped; ie. the set of final states is: $P\, - \, P_f$


next up previous contents
Next: Other Decision Problems for Up: Further Properties of Regular Previous: Total DFA   Contents
James Power 2002-11-29