Top Banner

Click here to load reader

Nick Thomas honors thesis

Oct 28, 2014

ReportDownload

Documents

Is interactive computation a superset of Turing computation?Nick Thomas September 21, 2012Abstract Modern computers interact with the external environment in complex ways for instance, they interact with human users via keyboards, mouses, monitors, etc., and with other computers via networking. Existing models of computation Turing machines, -calculus functions, etc. cannot model these behaviors completely. Some additional conceptual apparatus is required in order to model processes of interactive computation.

1

Introduction

It is generally believed that everything that computers do can be done by Turing machines. We believe that, for every task that a computer can carry out, we can write a Turing machine that does the same thing. Recently this belief has been challenged by proponents of the interactive paradigm of computing. They claim that there are a class of computations, called interactive computations, which computers can perform, but which Turing machines cannot perform. See, for example, Goldin and Wegner [2005], Goldin and Wegner [2008], Eberbach et al. [2004], van Leeuwen and Wiedermann [2001], Dodig-Crnkovic [2011], Smolka et al. [2006]. Interactive computations are computations which involve the computing device receiving input, and producing output, while in the middle of computation. The idea is that a Turing machine cannot perform these computations, because it can only receive input and produce output at the beginning and at the end of its computations. Recall that a Turing machines input is simply the contents of its tape when it starts running. Its output is simply the contents of its tape when it stops running. The concept of a Turing machine contains no provision for receiving input, or giving output, while in the middle of computation. It starts with its input, it performs its computation, and it ends with its output. This means that there are certain computer programs which Turing machines cannot implement. Goldin and Wegner [2008] give the example of a computer program designed to drive a car from one location to another. The program must 1

take input from the environment (the movements of other cars, the movements of pedestrians, trac signals, etc.) and respond to this input by giving instructions to the car to change its behavior in various ways (turning, accelerating, braking, etc.). This program, by its nature, requires taking input from the environment and giving output to the environment while in the middle of computation. A computer can implement this program; a Turing machine cannot. The reason that a Turing machine cannot implement this program is that a Turing machine cannot take new input while it is running. It must take all of its input at the start of computation, and produce all of its output at the end of computation. So in order to implement a driving program with a Turing machine, it would have to be the case that it was possible to supply all of the information about the environment before the computation began, run the computation, and then carry out all of the driving instructions after the computation was nished. But this is not possible, because what happens in the environment is dependent upon the instructions the computer gives to the car; so the environmental information at a given moment is unknown until the driving instructions of the previous moment have already been carried out. Other examples of programs like this are programs which interact with human users, robotics programs, and programs which dynamically interact with other programs over the Internet (e.g., web servers). The interactive view of computation says that all of these programs are examples of interactive computations, and that none of them can be implemented by Turing machines. Every behavior that Turing machines can implement can be thought of as computing a mathematical function. The behaviors of computers which Turing machines cannot implement are behaviors which cannot be thought of as computing a mathematical function. These behaviors involve interacting with processes outside the computation while the computation is running. Various formal models of interactive computation exist. These include the -calculus [Milner, 1999] and persistent Turing machines [Goldin, 2000, Goldin et al., 2004]. These models oer a rigorous way to talk about interactive computation. However, as we will see, we do not need to depart completely from existing computational paradigms in order to model interactive computation. It is sucient to augment existing models (e.g., Turing machines) with additional conceptual apparatus. We can reinterpret existing work on interactive computation in these terms.

1.1

Turing machines

Turing machines are a mathematical model which formalizes the concept of computation. They were invented by Alan Turing as a way of studying the mathematical properties of computers and things like computers. A Turing machine consists of a tape, a tape head, and a set of state transition rules. The tape is a series of squares, each of which may be blank, or contain a symbol. The tape is unbounded in length in one direction, to the right. The 2

tape head is located at a denite position on the tape at any given time, and it is capable of reading the symbol in the square it stands over, and writing a new symbol into that square. There is a set of states, representing steps in the algorithm the Turing machine executes. The states include one starting state, and one halting state. The state transition rules specify what the Turing machine may do in each state. A state transition rule says something of the form, if you are in state s and the symbol under the tape head is c, then transition to state t and perform this action. The action may be one of, move the tape head left, move the tape head right, or write the symbol d under the tape head. So a Turing machine is similar to a computer, except that it is extremely spartan in its basic design. Every Turing machine can be thought of as computing some mathematical function. We can think of the contents of the tape when the machine starts running as the input to the function; and we can think of the contents of the tape when the machine halts as the output of the function. If there exists a Turing machine which can compute any value of a given function in nite time, then that function is said to be Turing-computable. Most mathematical functions are Turing-computable, but it is known that there are some functions which are not. For instance, no Turing machine can solve the halting problem: that is, the problem of determining whether or not an arbitrary Turing machine, with an arbitrary input, will eventually halt. As another example, no Turing machine can compute the busy beaver function, discovered by Rad [1962]. The busy beaver function (n) is (roughly) o the largest number that can be written out by a Turing machine with n distinct states. It is clear that no Turing machine can compute the busy beaver function. Such a TM would need to have k states for some k, but it would output (k +1) when given k + 1 as input. However, by denition, the largest number it can possibly output is (k), leading to a contradiction. Let us nish by giving the set-theoretic denition of a Turing machine, as may be found, e.g., in Bridges [1994]. Denition 1.1.1. A Turing machine M = (K, , , s0 ) is: A nite set K of states. A nite alphabet , including the blank symbol # and not including L or R. A transition function K (K {h}) ( {L, R}). s0 K is the initial state. h K is the halting state.

We describe the state of a Turing machine at a given time using a structure called a conguration. The conguration says what state the Turing machine

3

is in, what the contents of its tape are, and where the tape head is located on the tape. Denition 1.1.2. A conguration C = (s, w, n) of M is: s K {h}, the state of M. w , the contents of Ms tape.1 n N, the position of Ms tape head.

Now we need to describe the way that the Turing machines conguration changes over time. We dene a relation C C , read C yields C , meaning that if the Turing machine is in conguration C, its next computational step will leave it conguration C . Denition 1.1.3. Let M be a Turing machine, and C, C two congurations of M: C = (s, w, n), C = (s , w , n ). Then C C i: (s, w[n], s , c) , c ; n = n + 1 if c = R, n = n 1 if c = L and n 1, n = n otherwise; w = w if c {L, R}, w = w[c n] otherwise.

The importance of Turing machines is that they are a general model of computation. Every computable function can be computed by a Turing machine. This fact is expressed in the Church-Turing thesis.

1.2

The Church-Turing thesis

The Church-Turing thesis sprang out of research into the concept of eective calculability. This was an informal, intuitively understood concept which mathematicians of the time worked with. It corresponds to our modern concept of computability. A function is said to be eectively calculable if there is some procedure (an eective method) to produce the values of the function, which a person can carry out in nite time, following a precisely and nitely describable set1 Note

the use of the Kleene star. means, the set of all strings over symbols in .

4

of instructions, without requiring any insight or ingenuity on the part of the person. An example of an eective method is the technique of performing long division which is taught in elementary schools. Several individuals attempted to formalize the concept of eective calculability, by inventing mathematical formalisms in which, it was hoped, every eective method could be expressed. There were three such contemporaneous attempts: Alan Turing invented Turing machines. Alonzo Church invented the -calculus. Alonzo Church, Stephen Kleene, and J.B. Rosser invented -recursive functions.