Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 978
Muthu Ganapathy Nathan Avatar asked Sep 18 '11 03:09

Muthu Ganapathy Nathan


People also ask

Are Dfa and NFA practical?

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.

What is Dfa in machine learning?

It has a finite number of states hence called Determined Finite Automata or DFA. DFA consists of 5 tuples {Q, ∑, q, F, δ}. Q set of all states. ∑ set of input symbols. ( Symbols which machine takes as input ) q Initial state.

What are the applications of Turing machine?

The Turing Machine i.e. TM is more powerful than any other machine. (i) Finite Automata (FA) equivalence: (ii) Pushdown Automata (PDA) equivalence: The Applications of these Automata are given as follows: 1. Finite Automata (FA) – For the designing of lexical analysis of a compiler. For recognizing the pattern using regular expressions.

What is the difference between Turing machine and finite automata?

Difference between Finite Automata and Turing Machine. 1. Finite Automata : The finite automata or finite state machine is an abstract machine which have five elements or tuple. It has a set of states and rules for moving from one state to another but it depends upon the applied input symbol.


2 Answers

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.

like image 150
Matthew Flaschen Avatar answered Oct 07 '22 16:10

Matthew Flaschen


NFA and DFA: These two are used in compilers to create tokens from characters in the source file and return them to the grammar parser. You can learn more from the UNIX lex and yacc manual.

Turing Machines: I don't think this has a different use than its original academic purpose.

like image 4
luis Avatar answered Oct 07 '22 17:10

luis