I was given an exercise to find DFA for base m no divisible by m
. I found out how to do this, thanks to this link, but then I wondered how would we approach this exercise if it was to create an NFA
and then convert it to DFA using subset construction method.
I understand that we can insert NULL moves
at some place, but I am in search of a straight method, where we convert the problem to NFA seeing only the question. We can also construct a regular expression and the create an NFA, but I can't arrive at a regular expression too.
As an example, for creating NFA for numbers given in base 4 that are divisible by 5.