4
$\begingroup$

Possible Duplicate:
Are there minimum criteria for a programming language being Turing complete?

I overheard a conversation on the topic and the conclusion that one gent came to was that in order to be Turing complete, given one has infinite storage, all one needs is a conditional control structure and a jump instruction.

Is this true?

If it is true, and Turing completeness requires that the language that is Turing complete be able to simulate every instruction available in another Turing complete language, how do those two simple elements achieve that?

$\endgroup$

marked as duplicate by Kaveh, Patrick87 Jun 25 '12 at 3:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from cstheory.stackexchange.com Jun 25 '12 at 1:54

This question came from our site for theoretical computer scientists and researchers in related fields.

  • 1
    $\begingroup$ Voting to close as off-topic, since it's outside the scope defined in the FAQ. Better fit for programmers.se. $\endgroup$ – Anthony Grist Jun 21 '12 at 13:42
  • $\begingroup$ this is actually a very, very difficult problem to answer formally. computer science generally only can answer that there are turing-complete systems, which vary widely in their properties, and non-turing complete systems. you give sufficient conditions. however what is "necessary" seems to be an active area of research.... at a minimum there does need to be an infinite tape or memory or storage, but that alone is not sufficient. one way/angle to study this is through small-state-table machines, some of which are very tiny & have been found to be turing complete. $\endgroup$ – vzn Jun 24 '12 at 17:50
  • $\begingroup$ some people argue that Post correspondence systems seem like one of the "simplest" formulations of Turing completeness but that is ultimately a subjective argument. $\endgroup$ – vzn Jun 24 '12 at 17:52
  • 1
    $\begingroup$ Languages are not called Turing-conplete, models of computation are. $\endgroup$ – Tyson Williams Jun 24 '12 at 21:15
  • 1
    $\begingroup$ @Abdul Programming languages expose aspects of the underlying model of computation in higher level concepts to make it easier for humans to use the model of computation. Thus, one can say that a language is Turing Complete if its underlying model of computation is Turing complete and the language exposes "enough". Like others, I also speak of a language being Turing Complete or not when speaking informally. Your quoted sentence does so as well. However, for a question (originally) posted on TCS.SE, we should not be informal like that. Programming paradigms are unrelated to this. $\endgroup$ – Tyson Williams Sep 16 '16 at 13:11
3
$\begingroup$

The machine you describe would be turing complete with the addition of an assignment operator (you need this to take advantage of memory), and at least one comparison operator (which could be folded into the jump, like a jump-if-(not)-zero). (Note that an increment operator is necessary - either as a primitive, or appropriate representations need to be available such that one can roll ones own).

However, there are many turing-complete models of computation with completely different primitive operations, such as lambda calculus, or petri nets.

$\endgroup$
  • 1
    $\begingroup$ And an arithmetic operator - assignment without arithmetic can't do much. The whole thing can be rolled into a single instruction. $\endgroup$ – Peter Taylor Jun 24 '12 at 19:23
  • $\begingroup$ @PeterTaylor You can create an increment operator with only the above, as long as you have a finite number of possible digits per position in the representation (e.g. each cell represents a single bit). $\endgroup$ – Marcin Jun 24 '12 at 19:41
  • $\begingroup$ My apologies: I overlooked your mention of an increment operator. And actually it has since occurred to me that with the "conditional control structure", if the memory cells have finite storage you can omit arithmetic operators in favour of enormous case statements. The real problem is then how to address all the memory. $\endgroup$ – Peter Taylor Jun 25 '12 at 12:16
  • $\begingroup$ @PeterTaylor I only added the note about the increment operator after your comment, so thank you for that. $\endgroup$ – Marcin Jun 25 '12 at 13:33
2
$\begingroup$

The more abstract answer which captures the requirements on both imperative-style programming (suitable for hardware register machines) and functional-style programming (suitable for dataflow and graph reduction machines) is that your language must be able to

  1. represent bit strings of arbitrary lengths

  2. express a partial recursive function (to simplify, a partial recursive function is a computation where the number of steps in a repetition may not be known before an arbitrary number of iterations have been run already)

Theoretical Turing machines have #1 by means of the tape, and #2 by means of the states and conditional state transitions. Pure Lambda calculus has #1 by means of lambda-terms of arbitrary lengths, and #2 by means of partial evaluation of fixed point combinators and the truth functions.

In general, if your execution platform "looks like" a Turing machine in that it has a memory for strings and instructions for state transitions, it intuitively satisfies #1 so that does not need discussion. The main question that remains is how to deal with partial recursive functions. A conditional branch and a stack pointer are a way to do it, but other ways are possible as well.

$\endgroup$
1
$\begingroup$

Yep, it's true. I can describe Turing machine made of endless paper, alphabet and instructions, but in Russian language only, so I can only give you this link to Wiki page about Turing machine - complete language you are talking about.

$\endgroup$