I'm studying some theory of computation at the moment and, as is implied, it is very theoretical.
I can convert from regex to NFAs to DFAs pretty easily, I can understand that.
But since all NFAs can be converted to DFAs and (I'm pretty sure) grep
commands in UNIX use regex to determine matching strings, what is the most used Finite Automata, DFA or NFA?
In my experience (not much), DFAs are generally much simpler to use when representing a regular language, and are also deterministic so should always be chosen over NFAs.
NFAs branch off to multiple outcomes, require recursive functions and just seem more awkward to me.
I know compilers is another practical use of finite automata.
My, question... why learn/use both. DFAs seem perfectly fine to me.
Thanks for any answers!