4 ms·
Every state that means "a full toy has just been scanned" is a valid accepting state. In fact you don't need separate states for each toy, you only need self-lo
by H8crilA 5y ago
Every state that means "a full toy has just been scanned" is a valid accepting state. In fact you don't need separate states for each toy, you only need self-loop of appropriate length.
(Also, this is an NFA, not a DFA)
The language of valid parentheses up to size 2^5 is obviously regular, it's even finite.