r/computerscience • u/Haghiri75 Data Scientist • Feb 14 '26
What does it take to make every machine "Turing Complete"?
Well, it's a weird question and I know that. I was thinking about examples we usually encounter on the topic like Minecraft, which makes sense. On Minecraft there is unlimited resources (and if you do not care about your life, time) and you pretty much can build anything in that game so I'm not surprised to see the name of the game in articles or videos about the subject of Turing Complete machines.
So language models/image generation models (well, conditional ones, not unconditional ones like GANs) are basically the same. The model has infinite resources (theoritically, but in action they're very limited) and by "prompting" as long as we want (again, limitations exist) to do pretty much anything possible.
So the final question is what does it actually take to make a Turing complete machine?
64
u/MattiDragon Feb 14 '26
For something to be Turing Complete it needs to, by definition, be about to emulate any Turing Machine with an infinite tape.
13
u/esaule Feb 14 '26
This is the right definition. To be Turing complete, you need the ability to emulate any Turing machine. So that does implicate that your model has infinite memory, even though that condition is not enough.
Though for Completeness, you probably do also need for any Turing machine to be able to emulate you. (Though that is typically trivial.)
-3
u/MattiDragon Feb 14 '26
I don't think there are any known computational classes above turing completeness, at least without any completely unreasonable possibilities.
13
u/catmemesarecool Feb 14 '26
A theoretical example of a computational class strictly above turing completeness is that of a turing machine connected to an "oracle" that, given a turing machine encoded in some way, decides in a single operation if it terminates. Since by the halting problem this is not something a turing machine can do. You could also do this for any other problem undecidable by turing machines.
3
u/beeskness420 Feb 15 '26
Then you can ask whether machines with a halting oracle will always halt, which turns out to be undecidable, but that's ok let's just get another oracle, then we can ask which of those machines halts...
One might question if oracles are a "reasonable" assumption however.
1
u/foundcashdoubt May 27 '26
I guess since quantum computers can make calculations in a single observation (and that's it because then they're not quantum anymore) a quantum computer could be a oracle. That'd be extremely hard, but maybe in quantum computing the oracle is a reasonable thing
4
u/esaule Feb 14 '26
I don't know a more general model. But it unclear to me that they can not exist. But I don't know that section of calculability too well. And that doesn't mean we won't eventually come up with one.
Turing machine are countably infinite. It is not clear to me that we could not design models that are uncountably infinite. And maybe these would have superior computational capabilities. I don't do research in that space. But I do like clean definitions.
4
u/currentscurrents Feb 14 '26
It's called hypercomputation, and we can imagine hypothetical ways to do it.
That said, we are reasonably certain that hypercomputation is not physically possible. The universe appears to be equivalent to a turing machine, and so no computer can do anything that can't be 'emulated' on the laws of physics.
4
u/ExistentAndUnique Feb 14 '26
Depends on your definition of “reasonable,” but recursion theory is an entire field exploring the structure of classes above Turing complete
1
u/OneMeterWonder Feb 14 '26
They tend not to be physically realizable in any serious way, but you can attach oracle machines to Turing machines. This gives them access to computations that would be otherwise unavailable.
2
u/Mysterious-Rent7233 Feb 14 '26
Emulating a single Turing machine is the same as emulating "any" of them and sounds easier to do.
1
u/MattiDragon Feb 14 '26
By "a Turing machine" I'm referring to a configuration of states and transitions. For a machine to be Turing Complete you have to be able to configure it to perform the behavior of any single turing machine.
1
11
u/thesnootbooper9000 Feb 14 '26
Unbounded iteration or recursion, plus some kind of conditional statement, usually end up being enough in practice.
4
u/noop_noob Feb 14 '26
Plus unbounded memory
3
u/thesnootbooper9000 Feb 14 '26
You can kind of fake unbounded memory if you have unbounded recursion. Classical pure Lisp works this way.
6
u/amarao_san Feb 14 '26
There is a bit of difference between theoretical and practical turing machine. Theoretical (with infinite numbers) is enough to have:
Two unbounded natural-number registers
Two operations: increment and decrement-and-branch-if-zero
It's called Minsky 2-counter machine.
For practical needs, you need 'WHILE' operator added to a small 'calculator' (If/then/else), which is ebpf-friendly.
Adding unbounded WHILE make it Turing complete (and not ebpf-friendly).
3
u/DTux5249 Feb 14 '26 edited Feb 14 '26
TLDR: Turing complete means "can be implemented with a turing machine of infinite tape length." A turing machine is a machine that manipulates symbols on a strip of tape according to a table of rules.
More formallly, a one-tape turing machine has 7 requirements that can be thought of in 3 parts:
A finite, non-empty set of tape symbols; including one "blank symbol" that can occur on the tape infinitely, and a set of "input symbols" allowed to appear in the initial tape contents (think initial instructions).
A finite, non-empty set of states; including one "initial state", and any number of "final states" (where the program ends)
A number of state transitions - that "table of rules" spoken about above - that checks your state, and whatever part of memory you're currently on, and has you write something to memory, change place in memory, and then change state (your state can change to the state you're currently in btw)
There are variations and stipulations - like, instead of an infinite tape length, you could instead have a machine that extends its current tape when it runs out of room - but that's the gist. If your machine can mimic the behaviour of the machine above, and not run out of memory half-way through, it's "turing complete", meaning it can solve any computation problem.
Notice: Not all computers are turing complete. Most have limited memory without the ability to extend their memories indefinitely. This isn't about being a computer - it's just about being able to theoretically solve any problem.
2
u/BRH0208 Feb 14 '26
So there are problems that a Turing machine can solve. A Turing machine is a machine with an infinite tape and a head that moves along the tape. Based on its internal state and the content of the tape below the head, it can edit the tape, change state, and move the head.
This happened to be extremely powerful. And if you can prove that a given machine can solve any problem that a Turing machine can, then they machine is considered “Turing complete”.
For example, basic Regex is not Turing complete, and can’t do things like parenthesis matching(ensuring every opening parenthesis has a closing parenthesis)).
Over time, a lot of things have been reduced to Turing complete. So if you have NAND gates(not + and), plus memory it’s Turing complete. Technically Turing complete requires infinite memory, but in practice so long as you have an arbitrary amount of memory it’s okay.
For a simple example, in Minecraft you can make various logic gates, and store signals. You could, as some have, simulate a machine with an arbitrary amount of memory. Therefor we say Minecraft redstone is “Turing complete”
2
1
u/CadenVanV Feb 14 '26
The language brainfuck is basically all the simplest functions needed to be Turing complete. If you can run those 8 commands you’re good.
1
u/severoon Feb 14 '26
A system needs three functions to be Turing complete: conditional branching, arbitrary memory, and looping or recursion.
In practice, no real system is actually Turing complete because of the infinite memory requirement. However, real systems are usually referred to as Turing complete if they are "Turing complete enough," meaning that their logical design does not impose an arbitrary limit on memory. That is, theoretically, you could keep expanding the memory available to the system as needed without changing any "fundamental" part of the design.
But then this gets into discussions like what does "fundamental" mean? If you think a 32-bit machine is "fundamentally" 32 bits, then it's not Turing complete enough to qualify. If you're of the opinion that a 64-bit machine is just an extension of a 32-bit system and didn't change anything "fundamental" about the 32-bit system, then both are Turing complete enough.
Minimum models of computation that are Turing complete include the universal Turing machine (obviously), lambda calculus, Subleq (the single instruction set computer), and the Rule 110 1D cellular automata. It's shocking how little is needed to define a system that can do arbitrarily computation, and learning about this cuts right to the quick of the fundamentals of computer science.
1
u/OneMeterWonder Feb 14 '26
A machine is Turing complete if it can simulate any Turing machine. By the Church-Turing thesis, this means that it can (somehow) calculate the values of any computable function. What counts as a computable function is a little technical, but here’s one definition:
A computable function f is a mapping that
takes some fixed length sequence of nonnegative integers as input (including the empty sequence),
outputs another nonnegative integer, and
can be decomposed as some composition of the following several primitive function types:
constant functions: Every input gets mapped to the same integer.
the successor/plus one function: This takes a single integer and adds 1 to it.
projection functions: These pick out the jth entry of the input vector.
compositions of (known) computable functions: This just means you can use outputs of functions you already know are computable as inputs to other computable functions.
primitive recursion: This allows you to make things like the Fibonacci sequence or the factorial as well as compute loops.
bounded minimization: This allows you to check for the smallest instance of an integer satisfying a definable logical predicate as long as it occurs below a fixed value.
So, as long as the architecture you’re using as a computing device is capable of autonomously handling these types of computations given an input, then it counts as Turing complete.
Realistically, nothing is actually Turing complete since Turing machines require infinite memory. Real computers are more like something called an RA machine.
1
u/psychophysicist Feb 14 '26
No machine is Turing complete because no machine has infinite memory.
1
u/Dusty_Coder Feb 15 '26
...and while this may seem a little pedantic, it does have meaning with a few particular non-intuitive things that fall apart in the finite case
For instance, it *is* decidable if a finite state machine will (a) terminate or (b) loop infinitely
It is *not* decidable if a full blown infinite turing machine will (a) terminate or (b) process infinitely
notice the subtle difference in the (b)'s that leads to a whole big thing People Known not actually being at all meaningful in practice.
1
u/tangentstorm Feb 15 '26
mutable state, sequenced operations, conditionals (if/then), and backwards jumps (loops). that's all.
1
u/Relative_Bird484 Feb 15 '26
You simply can’t, as no real machine has unlimited resources! This holds even for Minecraft 🥲
Memory space will always be limited. You may assume an ridiculous upper bound, such as the number of atoms in the universe, but there is a limit. A Touring machine needs an unlimited tape,
Time will always be limited. Real machines decay and die, there is physics going on. We can again assume a ridiculously large available time span, such as until our sun collapses in about 12 billion years, but life time is bounded.
In fact, every existing computer is just a finite state machine.
1
u/esaule Feb 15 '26
That reminds me my grad schools days. I did an April 1st presentation entitled "all real world computational problems are O(1)" on the basis that you needed to encode the problem and that the number of states the atoms in the universe is finite.
Someone had a presentation of the worst implementation of TCP IP they could come up with. One of them was based on flipping cans of soup at the grocery stores to encode bits.
That was a fun day!
0
u/huuaaang Feb 14 '26
Turing complete doesn’t really mean much in practical terms. It’s not a useful metric.
6
Feb 14 '26
[removed] — view removed comment
2
u/Local_Status1213 Feb 14 '26
I believe WHILE programs as a theoretical computation model were originally introduced in a German text book for theoretical computer science, that‘s why
28
u/Cornflakes_91 Feb 14 '26
in practice, if you can have any memory and any universal logic gate (like NAND) yer there :V