Tangled Tapes: Infinity, Interaction and Turing Machines
Total Page:16
File Type:pdf, Size:1020Kb
Tangled Tapes: Infinity, Interaction and Turing Machines Paul Cockshott(1), Greg Michaelson(2) (1) School of Computer Science, University of Glasgow, Sir Alwyn Williams Building, Lilybank Gds, Glasgow, Scotland, G12 8QQ [email protected] (2) School of Mathematical and Computer Sciences, Heriot-Watt University, Riccarton, Scotland, EH14 4AS [email protected] Key words:Turing machine, tape, infinite, interaction Abstract. In the sixty-five years since Turing introduced his eponymous machines, many popular misconceptions about their properties have be- come current. In this paper, we explore the notions that Turing machines have infinite tapes and that their expressive power is limited by by an inability to interact with the wider environment during computations. 1 Introduction As time passes since the death of a great scientist, they become better known. More people have heard of them, and more people have heard of their work. But it does not follow that more people actually know their work or still read it. Newton like Darwin and Freud is still famous, but how many still read Newton in the original? As time passes their work becomes known at second or third hand, and in the process is changed. Things are omitted, and things which, whilst they were the result of the great author’s work, were other’s ideas, are attributed to them. For instance one of us who was brought up on Dawkins and Gould, with their accounts of the opposition between Darwinian and Lamarkian evolution, was surprised to discover in Darwin’s Descent of Man[4] that he was a firm believer in the inheritance of acquired characteristics. A later, post Mendel, orthodoxy has been projected back onto Darwin. One encountered not the original Darwin, but a stylised version, modified by more recent concerns. Turing, who is so much more recent than Darwin and whose publications were much less extensive, is already showing signs of being transformed in a similar way. Far more computer scientists have read accounts of the Turing Machine in textbooks than have read his original description, and as a result a number of misconceptions have taken hold. In this paper, we explore two misconceptions about properties of Turing machine tapes, that is that they are infinite and that they may not be subject to external change during computations. 2 Finite and infinite tapes There is a widespread notion that Turing machines have infinite tapes. However, in Turing’s original paper[18] there is no mention of the tape having to be infinite; instead Turing says: "The machine is supplied with a “tape”, (the analogue of paper) running through it, and divided into sections (called “squares”) each capable of bearing a “symbol”. At any moment there is just one square, say the r-th, bearing the symbol S(r) which is “in the machine”". The length of the tape is not specified. The tape is not specified as infinite, and, since he is concerned with finite computation, it is clear that any terminating programme will have only modified a finite portion of the tape, so what he was assuming was effectively a finite but unbounded tape. An infinite tape would also have required an infinite amount of energy to accelerate and decelerate it on each step and would thus have been incompatible with requirement that computable numbers be "calculable by finite means". It is possible that this notion of an infinite Turing machine tape arose from the independent elaboration of Emil Post’s eponymous machine[16] at around the same time. Post also uses the analogy of a “problem solver or worker” manipulating “spaces or boxes” but “the symbol space is to consist of a two way infinite sequence. Perhaps more significantly, in 1947 Turing said in a lecture that, some years earlier, he had been investigating the problem of machines with “an infinite memory contained on an infinite tape”[20]. It is not clear whether he was misrecollecting what he published in [18] or referring to unpublished investigations. to be infinite but had at least to be ’very extensive’. It is probably from this lecture by Turing himself, that the idea that the original Turing Machine required an infinite memory arose. In practice this difference between infinite and finite but unbounded memories is not important. We know that in reality all our digital com- puters are finite machines, but such is the vastness of the finite, that even a tiny embedded microprocessor like the PIC with a paltry 68 bytes of RAM has so many potential states that it would take about 2450 times the age of the universe to run through them all. What is important for a general purpose digital computer is that its memory be ’exten- sive’ and that this memory is modifiable during programme execution. The size of the memory is important, bur only insofar as size constrains the datasets that can be practically processed. The organisation of the memory, whether it has random or sequential access, is also of practical importance, since random access stores are faster than sequential access ones. But neither the size nor the organisation affect the type of problem that the computer can address. Machines such as the ACE may be regarded as practical ver- sions of this same type of machine. There is at least a very close analogy. Digital computing machines all have a central mecha- nism or control and some very extensive form of memory. The memory does not have to be infinite, but it certainly needs to be very large.[20] Subsequently, there is a curious divergence in accounts of Turing machine tapes in books on computability theory. In a collection of twenty two such books held by one author, eleven refer directly or obliquely to the tape as infinite - see Figure 3. These include the classic texts by Davis[5], “two-way infinite sequence”(p3), Hopcroft and Ullman[10], “infinity of cells”(1969), Manna[13],“The tape...is infinite to the right”(p228), and Harel[9], “an infinite tape”(p21). Finally, Minsky[14] offers a compromise: “The tape is regarded as infinite in both directions. But...one can think of the tape as really finite at any particular time.”(p118) 3 Interaction and Computation The infinite tape seems to have been the first stylisation of the Turing’s universal computer. A more recent stylisation is the idea that according to Turing, universal computers are not allowed to perform input out- put. Wegner proposes that Turing Machines correspond to the batch mainframes running procedural languages, and that workstations run- ning object oriented languages correspond to an entirely new class of machines which he calls interaction machines. Turing machines transform strings of input symbols on a tape into output strings by sequences of state transitions. Each step reads a symbol from the tape, performs a state transition, writes a symbol on the tape, and moves the reading head. Turing ma- chines cannot, however, accept external input while they com- pute; they shut out the external world and are therefore unable to model the passage of external time.[22] We will consider the two issues of input output and the passage of time separately. If one looks at Turing’s 1937 paper the tape is both the input output device and the read write store. The lack of any dedicated input output hardware in the 1937 proposal could clearly have been circumvented by appropriate programming. One could arrange that say every 3rd square on the tape was to be reserved for input data, and allow the programmer to write input data onto these 3rd squares as the computation proceeds. These 3rd squares would then constitute an input channel multiplexed onto the tape. Allow the input channel to contain blanks, Xs, 0s or 1s,. Once a 0 or 1 has been read from the input channel the machine overwrites it with an X. The machine can poll for input by inspecting the next character in the input channel, if it is blank, move back a certain number of positions to eject the tape and allow the programmer to optionally write a 0 or 1 on the square and then repeat. Obviously we would have to arrange the machine to run slow enough that there was time to write on the tape, but this does not affect the essence of the argument. We have to ask if the lack of dedicated input output was a significant feature of Turing’s ideas. We would argue that the key computational innovation he was concerned with in [18] was the Universal Computer, the computer that could emulate any other computer, and thus perform any computation. Special purpose computing machines were well known prior to Turing[17,8,6,11,7]. What was new, or at least a recovery of Babbage[12], in [18] was the idea of the Universal Computer. It is the implementation of this universality that has led to the subsequent success of the computer industry, since it allows a single design of machine to be applied to an arbitrary number of tasks. It can be shown that a single special machine of that type can be made to do the work of all. lt could in fact be made to work as a model of any other machine. The special machine may be called the universal machine, it works in the following quite simple manner. When we have decided what machine we wish to imitate we punch a description of it on the tape of the universal machine. This description explains what the machine would do in every configuration in which it might find itself. The universal machine has only to keep looking at this description in order to find out what it should do at each stage.