800 likes | 948 Vues
This guide explores Non-Deterministic Finite Automata (NFA), focusing on how they accept or reject strings. An NFA can have multiple paths for input processing, leading to acceptance when at least one computation consumes all input and ends in an accepting state. Conversely, rejection occurs if there's no valid computation that leads to acceptance. Key examples illustrate these concepts, emphasizing the roles of choices, transitions, and the significance of the input. Understanding these principles is crucial for applications in computational theory and automata.
E N D
Nondeterministic Finite Automaton (NFA) Alphabet =
Alphabet = Two choices
Alphabet = Two choices No transition No transition
First Choice All input is consumed “accept”
Second Choice No transition: the automaton hangs
Second Choice Input cannot be consumed “reject”
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
Example is accepted by the NFA: “accept” “reject” because this computation accepts
First Choice “reject”
Second Choice “reject”
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
Example is rejected by the NFA: “reject” “reject” All possible computations lead to rejection
First Choice No transition: the automaton hangs
First Choice Input cannot be consumed “reject”
Second Choice No transition: the automaton hangs
Second Choice Input cannot be consumed “reject”
is rejected by the NFA: “reject” “reject” All possible computations lead to rejection
all input is consumed “accept” String is accepted
No transition: the automaton hangs
Input cannot be consumed “reject” String is rejected