Could someone explain why this(the automata in the picture)is a NDFA?
Is it because it only has one initial state or because there are several arrows with the same symbol that arrive at the same state? I dont quite understand if one of those things define it as an NDFA?
Asked
Active
Viewed 240 times
0

Dusan Biga
- 53
- 5
1 Answers
3
It's non-deterministic because q1
has two different transitions on #
.
After (#
, the machine is in states q1
and q3
, and will accept all of @)
, #@)
, ##@)
, etc.
State q3
is, however, redundant. You could just remove it to produce a DFA that accepts the same language.

Matt Timmermans
- 53,709
- 3
- 46
- 87
-
So it has nothing to do with there being one initial state or having more than one final state? – Dusan Biga Mar 25 '20 at 05:34
-
No. Both DFAs and NFAs have a single start state, and they can both have more than one accepting state. It's actually unusual for an NFA to have more than one accepting state, since they can be replaced by non-deterministic transitions to a single accepting state, and Thompson's construction only uses one. – Matt Timmermans Mar 25 '20 at 11:46
-
Ah, i understand. Thank you so much for the explanation! – Dusan Biga Mar 25 '20 at 14:20