Beruflich Dokumente
Kultur Dokumente
Regular Sets
Beulah A.
AP/CSE
Definition of Regular Expression
Let Σ be an alphabet. The regular expressions over Σ
and the sets that they denote are defined recursively as
follows:
1. φ is a regular expression and denotes the empty set.
2. ε is a regular expression and denotes the set {ε}
3. For each a ∈ Σ, „a‟ is a regular expression and denotes
the set {a}.
4. If r and s are regular expressions denoting the
languages R and S respectively then (r + s), (rs), (r)*
are regular expressions that denotes the sets R∪S, RS
and R* respectively.
25 July 2018 Beulah A. 2
Theorem 1
Regular sets are closed under union, concatenation, and
closure
Proof
If L 1 and L 2 are regular, then there are regular expressions r 1
and r 2 denoting the languages L 1 and L 2 ,respectively.
By definition of RE “If r and s are regular expressions
denoting the languages R and S respectively then (r + s), (rs),
(r)* are regular expressions that denotes the sets R∪S, RS and
R* respectively”
Therefore ( r 1+ r 2), ( r 1. r 2) and (r 1*) are regular expressions
denoting the languages L 1 L 2, L 1 . L 2 and L 1*
q0 qi qF2 q0 qi qF2
…
qFk qFk
a a
q0 qi qj qF2 p0 pi pj pF2
…
DFA for LM
(qF1 ,pF1)
…
(q0 ,p0) (qi ,pi) (qj ,pj)
DFA for L
qF1
q0 qi
a
qj qF2 q‟0 New start
state
Make the
…
old start state
as the only new qFk
final state
Yes
Input Decision
(generally problem solver
a question)
No
X FINITE
0
1
X
q6
INFINITE
X
0