Real world uses of DFA,NFA,PDA and Turing machines

Muthu Ganapathy Nathan picture Muthu Ganapathy Nathan · Sep 18, 2011 · Viewed 20k times · Source

I am now taking a course on Theory of Computation. I can understand the concepts well. I can able to solve the problems. And, when I asked my instructor about the real world application, he told me these concepts will be surely useful and essential in compiler design. But, at least to make a meaningful study, I need some explanations on how can I use those concepts it in my coding.

e.g. If I want to design my own grep. I will use string functions in C. I don't know how to use regular expressions there in coding.

Same case applies to Turing machines.

If I want to add two numbers why I have to go by those unary concepts. Does the hardware implement those concepts?

Answer

Matthew Flaschen picture Matthew Flaschen · Sep 18, 2011

This article has a practical discussion of DFA and NFA as they apply to efficient regular expression matching. It discusses which real libraries use the efficient Thompson NFA method.

Turing machines are primarily practical as a definition of a computer. If someone tells me about a new language, I can check whether it's as powerful (not to be confused with ease of use) as say, C or Java by attempting to construct a Turing machine in it.