updated: 2022-01-23_12:32:31-05:00
Nondeterministic Finite Automata
Formal Definition:
- A nondeterministic finite automaton is a 5-tuple $(Q,\Sigma, \delta, q_0,f)$ where
- Q is a finite set of states
- $\Sigma$ is a finite alphabet
- $\delta:Q\times {\Sigma}_e\rightarrow P(Q)$
- $\Sigma _e=\Sigma \cup {e}$
- $q_0 \in Q$ is the start state
- $f\leq Q$ is set of accept states
^ e is $\epsilon$
Combining DFA's to become NFA
- See: RL Closure under Concatenation#NFA Example
- NFA does not need to comply to the rule that each input can only have one path.
- $\mathcal{E}$: Epsilon Transition
Closure Properties of regular languages using NFA:
-
Union:
-
Concatenation: success state -> epsilon transition to -> start states of next
-
- operation: accept states have epsilon transition to start state
Examples
Example: Writing a NFA formally:
Example: Finite Automata that accepts all strings of form $0^k$ where k is a multiple of 2 or 3
Example: the language of strings of length at least 2 that begin with 0 and end in 1:
- NOTE: When a state has no transitions, if you have more inputs it will fail automatically