<p>What does the expression "Turing Complete" mean? </p>

<p>Can you give a simple explanation, without going into too many theoretical details?</p>

[{'answer_id': 7290, 'author': 'Ran Biron', 'author_id': 931, 'author_profile': 'https://Stackoverflow.com/users/931', 'pm_score': 6, 'selected': False, 'text': '<p>From <a href="http://en.wikipedia.org/wiki/Turing_completeness" rel="noreferrer">wikipedia</a>:</p>\n\n<blockquote>\n  <p>Turing completeness, named after Alan\n  Turing, is significant in that every\n  plausible design for a computing\n  device so far advanced can be emulated\n  by a universal Turing machine — an\n  observation that has become known as\n  the Church-Turing thesis. Thus, a\n  machine that can act as a universal\n  Turing machine can, in principle,\n  perform any calculation that any other\n  programmable computer is capable of.\n  However, this has nothing to do with\n  the effort required to write a program\n  for the machine, the time it may take\n  for the machine to perform the\n  calculation, or any abilities the\n  machine may possess that are unrelated\n  to computation.</p>\n  \n  <p>While truly Turing-complete machines\n  are very likely physically impossible,\n  as they require unlimited storage,\n  Turing completeness is often loosely\n  attributed to physical machines or\n  programming languages that would be\n  universal if they had unlimited\n  storage. All modern computers are\n  Turing-complete in this sense.</p>\n</blockquote>\n\n<p>I don\'t know how you can be more non-technical than that except by saying "turing complete means \'able to answer computable problem given enough time and space\'".</p>\n'}, {'answer_id': 7320, 'author': 'Mark Harrison', 'author_id': 116, 'author_profile': 'https://Stackoverflow.com/users/116', 'pm_score': 10, 'selected': True, 'text': "<p>Here's the briefest explanation:</p>\n<p>A Turing Complete system means a system in which a program can be written that will find an answer (although with no guarantees regarding runtime or memory).</p>\n<p>So, if somebody says &quot;my new thing is Turing Complete&quot; that means in principle (although often not in practice) it could be used to solve any computation problem.</p>\n<p>Sometimes it's a joke... a guy wrote a Turing Machine simulator in vi, so it's possible to say that vi is the only computational engine ever needed in the world.</p>\n"}, {'answer_id': 17509, 'author': 'Brian Leahy', 'author_id': 580, 'author_profile': 'https://Stackoverflow.com/users/580', 'pm_score': 2, 'selected': False, 'text': '<p>I think the importance of the concept "Turing Complete" is in the the ability to identify a computing machine (not necessarily a mechanical/electrical "computer") that can have its processes be deconstructed into "simple" instructions, composed of simpler and simpler instructions, that a Universal machine could interpret and then execute.</p>\n\n<p>I highly recommend The Annotated Turing</p>\n\n<p>@Mark i think what you are explaining is a mix between the description of the Universal Turing Machine and Turing Complete.</p>\n\n<p>Something that is Turing Complete, in a practical sense, would be a machine/process/computation able to be written and represented as a program, to be executed by a Universal Machine (a desktop computer).  Though it doesn\'t take consideration for time or storage, as mentioned by others.</p>\n'}, {'answer_id': 878771, 'author': 'Waylon Flinn', 'author_id': 74291, 'author_profile': 'https://Stackoverflow.com/users/74291', 'pm_score': 4, 'selected': False, 'text': '<p>Turing Complete means that it is at least as powerful as a <a href="http://en.wikipedia.org/wiki/Turing_machine" rel="noreferrer">Turing Machine</a>. This means anything that can be computed by a Turing Machine can be computed by a Turing Complete system.</p>\n\n<p>No one has yet found a system more powerful than a Turing Machine. So, for the time being, saying a system is Turing Complete is the same as saying the system is as powerful as any known computing system (see <a href="https://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis" rel="noreferrer">Church-Turing Thesis</a>).</p>\n'}, {'answer_id': 1522882, 'author': 'ChrisC', 'author_id': 184658, 'author_profile': 'https://Stackoverflow.com/users/184658', 'pm_score': -1, 'selected': False, 'text': '<p>As <a href="https://stackoverflow.com/questions/7284/what-is-turing-complete/878771#878771">Waylon Flinn said</a>:</p>\n\n<blockquote>\n  <p>Turing Complete means that it is at least as powerful as a Turing Machine.</p>\n</blockquote>\n\n<p>I believe this is incorrect, a system is Turing complete if it\'s exactly as powerful as the Turing Machine, i.e. every computation done by the machine can be done by the system, but also every computation done by the system can be done by the Turing machine.</p>\n'}, {'answer_id': 1610655, 'author': 'Gordon Gustafson', 'author_id': 89989, 'author_profile': 'https://Stackoverflow.com/users/89989', 'pm_score': 7, 'selected': False, 'text': '<h2>Informal Definition</h2>\n\n<p>A Turing complete language is one that can perform any computation. The <a href="https://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis" rel="noreferrer">Church-Turing Thesis</a> states that any performable computation can be done by a Turing machine. A <a href="https://en.wikipedia.org/wiki/Turing_machine" rel="noreferrer">Turing machine</a> is a machine with infinite random access memory and a finite \'program\' that dictates when it should read, write, and move across that memory, when it should terminate with a certain result, and what it should do next. The input to a Turing machine is put in its memory before it starts.</p>\n\n<h2>Things that can make a language NOT Turing complete</h2>\n\n<p><strong>A Turing machine can make decisions based on what it sees in memory</strong> - The \'language\' that only supports <code>+</code>, <code>-</code>, <code>*</code>, and <code>/</code> on integers is not Turing complete because it can\'t make a choice based on its input, but a Turing machine can.</p>\n\n<p><strong>A Turing machine can run forever</strong> - If we took Java, Javascript, or Python and removed the ability to do any sort of loop, GOTO, or function call, it wouldn\'t be Turing complete because it can\'t perform an arbitrary computation that never finishes. <a href="https://en.wikipedia.org/wiki/Coq" rel="noreferrer">Coq</a> is a theorem prover that can\'t express programs that don\'t terminate, so it\'s not Turing complete.</p>\n\n<p><strong>A Turing machine can use infinite memory</strong> - A language that was exactly like Java but would terminate once it used more than 4 Gigabytes of memory wouldn\'t be Turing complete, because a Turing machine can use infinite memory. This is why we can\'t actually <em>build</em> a Turing machine, but Java is still a Turing complete language because the Java <em>language</em> has no restriction preventing it from using infinite memory. This is one reason regular expressions aren\'t Turing complete.</p>\n\n<p><strong>A Turing machine has random access memory</strong> - A language that only lets you work with memory through <code>push</code> and <code>pop</code> operations to a stack wouldn\'t be Turing complete. If I have a \'language\' that reads a string <em>once</em> and can only use memory by pushing and popping from a stack, it can tell me whether every <code>(</code> in the string has its own <code>)</code> later on by pushing when it sees <code>(</code> and popping when it sees <code>)</code>. However, it can\'t tell me if every <code>(</code> has its own <code>)</code> later on <em>and</em> every <code>[</code> has its own <code>]</code> later on (note that <code>([)]</code> meets this criteria but <code>([]]</code> does not). A Turing machine can use its random access memory to track <code>()</code>\'s and <code>[]</code>\'s separately, but this language with only a stack cannot.</p>\n\n<p><strong>A Turing machine can simulate any other Turing machine</strong> - A Turing machine, when given an appropriate \'program\', can take another Turing machine\'s \'program\' and simulate it on arbitrary input. If you had a language that was forbidden from implementing a Python interpreter, it wouldn\'t be Turing complete.</p>\n\n<h2>Examples of Turing complete languages</h2>\n\n<p>If your language has infinite random access memory, conditional execution, and some form of repeated execution, it\'s probably Turing complete. There are more exotic systems that can still achieve everything a Turing machine can, which makes them Turing complete too:</p>\n\n<ul>\n<li>Untyped lambda calculus</li>\n<li>Conway\'s game of life</li>\n<li>C++ Templates</li>\n<li>Prolog</li>\n</ul>\n'}, {'answer_id': 8283566, 'author': 'Shelby Moore III', 'author_id': 615784, 'author_profile': 'https://Stackoverflow.com/users/615784', 'pm_score': 4, 'selected': False, 'text': '<p>Fundamentally, Turing-completeness is one concise requirement, unbounded recursion.</p>\n\n<p>Not even bounded by memory.</p>\n\n<p>I thought of this independently, but <a href="http://lambda-the-ultimate.org/node/2846#comment-42117" rel="nofollow noreferrer">here is some discussion</a> of the assertion. <a href="https://stackoverflow.com/q/8279878">My definition of LSP</a> provides more context.</p>\n\n<p>The other answers here don\'t directly define the fundamental essence of Turing-completeness.</p>\n'}, {'answer_id': 13894983, 'author': 'Akshay Jain', 'author_id': 1906712, 'author_profile': 'https://Stackoverflow.com/users/1906712', 'pm_score': -1, 'selected': False, 'text': '<p>Can a relational database input latitudes and longitudes of places and roads, and compute the shortest path between them - no.  This is one problem that shows SQL is not Turing complete.</p>\n\n<p>But C++ can do it, and can do any problem.  Thus it is.</p>\n'}, {'answer_id': 25213367, 'author': 'Shelby Moore III', 'author_id': 615784, 'author_profile': 'https://Stackoverflow.com/users/615784', 'pm_score': 3, 'selected': False, 'text': "<p>In the simplest terms, a Turing-complete system can solve any possible computational problem.</p>\n\n<p>One of the key requirements is the scratchpad size be unbounded and that is possible to rewind to access prior writes to the scratchpad.</p>\n\n<p>Thus in practice no system is Turing-complete.</p>\n\n<p>Rather some systems approximate Turing-completeness by modeling unbounded memory and performing any possible computation that can fit within the system's memory.</p>\n"}, {'answer_id': 37247136, 'author': 'Raja Rao', 'author_id': 1553014, 'author_profile': 'https://Stackoverflow.com/users/1553014', 'pm_score': 8, 'selected': False, 'text': '<p><strong>Here is the simplest explanation</strong></p>\n<p>Alan Turing created a machine that can take a program, run that program, and show some result. But then he had to create different machines for different programs. So he created &quot;Universal Turing Machine&quot; that can take ANY program and run it.</p>\n<p>Programming languages are similar to those machines (although virtual). They take programs and run them. Now, a programing language is called &quot;Turing complete&quot;, if it can run any program (irrespective of the language) that a Turing machine can run given enough time and memory.</p>\n<p>For example: Let\'s say there is a program that takes 10 numbers and adds them. A Turing machine can easily run this program. But now imagine that for some reason your programming language can\'t perform the same addition. This would make it &quot;Turing incomplete&quot; (so to speak). On the other hand, if it can run any program that the universal Turing machine can run, then it\'s Turing complete.</p>\n<p>Most modern programming languages (e.g. Java, JavaScript, Perl, etc.) are all Turing complete because they each implement all the features required to run programs like addition, multiplication, if-else condition, return statements, ways to store/retrieve/erase data and so on.</p>\n<p>Update: You can learn more on my blog post: <a href="https://medium.freecodecamp.com/javascript-is-turing-complete-explained-41a34287d263#.6t0b2w66p" rel="noreferrer">&quot;JavaScript Is Turing Complete&quot;\u200a—\u200aExplained</a></p>\n'}, {'answer_id': 40271344, 'author': 'Keith Douglas', 'author_id': 1695472, 'author_profile': 'https://Stackoverflow.com/users/1695472', 'pm_score': -1, 'selected': False, 'text': '<p>In practical language terms familiar to most programmers, the usual way to detect Turing completeness is if the language allows or allows the simulation of nested unbounded while statements (as opposed to Pascal-style for statements, with fixed upper bounds).</p>\n'}, {'answer_id': 60746930, 'author': 'Richard Riehle', 'author_id': 12875480, 'author_profile': 'https://Stackoverflow.com/users/12875480', 'pm_score': 0, 'selected': False, 'text': '<p>A Turing Machine requires that any program\ncan perform condition testing.  That is fundamental.</p>\n<p>Consider a player piano roll.  The player piano can\nplay a highly complicated piece of music,\nbut there is never any conditional logic in the\nmusic.  It is <strong>not</strong> Turing Complete.</p>\n<p>Conditional logic is both the power and the\ndanger of a machine that is Turing Complete.</p>\n<p>The piano roll is guaranteed to halt every time.\nThere is no such guarantee for a TM. This\nis called the “halting problem.”</p>\n'}, {'answer_id': 66260625, 'author': 'Glenn Mohammad', 'author_id': 2013891, 'author_profile': 'https://Stackoverflow.com/users/2013891', 'pm_score': 3, 'selected': False, 'text': '<p>Super-brief summary from what Professor Brasilford explains in this <a href="https://youtu.be/RPQD7-AOjMI" rel="nofollow noreferrer">video</a>.</p>\n<p>Turing Complete ≅ do anything that a Turing Machine can do.</p>\n<ol>\n<li><p>It has <strong>conditional branching</strong> (i.e. &quot;if statement&quot;). Also, implies &quot;go to&quot; and thus permitting loop.</p>\n</li>\n<li><p>It gets <strong>arbitrary amount of memory</strong> (e.g. long enough tape) that the program needs.</p>\n</li>\n</ol>\n'}, {'answer_id': 67037495, 'author': 'Patrick87', 'author_id': 847269, 'author_profile': 'https://Stackoverflow.com/users/847269', 'pm_score': -1, 'selected': False, 'text': '<p>We call a language Turing-complete if and only if (1) it is decidable by a Turing machine but (2) not by anything less capable than a Turing machine. For instance, the language of palindromes over the alphabet {a, b} is decidable by Turing machines, but also by pushdown automata; so, this language is not Turing-complete. Truly Turing-complete languages - ones that require the full computing power of Turing machines - are pretty rare. Perhaps the language of strings x.y.z where x is a number, y is a Turing-machine and z is an initial tape configuration, and y halts on z in fewer than x! steps - perhaps that qualifies (though it would need to be shown!)</p>\n<p>A common imprecise usage confuses Turing-completeness with Turing-equivalence. Turing-equivalence refers to the property of a computational system which can simulate, and which can be simulated by, Turing machines. We might say Java is a Turing-equivalent programming language, for instance, because you can write a Turing-machine simulator in Java, and because you could define a Turing machine that simulates execution of Java programs. According to the Church-Turing thesis, Turing machines can perform any effective computation, so Turing-equivalence means a system is as capable as possible (if the Church-Turing thesis is true!)</p>\n<p>Turing equivalence is a much more mainstream concern that true Turing completeness; this and the fact that &quot;complete&quot; is shorter than &quot;equivalent&quot; may explain why &quot;Turing-complete&quot; is so often misused to mean Turing-equivalent, but I digress.</p>\n'}]
['https://Stackoverflow.com/questions/7284', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/198/']