r/AskComputerScience • u/bathtub87 • Jan 18 '26
Turing Machine
What is a Turing machine?? For so many classes they mention it and I have the main idea of what it is but I cannot find a definition that I totally understand. Does anyone have a definition that anyone can understand?
0
Upvotes
View all comments
Show parent comment
2
u/stevevdvkpe Jan 19 '26
A Turing machine is a simple model for a class of devices that can perform computation. It consists of:
An indefinitely long tape divided into cells, where each cell can be blank or hold one of a specified finite set of symbols
A state machine that can recognize the symbols on the tape, and based on the symbol in the current cell it is positioned at, change it to another symbol (or leave it alone), and move one cell left or right on the tape.
With appropriate choices of symbols and state machines, Turing machines can perform any computation. One can also construct a universal Turing machine that is given a tape containing a description of another kind of Turing machine and the input tape for that Turing machine, and emulate that machine's behavior on that tape, making it a general model of computation.
Alan Turing's entire purpose in developing the idea of the Turing machine was to create a simple, formally defined theoretical model of computation that could be analyzed mathematically. Your egg-sorting machine is a different kind of machine that isn't useful as a general model of computation. Eggs aren't a finite symbol set. The egg-sorting machine only sorts eggs by size and doesn't specify how it moves around in or between cartons.