You are on page 1of 10

NON

DETERMINISTIC
F I N I T E AU TO M ATA
NON- DETERMINISM

• I n NFA, given the curre nt


state there could be
multi ple next states
• The next state
m ay be chose n at
random
• All the next states
may be
An EFA accepts a string:
I here is a computati on of I he NFA
I hat acce pts I he string

There is a co mp utati on:


is «ccep†ed by the aII the in put is con sumed and the
NFA: auto ma to n is in an accepti ng state

“«ccep†
An EFA rejects a string:
“ whe n there is no computati o n of the NFA
I hat acce pts I he string.

For ea ch co mp u ta ti o n I hat reject s:


bec«use this • A I I I he in put is co
nsum ed and I he auto ma to n is
in a n o n - fi naI
state O R
• The in put can not be co nsum ed
I FINITE AUTOMATA (FA) AND NON
D
- ETERMINISTIC FINITE
AUTOMATA (NFA) ARE
EQUIVALENT IN THAT A
LANGUAGE IS RECOGNIZED BY
AN NFA IFF IT
IS RECOGNIZED BY AN FA I
HOWEVER, CONSTRUCTING AN
NFA TO RECOGNIZE
A GIVEN LANGUAGE
MAY BE MUCH EASIER
THAN CONSTRUCTING AN
FA FOR THAT LANGUAGE
I ALSO, IT IS MUCH EASIER
TO PROVE CLOSURE
PROPERTIES OF REGULAR
LANGUAGES USING NFAS

You might also like