Download presentation
Presentation is loading. Please wait.
1
Non Deterministic Automata
Fall 2004 COMP 335
2
Nondeterministic Finite Accepter (NFA)
Alphabet = Fall 2004 COMP 335
3
Nondeterministic Finite Accepter (NFA)
Alphabet = Two choices Fall 2004 COMP 335
4
Nondeterministic Finite Accepter (NFA)
Alphabet = Two choices No transition No transition Fall 2004 COMP 335
5
First Choice Fall 2004 COMP 335
6
First Choice Fall 2004 COMP 335
7
First Choice Fall 2004 COMP 335
8
First Choice All input is consumed “accept” Fall 2004 COMP 335
9
Second Choice Fall 2004 COMP 335
10
Second Choice Fall 2004 COMP 335
11
Second Choice No transition: the automaton hangs Fall 2004 COMP 335
12
Second Choice Input cannot be consumed “reject” Fall 2004 COMP 335
13
AND An NFA accepts a string w:
if there is at least one computation of the NFA that accepts the string w AND all the input is consumed and the automaton is in a final state Fall 2004 COMP 335
14
Example is accepted by the NFA: “accept” “reject” because this
computation accepts Fall 2004 COMP 335
15
Rejection example Fall 2004 COMP 335
16
First Choice Fall 2004 COMP 335
17
First Choice “reject” Fall 2004 COMP 335
18
Second Choice Fall 2004 COMP 335
19
Second Choice Fall 2004 COMP 335
20
Second Choice “reject” Fall 2004 COMP 335
21
OR An NFA rejects a string w: if there is no computation of the NFA
that accepts the string w: All the input is consumed and the automaton is in a non final state OR The input cannot be consumed Fall 2004 COMP 335
22
Example is rejected by the NFA: “reject” “reject”
All possible computations lead to rejection Fall 2004 COMP 335
23
Rejection example Fall 2004 COMP 335
24
First Choice Fall 2004 COMP 335
25
First Choice No transition: the automaton hangs Fall 2004 COMP 335
26
First Choice Input cannot be consumed “reject” Fall 2004 COMP 335
27
Second Choice Fall 2004 COMP 335
28
Second Choice Fall 2004 COMP 335
29
Second Choice No transition: the automaton hangs Fall 2004 COMP 335
30
Second Choice Input cannot be consumed “reject” Fall 2004 COMP 335
31
All possible computations lead to rejection
is rejected by the NFA: “reject” “reject” All possible computations lead to rejection Fall 2004 COMP 335
32
Language accepted: Fall 2004 COMP 335
33
Lambda Transitions Fall 2004 COMP 335
34
Fall 2004 COMP 335
35
Fall 2004 COMP 335
36
(read head does not move)
Fall 2004 COMP 335
37
Fall 2004 COMP 335
38
all input is consumed “accept” String is accepted Fall 2004 COMP 335
39
Rejection Example Fall 2004 COMP 335
40
Fall 2004 COMP 335
41
(read head doesn’t move)
Fall 2004 COMP 335
42
No transition: the automaton hangs Fall 2004 COMP 335
43
Input cannot be consumed
“reject” String is rejected Fall 2004 COMP 335
44
Language accepted: Fall 2004 COMP 335
45
Another NFA Example Fall 2004 COMP 335
46
Fall 2004 COMP 335
47
Fall 2004 COMP 335
48
Fall 2004 COMP 335
49
“accept” Fall 2004 COMP 335
50
Another String Fall 2004 COMP 335
51
Fall 2004 COMP 335
52
Fall 2004 COMP 335
53
Fall 2004 COMP 335
54
Fall 2004 COMP 335
55
Fall 2004 COMP 335
56
Fall 2004 COMP 335
57
“accept” Fall 2004 COMP 335
58
Language accepted Fall 2004 COMP 335
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.