1 Non Deterministic Automata
2 Alphabet = Nondeterministic Finite Accepter (NFA)
3 Two choices Alphabet = Nondeterministic Finite Accepter (NFA)
4 No transition Two choices No transition Alphabet = Nondeterministic Finite Accepter (NFA)
5 First Choice
6
7
8 “accept” First Choice All input is consumed
9 Second Choice
10 Second Choice
11 Second Choice No transition: the automaton hangs
12 Second Choice “reject” Input cannot be consumed
13 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
14 Example is accepted by the NFA: “accept” “reject” because this computation accepts
15 Rejection example
16 First Choice
17 First Choice “reject”
18 Second Choice
19 Second Choice
20 Second Choice “reject”
21 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
22 Example is rejected by the NFA: “reject” All possible computations lead to rejection
23 Rejection example
24 First Choice
25 First Choice No transition: the automaton hangs
26 “reject” First Choice Input cannot be consumed
27 Second Choice
28 Second Choice
29 Second Choice No transition: the automaton hangs
30 Second Choice “reject” Input cannot be consumed
31 is rejected by the NFA: “reject” All possible computations lead to rejection
32 Language accepted:
33 Lambda Transitions
34
35
36 (read head doesn’t move)
37
38 “accept” String is accepted all input is consumed
39 Rejection Example
40
41 (read head doesn’t move)
42 No transition: the automaton hangs
43 “reject” String is rejected Input cannot be consumed
44 Language accepted:
45 Another NFA Example
46
47
48
49 “accept”
50 Another String
51
52
53
54
55
56
57 “accept”
58 Language accepted
59 Another NFA Example
60 Language accepted
61 Remarks: The symbol never appears on the input tape Extreme automata:
62 NFA DFA NFAs are interesting because we can express languages easier than DFAs
63 Formal Definition of NFAs Set of states, i.e. Input aplhabet, i.e. Transition function Initial state Final states
64 Transition Function
65
66
67
68 Extended Transition Function
69
70
71 Formally It holds if and only if there is a walk from to with label
72 The Language of an NFA
73
74
75
76
77 Formally The language accepted by NFA is: where and there is some (final state)
78
79 Equivalence of NFAs and DFAs
80 Equivalence of Machines For DFAs or NFAs: Machine is equivalent to machine if
81 Example NFA DFA
82 Since machines and are equivalent DFA NFA
83 Equivalence of NFAs and DFAs Question: NFAs = DFAs ? Same power? Accept the same languages?
84 Equivalence of NFAs and DFAs Question: NFAs = DFAs ? Same power? Accept the same languages? YES!
85 Languages accepted by NFAs Languages accepted by DFAs Regular Languages Thus, NFAs accept the regular languages