1
$\begingroup$

A model of computation is currently defined on wikipedia as:

a model which describes how an output of a mathematical function is computed given an input.

Is it therefore correct, at least as a rough approximation, to conceive of a model of computation as "reverse engineering a function"?

$\endgroup$

1 Answer 1

2
$\begingroup$

The Wikipedia definition is rather hard to understand, since it isn't formal. If you're looking for an informal definition, you should think of a model of computation as synonymous with a programming language. There is absolutely no connection to reverse engineering.

In theory of computation, we are often interested in computing Boolean functions on strings. That is, the function gets as input some string, and outputs either Yes or No. For simplicity, let us assume that the input is a binary string, and the output is a bit which represents the answer.

A model of computation specifies how programs correspond to functions. Assuming that a program is also a binary string, a model of computation is a function $M$ that accepts as input two binary strings, a program and an input, and outputs a single bit. The function computed by a program $p$ is given by $x \mapsto M(p,x)$.

For example, we can take as our model of computation the C language, with some input/output convention in which the input is a binary string and the output is a bit. The value of $M(p,x)$ is then the output of the C program $p$ when run on the input $x$ (if $p$ is not valid, we can let $M(p,\cdot)$ compute some arbitrary fixed function, say $M(p,x) = 0$).

The most popular model of computation in theory of computation classes is the Turing machine model (which is actually a collection of closely related models). When describing algorithms, we are usually implicitly working over a different model of computation, the RAM machine (once again, really a class of similar models).

All reasonable models of computation are equivalent in the sense that they define the same set of functions, known as the computable functions (another term is recursive functions). They differ in the resources needed to compute functions, what is known as computational complexity.

$\endgroup$
1
  • $\begingroup$ Thanks a lot Yuval ! That was very helpful 🙏🏻 $\endgroup$
    – mgris
    Commented Nov 1, 2021 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.