Week 1 - Nondeterminism Flashcards
What does it mean when a machine is deterministic?
When a machine is in a given state and reads the next input, it must have only one future state for that symbol that it can change to.
What does it mean when a machine is nondeterministic?
When a machine is in a given state and reads the next input symbol, it may have zero, one or several choices for the next state to reach.
What are the differences between a DFA and NFA?
Each state in a DFA has exactly one exiting transition arrow going to one state for each symbol of the alphabet and no other arrows. Whereas a state of an NFA can have one, none, or many exiting transition arrows each going to different states for one symbol of the alphabet.
TRUE OR FASLE: A DFA counts as a NFA.
True.
TRUE OR FASLE: A NFA counts as a DFA.
False.
TRUE OR FALSE: Some transitions of an NFA can be labelled with an empty word Ɛ.
True.
What counts as an accepted word/string in a NFA?
As long as at least one of the paths the process takes to execute the string it ends up in a final state at the end, then the word is accepted.
When an NFA is executing and it comes accross a choice for the transition to take for an input what does it do?
The NFA copies itself and follows each path seperately.
What happens if an NFA comes across a transition labelled with Ɛ during the process?
It moves through that transition to the next state without reading any more input.
What happens during the process if a transition is labelled with both a symbol and Ɛ?
The process splits into two branching paths, following a path where the transition is for the symbol if that symbol was the one currently read in from the input, and a path that moves through the transition without reading any inputs.
Define a Nondeterministic finite automaton (NFA) in compution terms.
An NFA is a tuple N = (Q, Σ, δ, q0, F) where
Q is a finite set of states.
Σ is a finite alphabet.
δ is a function Q x ΣƐ -> P(Q), where ΣƐ = Σ ⋃ {Ɛ}
q0∈Q is the initial state of the machine.
F⊆Q is the set of final states of the machine.
How dod we define/write the language which is accepted by a NFA?
Assuming N is the NFA, w is a word, and Σ is the alphabet.
L = {w ∈ Σ* / N accepts w}