580 likes | 594 Views
Non Deterministic Automata. Nondeterministic Finite Accepter (NFA). Alphabet =. Nondeterministic Finite Accepter (NFA). Alphabet =. Two choices. Nondeterministic Finite Accepter (NFA). Alphabet =. Two choices. No transition. No transition. First Choice. First Choice. First Choice.
E N D
Non Deterministic Automata COMP 335
Nondeterministic Finite Accepter (NFA) Alphabet = COMP 335
Nondeterministic Finite Accepter (NFA) Alphabet = Two choices COMP 335
Nondeterministic Finite Accepter (NFA) Alphabet = Two choices No transition No transition COMP 335
First Choice COMP 335
First Choice COMP 335
First Choice COMP 335
First Choice All input is consumed “accept” COMP 335
Second Choice COMP 335
Second Choice COMP 335
Second Choice No transition: the automaton hangs COMP 335
Second Choice Input cannot be consumed “reject” COMP 335
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 COMP 335
Example is accepted by the NFA: “accept” “reject” because this computation accepts COMP 335
Rejection example COMP 335
First Choice COMP 335
First Choice “reject” COMP 335
Second Choice COMP 335
Second Choice COMP 335
Second Choice “reject” COMP 335
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 COMP 335
Example is rejected by the NFA: “reject” “reject” All possible computations lead to rejection COMP 335
Rejection example COMP 335
First Choice COMP 335
First Choice No transition: the automaton hangs COMP 335
First Choice Input cannot be consumed “reject” COMP 335
Second Choice COMP 335
Second Choice COMP 335
Second Choice No transition: the automaton hangs COMP 335
Second Choice Input cannot be consumed “reject” COMP 335
is rejected by the NFA: “reject” “reject” All possible computations lead to rejection COMP 335
Language accepted: COMP 335
Lambda Transitions COMP 335
(read head does not move) COMP 335
all input is consumed “accept” String is accepted COMP 335
Rejection Example COMP 335
(read head doesn’t move) COMP 335
No transition: the automaton hangs COMP 335
Input cannot be consumed “reject” String is rejected COMP 335
Language accepted: COMP 335
Another NFA Example COMP 335
“accept” COMP 335
Another String COMP 335