WEBVTT
00:00:00.429 --> 00:00:05.259
There are many other models of computation,
each of which describes a class of integer
00:00:05.259 --> 00:00:10.210
functions where a computation is performed
on an integer input to produce an integer
00:00:10.210 --> 00:00:11.210
answer.
00:00:11.210 --> 00:00:16.650
Kleene, Post and Turing were all students
of Alonzo Church at Princeton University in
00:00:16.650 --> 00:00:18.990
the mid-1930's.
00:00:18.990 --> 00:00:22.860
They explored many other formulations for
modeling computation:
00:00:22.860 --> 00:00:28.820
recursive functions, rule-based systems for
string rewriting, and the lambda calculus.
00:00:28.820 --> 00:00:34.120
They were all particularly intrigued with
proving the existence of problems unsolvable
00:00:34.120 --> 00:00:36.220
by realizable machines.
00:00:36.220 --> 00:00:41.700
Which, of course, meant characterizing the
problems that could be solved by realizable
00:00:41.700 --> 00:00:43.900
machines.
00:00:43.900 --> 00:00:48.850
It turned out that each model was capable
of computing *exactly* the same set of integer
00:00:48.850 --> 00:00:50.350
functions!
00:00:50.350 --> 00:00:54.870
This was proved by coming up with constructions
that translated the steps in a computation
00:00:54.870 --> 00:00:57.420
between the various models.
00:00:57.420 --> 00:01:02.460
It was possible to show that if a computation
could be described by one model, an equivalent
00:01:02.460 --> 00:01:06.530
description exists in the other model.
00:01:06.530 --> 00:01:11.390
This lead to a notion of computability that
was independent of the computation scheme
00:01:11.390 --> 00:01:13.590
chosen.
00:01:13.590 --> 00:01:19.650
This notion is formalized by Church's Thesis,
which says that every discrete function computable
00:01:19.650 --> 00:01:24.789
by any realizable machine is computable by
some Turing Machine.
00:01:24.789 --> 00:01:30.610
So if we say the function f(x) is computable,
that's equivalent to saying that there's a
00:01:30.610 --> 00:01:40.200
TM that given x as an input on its tape will
write f(x) as an output on the tape and halt.
00:01:40.200 --> 00:01:45.890
As yet there's no proof of Church's Thesis,
but it's universally accepted that it's true.
00:01:45.890 --> 00:01:51.440
In general "computable" is taken to mean "computable
by some TM".
00:01:51.440 --> 00:01:56.590
If you're curious about the existence of uncomputable
functions, please see the optional video at
00:01:56.590 --> 00:01:58.960
the end of this lecture.
00:01:58.960 --> 00:02:05.580
Okay, we've decided that Turing Machines can
model any realizable computation.
00:02:05.580 --> 00:02:10.229
In other words for every computation we want
to perform, there's a (different) Turing Machine
00:02:10.229 --> 00:02:12.169
that will do the job.
00:02:12.169 --> 00:02:16.170
But how does this help us design a general-purpose
computer?
00:02:16.170 --> 00:02:22.200
Or are there some computations that will require
a special-purpose machine no matter what?
00:02:22.200 --> 00:02:25.900
What we'd like to find is a universal function
U:
00:02:25.900 --> 00:02:32.930
it would take two arguments, k and j, and
then compute the result of running T_k on
00:02:32.930 --> 00:02:34.290
input j.
00:02:34.290 --> 00:02:40.319
Is U computable, i.e., is there a universal
Turing Machine T_U?
00:02:40.319 --> 00:02:47.780
If so, then instead of many ad-hoc TMs, we
could just use T_U to compute the results
00:02:47.780 --> 00:02:50.409
for any computable function.
00:02:50.409 --> 00:02:52.349
.249 Surprise!
00:02:52.349 --> 00:02:55.389
U is computable and T_U exists.
00:02:55.389 --> 00:03:01.110
If fact there are infinitely many universal
TMs, some quite simple.
00:03:01.110 --> 00:03:07.129
The smallest known universal TM has 4 states
and uses 6 tape symbols.
00:03:07.129 --> 00:03:12.269
A universal machine is capable of performing
any computation that can be performed by any
00:03:12.269 --> 00:03:15.480
TM!
00:03:15.480 --> 00:03:17.099
What's going on here?
00:03:17.099 --> 00:03:25.500
k encodes a "program" - a description of some
arbitrary TM that performs a particular computation.
00:03:25.500 --> 00:03:29.859
j encodes the input data on which to perform
that computation.
00:03:29.859 --> 00:03:37.799
T_U "interprets" the program, emulating the
steps T_k will take to process the input and
00:03:37.799 --> 00:03:40.329
write out the answer.
00:03:40.329 --> 00:03:46.819
The notion of interpreting a coded representation
of a computation is a key idea and forms the
00:03:46.819 --> 00:03:51.879
basis for our stored program computer.
00:03:51.879 --> 00:03:57.439
The Universal Turing Machine is the paradigm
for modern general-purpose computers.
00:03:57.439 --> 00:04:02.790
Given an ISA we want to know if it's equivalent
to a universal Turing Machine.
00:04:02.790 --> 00:04:10.439
If so, it can emulate every other TM and hence
compute any computable function.
00:04:10.439 --> 00:04:13.849
How do we show our computer is Turing Universal?
00:04:13.849 --> 00:04:18.870
Simply demonstrate that it can emulate some
known Universal Turing Machine.
00:04:18.870 --> 00:04:24.780
The finite memory on actual computers will
mean we can only emulate UTM operations on
00:04:24.780 --> 00:04:29.840
inputs up to a certain size
but within this limitation we can show our
00:04:29.840 --> 00:04:35.020
computer can perform any computation that
fits into memory.
00:04:35.020 --> 00:04:40.960
As it turns out this is not a high bar:
so long as the ISA has conditional branches
00:04:40.960 --> 00:04:45.020
and some simple arithmetic, it will be Turing
Universal.
00:04:45.020 --> 00:04:49.789
This notion of encoding a program in a way
that allows it to be data to some other program
00:04:49.789 --> 00:04:52.110
is a key idea in computer science.
00:04:52.110 --> 00:04:58.340
We often translate a program Px written to
run on some abstract high-level machine (eg,
00:04:58.340 --> 00:05:05.060
a program in C or Java) into, say, an assembly
language program Py that can be interpreted
00:05:05.060 --> 00:05:06.740
by our CPU.
00:05:06.740 --> 00:05:10.389
This translation is called compilation.
00:05:10.389 --> 00:05:14.800
Much of software engineering is based on the
idea of taking a program and using it as as
00:05:14.800 --> 00:05:19.110
component in some larger program.
00:05:19.110 --> 00:05:24.159
Given a strategy for compiling programs, that
opens the door to designing new programming
00:05:24.159 --> 00:05:29.720
languages that let us express our desired
computation using data structures and operations
00:05:29.720 --> 00:05:34.139
particularly suited to the task at hand.
00:05:34.139 --> 00:05:39.229
So what have learned from the mathematicians'
work on models of computation?
00:05:39.229 --> 00:05:44.280
Well, it's nice to know that the computing
engine we're planning to build will be able
00:05:44.280 --> 00:05:49.030
to perform any computation that can be performed
on any realizable machine.
00:05:49.030 --> 00:05:55.419
And the development of the universal Turing
Machine model paved the way for modern stored-program
00:05:55.419 --> 00:05:56.729
computers.
00:05:56.729 --> 00:06:00.589
The bottom line: we're good to go with the
Beta ISA!