D
David Brown
O-level computer science class. The teacher held up a calculator, my
calculator as a matter of fact, which is why I remember the lesson.
"Is this a computer?". "No," said someone, "it doesn't have a memory".
It had a "mem" button, so he pressed it and showed it had a memory.
"No," he said, "it doesn't have a backing store. So sorry, McLean,
but not a computer". And he handed it back to me.
A computer has state, an internal memory of N bits, giving it 2^N
states, and it's got a backing store, usually a literal "tape head"
which is indeed moved up or down a position depending on the state
of the memory. So it's a Turing machine.
No. First off, a Turing machine is a computer - a computer is not a
Turing machine. Here are some pictures of Turing machines, since you
apparently don't like to look at Wikipedia for a formal definition:
<https://www.google.com/search?q=turing+machine&source=lnms&tbm=isch>
Secondly, there is no precise or concrete definition of a "computer",
except perhaps "something that computes". ("Computable functions" have
a precise definition.) Before electronic computers, a "computer" was a
person who did a lot of calculations. So your teacher got it wrong -
your calculator /is/ a computer, even though we generally use the term
for more general-purpose computers. Backing store certainly doesn't
come into it.
But it's not a universal Turing machine, not yet. In order to do
that, we've got to be able to adjust the backing store to put
it into any internal state we want, or at least a rich enough
subset of internal states to allow it to compute any function.
Your calculator is not a Turing machine. It is not approximately Turing
equivalent, because it has limitations (besides memory) that prevent it
from executing different algorithms. (A calculator with a user is
Turing equivalent, however.)
There is no such thing as a "universal Turing machine", though the term
is sometimes used - a Turing machine is unlimited, so there is no need
for a "universal" one. Conversely, one could talk about a "finite
Turing machine" with a limited memory.
So it needs a programming language. A computer in a random
internal state might not be able to be used as a universal
Turing machine, and in fact that frequently happens - a crashed
computer is in a state from which the rich set of internal
states are not accessible, regardless of what input we give it.
All the computers are Turing machines, they all have 2^N possible internal
states and a backing store.
How many mistakes can be made in one sentence, I wonder?
As I said above, computers are not Turing machines, any more than birds
are ducks.
There is absolutely no restriction to having 2^n possible states in a
computer - while base 2 representations are the most practical for
electronic computers, they are not essential. There have been computers
made using base 3 and base 5 elements, or whose states are enumerated as
decimals.
And as noted above, a backing store is not needed.
So they can all compute exactly the same
functions.
All Turing equivalent systems of computer and programming language can
compute the same functions (bare memory limitations).
So in the literal, narrow, mathematical sense, all programming
languages are equivalent.
No, all Turing complete or Turing equivalent programming languages (on
suitable targets) are equivalent in the single aspect of being able to
compute the same functions. They are not equivalent in "/the/
mathematical sense", because there is no such single thing - and they
will often be very different in real mathematical aspects, such as time
and space efficiency.
it's inherently impossible to write a program
in one language which cannot be written in another.
That is an alternative statement of the Church-Turing conjecture.
But what if we say the registers are the "internal state" of the computer,
and the main memory the "backing store". Now we've got a near Turing
machine, and usually it's better to think that way. So, as well as
having the fundamental, literal, mathematical equivalence, all non-
perverse (not designed to expose the fact that the main memory is
bounded), languages are going to have a another level of deep similarity.
First, there are lots of programming languages that are not perverse,
and are still not Turing complete. It is extremely common for
domain-specific languages.
Secondly, in many cases the Turing equivalence of programming languages
is /very/ deep. Yes, Prolog and APL /can/ compute the same functions -
but that is an irrelevant fact in practical usage, and the languages are
used for wildly different kinds of problems.
And there's far more similarity, because again few people who design
computers or computer languages are perverse.
I take it you have never met a computer or computer language designer.
Most of them are more than a little weird
Virtually all languages
are going to take advantage of the fact the main memory is not a
tape, but allows random access, for example. Yes, you could write a
perverse language that didn't, and call it something like "lisp" (to
indicate that it's a sort of sub-language). But very few people
use or write languages like that.
You have such a narrow view of programming languages. Have you ever
really looked at any programming languages other than C and perhaps
assembly?
Possibly. However I've used "theorem" in an acceptably accurate sense
for general discussion.
No you haven't - you have used it in an incorrect sense, and argued
repeatedly that you were being accurate despite being corrected.
I know that there's a lot of philosophical
work on the nature of mathematical proof and the relationship between
maths and formal logic which I don't understand. But I don't think
anyone except maybe Ben understands it either, and I wasn't trying to
go there.
Then accept it when people are telling you the correct terms to use.
There is nothing wrong with ignorance - even the oldies here don't know
everything. But there is something very wrong with wilful and stubborn
ignorance, and a refusal to accept that you have been corrected,
especially when it is all so easy to check.