# Is there a clear definition of "computable" for models of computation which are not turing complete?

This is a follow-up of another question here, and I hope it is not too philosophical. As Raphael pointed out in a comment on my previous question, I don't really get the definition of "computable", but according to some papers I read, the definition is also not really clear when it comes to models of computation weaker than turing machines because of the encoding of the input and output.

The typical definition of turing computable is as follows:

Definition 1: A function $f : \mathbb{N}^k \to \mathbb{N}$ is called turing computable iff there is a turing machine $M$ which computes $f$ using a suitable encoding of the natural numbers as strings.

The definitions differ in what exactly is a suitable encoding is, but most refer to binary encoding, unary encoding or decimal encoding as the one fixed and suitable encoding. It is also possible to show that fixing one encoding is required for the definition of turing computability. But what makes, say, binary encoding of natural numbers special so that we can axiomatize it as the one suitable encoding? Probably because it fits the intuitive notion of what computability means coincidentally.

Now what if we look at weaker models of computation than turing machines? For example, let's consider the set $M_c$ of "crippled" turing machines with the alphabet $\{0,1\}$ which may only move to the right, and a definition of crippled turing computable which is consistent with that of turing computability:

Definition 2: A function $f : \mathbb{N}^k \to \mathbb{N}$ is called crippled turing computable or computable in $M_c$ iff there is a crippled turing machine $M$ which computes $f$ using a suitable encoding of the natural numbers as a string.

If we define "suitable encoding" as "binary encoding", then the function $f : \mathbb{N} \to \mathbb{N}, n \mapsto n+1$ is not computable in $M_c$. If we axiomatize "suitable encoding" as "unary encoding", then $f$ is computable in $M_c$. This seems awkward given the fact that everyone may fix one of the infinitely many intuitive encodings at will. It should be clear if a computation model can compute $f$ or not without referring to some specific encoding - at least I have never seen anyone mention what encoding is used when stating "loop programs are weaker than turing machines".

After this introduction I can finally phrase my question: How would one define "suitable encodings" and "computability" for arbitrary models of computation which do not coincide with the intuitive notion of computability? Is this possible within the framework of turing computability?

Edit: I shortened the introduction, it didn't add to the question.

Some basic fact that you are missing here is that all the encodings that you mention are equivalent from the perspective of computability: there is a computable function mapping the binary encoding of a number to its unary encoding, or vice versa. Therefore for the sake of defining computability, it does not matter which of these encodings you choose for numbers. Just fix your favorite encoding.

Computability is at its core a property of string functions $f\colon \Sigma^* \to \Sigma^*$. When you define computability in any other domain, you have to fix an encoding. In practice, all "reasonable" encodings are equivalent in the sense of the preceding paragraph, so the exact encoding doesn't matter.

The encoding does, however, matter in restricted models of computation. To take an extreme example, suppose that you consider time-restricted Turing machines: say you want your machine to terminate in time $O(n^c)$ for some $c$, where $n$ is the length of the input (as a string). We can no longer switch between binary encoding and unary encoding, because binary encoding is much more compact. When we talk about a polynomial time computable function of integers, we specify that integers are encoded in binary. Even this is a somewhat arbitrary choice, since decimal encoding would lead to the same notion of polynomial time computability.

So to answer your question – the encoding is specified as part of the definition of the restricted model.

• "Some basic fact that you are missing here is that all the encodings that you mention are equivalent from the perspective of computability: there is a computable function mapping the binary encoding of a number to its unary encoding, or vice versa" - yeah, I had that in the original version of my question, but I cannot see how it is relevant for the question about weaker models. It is also clear that the encoding has to be specified as part of the model definition, but the question is how one can arrive at such a reasonable definition. Mar 4 '15 at 23:01
• One pulls this definition out of the hat. Since different definitions tend to be equivalent, the exact definition doesn't matter. When it does, there will be several different notions of complexity. For example, for some graph algorithms it makes a difference if you're given an adjacency matrix or a list of edges. Mar 4 '15 at 23:03
• So to summarize: a) The definition of each single computation model must include it syntax, semantics AND a suitable encoding. b) The definition of "suitable encoding" is completely independent of syntax and semantics of the model. c) There is no way to give a definition of "suitable encoding" which is valid for all models of computation. Is that correct? Mar 4 '15 at 23:44
• I agree with a) and b), but with c) only partially. You can define a suitable encoding which serves as the "standard encoding", used unless explicit mention of the fact is made. In the case of numbers, such a standard encoding exists – binary encoding. Mar 4 '15 at 23:49
• Alright, but that does not really constitute as a general definition, it just saves people's time because they don't have to explicity write down "In this model $M$, we use binary encoding" because it is implied if they don't write it down. They still might choose another encoding for their model. What I meant with "general definition" is a set of properties which each encoding must fulfil to be allowed as an encoding. Mar 4 '15 at 23:57

First of all, you cannot fix "suitable encoding" to be binary strings, or any other encoding. This is because you would loose too many models of computation, because different models of computation may have very different models of input and output. In other words, they may not "speak" strings.

For example, terms of the untyped lambda calculus are either variables, or the application of one term to another, or an abstraction of a lambda term. Input and output are terms, arbitrary strings. Still, the untyped lambda calculus is Turing-complete because there exists a "suitable encoding" which encodes natural numbers as lambda terms of a certain form, and under this encoding for each computable function there exists a lambda term which computes it.

You can formalize "suitable encoding" if you fix Turing machines as your reference model of computation, and then require that the encoding and decoding from and to binary strings must be carried out by a Turing machine which always halts. For example, a Turing machine would be able to translate a natural number as a binary string to a Lambda term which expresses this number, simulate the reduction in the lambda calculus, and translate the result back to a binary string.

For simpler models of computation I would expect the same approach: take a reference model of computation and fix an encoding of the natural numbers, and then make sure that the encoding and decoding is done by instances of that simple model. As you noted, for crippled Turing machines, using unary and binary encoded numbers would not yield an equivalent model of computation.

• Is it possible that you have things turned around in the last paragraph? You write that the encoding is done by the simple model, not the reference model - in the previous paragraph you want to have the encoding done by the reference model, not the other model (lambda calculus). Mar 4 '15 at 23:29
• If you are studying weaker models of computation you don't want to use Turing machines anywhere, not even in the encoding/decoding phase. Then you could just perform all computations in the encoding phase and about any model of computation would be Turing complete. So you need to use the simpler reference model for encoding/decoding. Mar 5 '15 at 6:31
• Then I do not see how we can prove the turing-completeness of lambda calculus with church numerals if we fix turing machines. We have to assume that LC is weaker than TM, so some instance of the "weaker" model lambda calc is given a number $n \in \mathbb{N}$ using its encoding $church : \mathbb{N} \to lambdaterm$ as $church(n)$, then computes its function $toBinary : lambdaterm \to lambdaterm$ which output a binary string $w \in \Sigma^*$? The codomains don't match. Even if I allow lambdaterms to be interpreted as strings, there are other models which do not "speak" strings, as you stated. Mar 5 '15 at 14:07