Intermediate Topic 28 of 51 Theory & Discrete Math
Turing Machines
Abstract machine with infinite tape modeling computation.
How it works
A Turing machine is a theoretical model of computation consisting of an infinite tape of cells, a head that reads and writes symbols and moves left or right and a finite set of states with transition rules. Despite its simplicity, it can compute anything that is computable by any known algorithmic process. Variants such as multi-tape and nondeterministic machines do not add computing power, although they affect efficiency. A universal Turing machine can simulate any other machine given its description.
Step-by-step walkthrough
- The tape holds symbols and is unbounded.
- The head reads the current cell.
- The state control decides what to write, move left or right and which state is next.
- The machine repeats until it halts.
- It models any algorithm that can run on a computer.
Where it is used
Turing machines define what is computable and provide the basis for complexity classes such as P and NP, proofs of undecidability and the concept of the stored-program computer.
Common pitfall
They are not practical machines; analyzing algorithms with them is cumbersome, so the RAM model is used instead. Confusing computability, whether a problem can be solved at all, with complexity, how efficiently, is common. Designing machines requires careful state bookkeeping. Work through small examples on paper to build intuition.
Where it fits in the course
Turing Machines is topic 28 of 51 in Theory & Discrete Math, rated Intermediate. It follows Chomsky Hierarchy. The next topic is Church-Turing Thesis.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Theory & Discrete Math quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Theory & Discrete Math quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Turing Machines?
Where do people use Turing Machines?
What is the most common mistake with Turing Machines?
What should I learn before this topic?
How can I practice it?
Is Turing Machines hard to learn?
How long does it take to learn Turing Machines?
Which topics are related to Turing Machines?
What should I study after Turing Machines?
Related topics
- Chomsky Hierarchy (Theory & Discrete Math)
- Church-Turing Thesis (Theory & Discrete Math)
- Pushdown Automata (Theory & Discrete Math)
- Decidability (Theory & Discrete Math)
- Virtual Machines in Cloud (Distributed Systems & Cloud)
- Virtual Machines (Languages & Compilers)
- Finite State Machines in Hardware (Computer Architecture & Logic)