Join the DZone community and get the full member experience.Join For Free
Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.
In computability theory, a system of data-manipulation rules (such as a computer’s instruction set, a programming language, or a cellular automaton) is said to be Turing complete or computationally universal if it can be used to simulate any single-taped Turing machine. The concept is named after English mathematician Alan Turing. A classic example is lambda calculus.
So, this is my attempt at explaining these concepts simply.
Back in the day, people wanted to know how to create a machine that could do all of the calculations they were doing by hand. They wanted to know how to build such a machine and how it might work.
Alan Turing came up with a hypothetical machine that could take any program of any complexity and run it. It could be implemented using a simple tape, a head that moves left and right, could store data by reading, writing, and erasing the contents of square cells. Given long enough tape and enough time, it could compute any program.
In other words, he explained how someone can build a computer. And called the computer a "Turing machine."
Trivia: Back in Alan Turing’s days, the word “Computer” meant the person who manually computes programs (not the machines). :-)
So Powerful, Yet So Simple
Turing machines soon became very popular, and eventually a standard because, while they provided a powerful mechanism to calculate anything, they were also easy to understand. As described in the video below, Turing machines use a tape to keep track of states and run computations.
"Single" vs. "Multi" Tape Turing Machines
One other jargon you’ll hear about Turing machines is the concept of “single” tape.
The initial version of the Turing machine had just a long single tape. Later on, people came up with the concept of “multiple” tape Turing machines that used two to five tapes. Multi-tape Turing machines were not any more powerful than single-tape ones, but they helped to simplify programs.
So, explicitly saying “single” tape isn’t necessary.
This video shows that a multi-tape Turing Machine can be implemented in a single-tape Turing Machine.
A calculator is a good example of a Turing incomplete machine because it can only perform a small pre-defined subset of calculations.
However a home computer (Mac or a PC) is a Turing complete machine because it can do any calculation that a Turing machine can do if we give it enough memory and time.
If you think about it, a Turing machine is just a concept—it means that any "thing"(physical or virtual) that takes any program and runs it is essentially a Turing Machine. And if that "thing" can run every program that a "Turing Machine" can run, then it is called "Turing Complete."
If you like this post, please 1. click the like button and 2. share it on Twitter. You may retweet my tweet below:
Thanks for reading!
Published at DZone with permission of Raja Rao , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.