Regular Languages
Summarized notes from Introduction to Theory of Computation, Chapter 1
- recognized equivalently by: DFA, NFA, regular expressions
- closed under union, concatenation, star operation:
- union:
- concatenation:
- star:
- union:
- satisfy pumping lemma → otherwise nonregular
- finite automaton is the simplest computational model => limited memory but can recognize patterns in data
Deterministic finite automaton (DFA)
5-tuple
states (finite set) | |
alphabet (finite set) | |
transition function | |
start state | |
set of accept (or final) states |
Nondeterministic finite automaton (NFA)
5-tuple
states (finite set) | |
alphabet (finite set) | |
transition function | |
start state | |
set of accept (or final) states |
where
Regular expression
# | |
---|---|
1. | |
2. | |
3. | |
4. | |
5. | |
6. |
Generalized nondeterministic finite automaton (GNFA)
- reads blocks symbols from input
- may have any regular expressions as transition labels (or
, members of ) - start state: transition arrows to every other state, no incoming arrows
- single accept state: has incoming arrows from every other state, no outgoing arrows
- all other states (except start and accept): one arrow to every other state and to itself
5-tuple
states (finite set) | |
input alphabet | |
transition function | |
start state | |
accept state |
Pumping lemma
If
- for each
, , and .