Sipser: Section 1.3
From CSWiki
[edit]
Important Points About Regular Expressions
- Regular Expressions are computationally equivalent to finite automata.
- One can create an equivalent NFA or DFA for any regular expression, and vice versa.
Theorem 1.54
- A language is regular if and only if it can be described by a regular expression.
Lemma 1.55 &1.56
- If a language is described by a regular expression, then it is regular.
- If a language is regular, then it is described by a regular expression.
[edit]
Formal Definition
R is a regular expression if R
- a for some a in an alphabet Σ
-
, the empty string
-
, the empty set
- (R1 * ), the Kleene star of a regular expression
-
, the concatenation of two regular expressions, usually abbreviated R1R2
-
, the union of two regular expressions
(Note: The order in which the
operations has been rearranged from Sipser's definition, and now reflects the precedence of the operations.)
The definition of regular expressions is recursive, with the first three items being the base cases, and the latter three being the rules of recursion.
[edit]
GNFAs
A GNFA, or generalized nondeterministic finite automaton, is a specialized type of automaton used in the proof of the equivalence of automata and regular expressions. GNFAs must meet the following special conditions:
- The start state has transitions to every other state, but no incoming transitions.
- There is only one accept state.
- The accept state has transitions from every other state, but no outgoing transitions.
- There is a transition from every state to every state, including itself, for all states except the start state and the accept state.
Definition A generalized nondeterministic finite automaton can be expressed as a 5-tuple (Q, Σ, δ, q0, qk), where
Q a finite set of states. Σ is the input alphabet. δ : (Q - { qk } )( Q - { q0 })
R is the transition function. q0 is the start state. qk is the the accept state.
(

