On Friday, April 18, 2014 8:28:03 AM UTC-5, Thumbnail wrote: > > > I had a couple of insights. First, to allow the dfa to be generated >> programmatically, I changed it from a map to a vector. This means >> that the next state can just be an integer. Second, I decided that >> the terminal state would always be at index 0 ... >> > > Shouldn't a DFA allow for *any* *set* of states to be terminal? For > instance, the minimal DFA for (ab)*(1 + a) has two states, both terminal. >
I haven't read through the above, but will have to later as I am familiar with the excellent linked article, so thanks for bumping this back to the top. As to your question, there is a straightforward translation from multiple terminal states to a single one. Add a special terminal input symbol to your alphabet and consider any input strings to be terminated by that symbol. For each of the terminal states add a transition to a single terminal state for the terminal symbol. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.