4 Two choices Alphabet = Nondeterministic Finite Accepter (NFA)
5 No transition Two choices No transition Alphabet = Nondeterministic Finite Accepter (NFA)
6 First Choice
7 First Choice
8 First Choice
9 “accept” First Choice All input is consumed
10 Second Choice
11 Second Choice
Second Choice No transition: the automaton hangs
13 Second Choice “reject” Input cannot be consumed
14 An NFA accepts a string: when there is a computation of the NFA that accepts the string all the input is consumed and the automaton is in a final state AND
15 Example is accepted by the NFA: “accept” “reject” because this computation accepts
16 Rejection example
17 First Choice
18 First Choice “reject”
19 Second Choice
20 Second Choice
21 Second Choice “reject”
22 An NFA rejects a string: when there is no computation of the NFA that accepts the string: All the input is consumed and the automaton is in a non final state The input cannot be consumed OR
23 Example is rejected by the NFA: “reject” “reject” All possible computations lead to rejection
24 Language accepted:
Language accepted:
Language accepted (redundant state)
Formal Definition The language accepted by NFA is: where and there is some (final state)
Remarks: The symbol never appears on the input tape Simple automata:
NFA DFA NFAs are interesting because we can express languages easier than DFAs