$\{w \in \{ a,b,c,d \}^{*}: |w|\geq 2, w \text{ begins and ends with the same symbol} \}$

1k Views Asked by At

The question is to build a NFA that begins and ends with the same symbol. I came up with two solutions but I was wondering if there is a difference between them.

Solution 1: enter image description here

Solution 2: enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Both solutions are correct, but obviously the second one has less states and hence is a better solution. Note that, contrary to deterministic automata, there is no such notion as the minimal NFA of a language.