Union of two regular languages
From Wikipedia, the free encyclopedia
In formal language theory, and in particular the theory of nondeterministic finite state machines, it is known that the union of two regular languages is a regular language. This article provides a proof of that statement.
[edit] Theorem
For any regular languages L1 and L2, language
is regular.
Proof
Since L1 and L2 are regular, there exist NFA's
that recognize
L1 and L2.
Let
Construct
where
In the following, we shall use
to denote 
Let w be a string from 

Assume
(Proof would be similar if
)
Let
where 
Since N1 accepts
, there exist
such that
Since 
We can therefore substitute T for T1 and rewrite the above path as

Furthermore,
and
The above path can be rewritten as
Therefore, N accepts
and the proof is complete.
Note: The idea drawn from this mathematical proof for constructing
a machine to recognize
is to create an initial state and connect
it to the initial states of L1 and L2 using ε arrows.
[edit] References
- Michael Sipser, Introduction to the Theory of Computation ISBN 0-534-94728-X. (See . Theorem 1.22, section 1.2, pg. 59.)














