What is the enlightenment I'm supposed to attain after studying finite automata?
cstheory.stackexchange.com
What is the enlightenment I'm supposed to attain after studying finite automata?
1–10 of 66 posts
Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#2I've implement event-driven FSMs and to me the biggest "ah ah" moment was that it was trivial to make a list of valid (or non valid) state transitions. I used it in one particular case which was really complex (IMHO) to model and were my code was quickly becoming a gigantic mess. I ended up rewriting that part using an event-driven FSM and things became smooth.
Nowadays I don't like the 'S' in "FSM" that much anymore: I've moved to FP and can't really say I'm missing mutability.
Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#3Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#4It is to recognize the congnizing that you are doing about finite automata is itself composed of finite automata.
Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#5Boy, was I wrong. Despite what I'd anticipated, that class ended up being the single most useful CS class that I took. I had the fortune of taking the class with Alfred Aho[1] - I can't imagine a person more qualified to teach a class on computation via automata; he literally thinks in automata.
One day, I mentioned how I'd solved a particular programming problem (not for class) by reasoning about it as if it were a pushdown automaton, and how I was surprised that these techniques were still relevant, even for problems far more high-level than, say, writing egrep. He told me, 'Sometimes when I have a tough problem, I like to think of it as a language recognition problem, and it becomes easier to solve.'
My brain may not be quite as oriented towards state machines as Prof. Aho's is, but that trick has saved me countless times. Like functional programming, it takes a bit of practice to wrap your head around it if you're not used to it, but it can present really elegant solutions to problems that seem daunting at first glance.
Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#6Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#7I was dreading taking Computer Science Theory for my undergraduate degree. Turing machines bored me when I studied them in my introductory class, and I saw the class as a necessary evil - a core requirement as well as a prerequisite for my compilers class. Boy, was I wrong. Despite what I'd anticipated, that class ended up being the single most useful CS class that I took. I had the fortune of taking the class with A…
Statemachines are an incredibly useful tool. I've spent the better part of last year untangling a huge pile of code and the solution in the end was to split it all up into statemachines that communicate with each other using simple synchronous messages.
That and that alone made the problem tractable. (Tractable to me, that is, quite possibly some genius would be able to solve it in many different ways, but this to me only underscores the value of statemachines as a tool).
Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#8It's also nice to be able to express solutions as clearly and succinctly as you can with libraries like this:
https://github.com/cdorrat/reduce-fsm
Not enlightenment, just bliss...
Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#9A = {0|1,...}
A[x] = !(A[y]•A[z])
That's all there is to computing, near as I've been able to simplify it. Cellular automata may do a better job.
Re: What is the enlightenment I'm supposed to attain after studying finite automata?
#10My bitter example for this is http://stackoverflow.com/questions/11314077/algorithm-for-ex... which question was deleted by moderators, then undeleted by HN members. See http://meta.stackoverflow.com/questions/138678/can-we-please... for the discussion on meta about the question, and http://news.ycombinator.com/item?id=4203350 for the HN discussion at the time.
Incidentally the answer to that question provides a concrete example of something you can easily do if you understand finite automata, that you couldn't do without it, and that knowing how to use pre-built interfaces with finite automata behind them (like regular expressions) would not help you solve.