Second Choice No transition: the automaton hangs 11
Second Choice Input cannot be consumed “reject” 12
An NFA accepts a string: when there is a computation of the NFA that accepts the string There is a computation: all the input is consumed and the automaton is in an accepting state 13
Example is accepted by the NFA: “accept” because this computation accepts “reject” 14
Rejection example 15
First Choice 16
First Choice “reject” 17
Second Choice 18
Second Choice 19
Second Choice “reject” 20
An NFA rejects a string: when there is no computation of the NFA that accepts the string. For each computation: • All the input is consumed and the automaton is in a non final state OR • The input cannot be consumed 21
Example is rejected by the NFA: “reject” All possible computations lead to rejection 22
Rejection example 23
First Choice 24
First Choice No transition: the automaton hangs 25
First Choice Input cannot be consumed “reject” 26
Second Choice 27
Second Choice 28
Second Choice No transition: the automaton hangs 29
Second Choice Input cannot be consumed “reject” 30
is rejected by the NFA: “reject” All possible computations lead to rejection 31
Language accepted: 32
Lambda Transitions 33
34
35
(read head does not move) 36
37
all input is consumed “accept” String is accepted 38
Rejection Example 39
40
(read head doesn’t move) 41
No transition: the automaton hangs 42
Input cannot be consumed “reject” String is rejected 43
Language accepted: 44
Another NFA Example 45
46
47
48
“accept” 49
Another String 50
51
52
53
54
55
56
“accept” 57
Language accepted 58
Another NFA Example 59
Language accepted (redundant state) 60
Remarks: • The symbol never appears on the input tape • Simple automata: 61
• NFAs are interesting because we can express languages easier than FAs NFA FA 62
Formal Definition of NFAs Set of states, i. e. Input aplhabet, i. e. Transition function Initial state Accepting states 63
Transition Function 64
65
66
67
Extended Transition Function 68
69
70
Formally : there is a walk from with label to 71
The Language of an NFA 72
73
74
75
76
Formally The language accepted by NFA is: where and there is some (accepting state) 77