Professional Documents
Culture Documents
John McCarthy
"
" REPORT ON THE 1964 FALL JOINT PROGRAMMING RACE
John McCarthy
One way in which one computer and operating system can be better
than another is in permitting a user to solve a problem in a shorter
time. There are differences of opinion about what features of a
system make for fastest solution of problems and differences of
opinion are what make horse races. Therefore, on Tuesday, October
27, 1964, I announced a programming race for computer systems accessible
from the exhibit area of the Fall Joint Computer Conference. Seven
groups agreed to participate and the contest was held the following
afternoon.
"
?
"
4. Information International Inc. using the Digital Equipment
PDP-1 computer built into their programmable film reader. They
programmed in DDT, I.e. on-line machine language also.
5. IBM. They used the QUIKTRAN on-line Fortran system that used
a remotely connected 7090 In New York.
The groups exhibiting the CDC 3100, the SDS 930, and the LGP 21
declined to compete on the grounds that they had not brought means for
preparing programs to the convention. It is possible that I missed
inviting other groups that could have competed.
" to start all groups at the same time because the different time-sharing
systems came on the air at different times. Stanford students served
as observers at each booth.
" 2
" 6. SDC. Their time-sharing systems also went off the air 30
minutes after they accepted the problem.
DO NOT TURN THE PAGE UNTIL YOU ARE READY TO START ON THE PROBLEM.
"
" 5
" THE PROBLEM:
" 4
*
"
SOLUTIONS
The briefest solution was suggested by Mr. Paul Abrahams of
Information International, but was not the solution Mr. Fedkin used
In ALGOL it is
begin
integer i, j; integer array a[ 1:10000];
for i := 1 step 1 until 10000 do a[i] := 0;
for i := 1 step 1 until 21 do
for j := 1, j + 1 while j < iAif 3 + jt 3 < 10000 do
a[it 3 + jf3] := a[iT3 + jt'sl + 1}
for i := 1 step 1 until 10000 do if a[i] > 1 then go to done;
done : outinteger ( i ) end
A solution that uses less memory is:
begin comment McCarthy's FJCC contest problem Find the smallest
integer that is the sum of two cubes for two different pairs
of cubes. W. M. McKeeman;
integer i, j, t, k, nc;
integer array a, isave, j save [ l:soo] ;
"
nc := 0;
for i := 1 step 1 until 30 do
for j := 1 step 1 until i do
begin
t :-= iT3 + jt3;
for k := 1 step 1 until nc do
if t = a[k] then
begin
outinteger(t ) ;
outinteger(i) ;
outinteger (j ) ;
outinteger ( isave [k] );
outinteger( jsave[k] )
end;
nc := nc + 1;
a[nc] := t;
isave[nc] := i;
" end
end
jsave [nc] := j