Week 1 - Nondeterminism Flashcards

1
Q

What does it mean when a machine is deterministic?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does it mean when a machine is nondeterministic?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the differences between a DFA and NFA?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

TRUE OR FASLE: A DFA counts as a NFA.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

TRUE OR FASLE: A NFA counts as a DFA.

A

False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

TRUE OR FALSE: Some transitions of an NFA can be labelled with an empty word Ɛ.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What counts as an accepted word/string in a NFA?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

When an NFA is executing and it comes accross a choice for the transition to take for an input what does it do?

A

The NFA copies itself and follows each path seperately.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens if an NFA comes across a transition labelled with Ɛ during the process?

A

It moves through that transition to the next state without reading any more input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What happens during the process if a transition is labelled with both a symbol and Ɛ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define a Nondeterministic finite automaton (NFA) in compution terms.

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How dod we define/write the language which is accepted by a NFA?

A

Assuming N is the NFA, w is a word, and Σ is the alphabet.

L = {w ∈ Σ* / N accepts w}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly