Nondeterministic Finite-state Automata
Description:
- May have several possible next states for each pair of input value and state
- A Nondeterministic finite-state automata M=(S,I,f,s0,F):
- consists of
- S: a
finite set of states
- I: a
finite input alphabet
- f: a transition function
- assigns a
next state set of states to each pair of state and input
- such that f:S×I→P(S)
- P(S) is the power set of S
- an starting state, s0
- a set of
possible accepting final states, F
NFA’s recognized language:
- Let a string x=x1x2…xk input to an NFA.
- The first input symbol x1 takes the starting state s0 to a set S1 of states
- The next input symbol x2 takes each of the states in S1 to a set of new states.
- Let S2 be the union of these sets.
- Repeat, at each stage, all states obtained using a state obtained at the previous stage and the current input symbol
- The string x is accepted if there is at least 1 final state in the set of all states using x.
- The language recognized by a NFA is the set of all strings recognized by this NFA.
- theorem
- If the language L is recognized by a NFA M0, then L is also recognized by a DFA M1
- where M1 (deterministic) is converted from M0 (Non-deterministic)
- M1‘s states are created from combinations of possible states reached by M0‘s states
- with OR operation
- combination states where each state can have multiple possible states, the new state of M1 is all of those possible states.
-
- Q&A - find language recognized by NFA; question & answer
-
- Q&A - find a DFA recognized same language as the NFA; question, answer