David Gries Advisory Board F
Total Page:16
File Type:pdf, Size:1020Kb
Texts and Monographs in Computer Science Editor David Gries Advisory Board F. L. Bauer K.S.Fu J. J. Horning R.Reddy D. C. Tsichritzis W. M. Waite Texts and Monographs in Computer Science Brian RandelI, Ed. The Origins of Digital Computers Selected Papers 2nd Edition. 1975. xvi, 464p. 120 ilIus. cloth Jeffrey R. Sampson Adaptive Information Processing An Introductory Survey 1976. x, 214p. 83 ilIus. cloth Arto Salomaa and Matti Soittola Automata-Theoretic Aspects of Formal Power Series 1978. x, 171p. cloth Suad Alagic and Michael A. Arbib The Design of Well-Structured and Correct Programs 1978. x, 292p. 14 illus. cloth Peter W. Frey, Ed. Chess Skill in Man and Machine 1978. xi, 225p. 55 ilIus. cloth David Gries, Ed. Programming Methodology A Collection of Articles by Members of IFIP WG2.3 1978. xiv, 437p. 68 illus. cloth Michael A. Arbib, A.J. Kfoury, and Robert N. Moll A Basis for Theoretical Computer Science (The AKM Series in Theoretical Computer Science) 1981. vii, 220p. 49 ilIus. cloth A.J. Kfoury, Robert N. Moll, and Michael A. Arbib A Programming Approach to Computability (The AKM Series in Theoretical Computer Science) 1982. viii, 251p. 36 illus. cloth David Gries The Science of Programming 1981. xiii, 366p. cloth Edsger W. Dijkstra Selected Writings on Computing A Personal Perspective 1982. xvii, 362p. 1 illus. cloth Selected Writings on Computing: A Personal Perspective Edsger W. Dijkstra Springer-Verlag New York Heidelberg Berlin Edsger W. Dijkstra Burroughs Corporation Plataanstraat 5 5671 AL Nuenen The N etherlands Editor David Gries Department of Computer Science Cornell University Upson Hall Ithaca, NY 14853 U.S.A. With 13 illustrations. Library of Congress Cataloging in Publication Data Dijkstra, Edsger Wybe. Selected writings on computing (Texts and monographs in computer science) Bibliography: p. Inc1udes index 1. Electronic data processing-Addresses, essays, lectures. 2. Computers Addresses, essays, lectures. 3. Programming (Electronic computers)-Addresses, essays, lectures. 1. Title. 11. Series. QA76.24.D54 1982 001.64 82-10260 © 1982 by Springer-Verlag New York Inc. Softcover reprint of the hardcover Ist edition 1982 All rights reserved. No part of this book may be translated or reproduced in any form without written permission from Springer-Verlag, 175 Fifth Avenue, New York, New York 10010, U.S.A. The use of general descriptive names, trade names, trademarks, etc. in this publication, even if the former are not especially identified, is not to be taken as a sign that such names, as understood by the Trade Marks and Merchandise Act, may accordingly be used freely by anyone. Production: Michael Porch Typset by Science Typographers, Inc., Medford, NY. 9 8 7 6 543 2 1 ISBN-13 :978-1-4612-5697-7 e-ISBN-13 :978-1-4612-5695-3 DOI: 10.1007/978-1-4612-5695-3 Preface Since the summer of 1973, when I became a Burroughs Research Fellow, my life has been very different from what it had been before. The daily routine changed: instead of going to the University each day, where I used to spend most of my time in the company of others, I now went there only one day a week and was most of the time -that is, when not travelling!- alone in my study. In my solitude, mail and the written word in general became more and more important. The circumstance that my employer and I had the Atlantic Ocean between us was a further incentive to keep a fairly complete record of what I was doing. The public part of that output found its place in what became known as "the EWD series", which can be viewed as a form of scientific correspondence, possible since the advent of the copier. (That same copier makes it hard to estimate its actual distribution: I myself made about two dozen copies of my texts, but their recipients were welcome to act as further nodes of the distribution tree.) The decision to publish a se1ection from the EWD series in book form was at first highly embarrassing, but as the months went by I got used to the idea. As soon as some guiding principles had been adopted -preferably not published elsewhere, as varied and as representative as possible, etc.- the actual se1ection process was much easier than I had feared. Harder to decide was the question to how much editing the selected texts should be subjected. When the texts are viewed as historical documents, their editing should be minimal. When David Gries went through the texts with his fine-toothed comb he revealed so many opportunities for improve ment that, eventually, the editing became quite extensive. As a result, the texts as published are not representative of my mastery of the English language. v vi Preface A major obstacle to publication was my insistence that selected trip reports be included. Having decided that the selection should be representa tive, I had no choice, since the period in question covers years during which I was on the road a third of the time. Furthermore, few of my texts reflect my feelings and attitudes more clearly than the trip reports. (It has been remarked that my trip reports are more revealing about their author than about the people and places visited.) There was only one snag: there is no tradition of publishing such comments. While performing artists are quite used to being judged publicly by their peers, performing scientists are not. (Reviews of published books and articles are the closest approximation.) In my appreciation, the feelings of the people involved are as much apart of the birth of a science as their "objective" scientific achievements, and when one publisher told me he would like to publish the selection after the removal of the trip reports, I looked for another one. I am very grateful to Marvin Israel for immediately insisting that the trip reports be included. Even if you can convince the judge that it was never your intention to hurt or to offend, libel suits are awkward and eventually it was thought prudent to replace names in a few instances by "NN". I would like to stress that in no case should such areplacement be interpreted as our suspicion that the person in question would make trouble. First and foremost I am indebted to Burroughs Corporation, which gracefully created the circumstances under which I could work. It is impossible to mention all those who have contributed, direcdy or indirecdy. I make an exception for C.S. Scholten, with whom I have collaborated without interruption since 1952, and for W.H.J. Feijen, A.J. Martin, and M. Rem. Our regular discussions formed the root from which the "Tuesday Aftemoon Club" grew. In its weekly gatherings, the Tuesday Aftemoon Club evolved into a very critical and very inspiring environment; how much we have benefitted from each other is hard to fathom. Finally, this book cou1d not have been published in its present form without the very substantial assistance of David Gries, who spontaneous1y offered to correct my English. He ended up by screening all arguments and their presentation as well. He went far beyond the cal1 of friendship and my feelings towards him are of deep gratitude on the verge of guih, since I am afraid that he undertook the task without being aware of its size. I owe him many thousands of thanks for his many thousands of comments. Nuenen, 19 July 1981 EDSGER W. DIJKSTRA Table of Contents EWD227 Stepwise Program Construction 1 This essay, though dating from February 1968, has been inc1uded beeause, in retrospeet, it marks a turning point in my professionallife: it represents my earliest eonseious effort at orderly program development. The whole essay -and this explains to a eertain extent its somewhat pathetie eovering letter was written while I felt mortally ill: it was written as my farewell to scienee. Fate has deeided differently. EWD338 Parallelism in Multi-Record Transactions (Co-author: C.S. SCHOLTEN) 15 This teehnieal note, though dating from 1972, has been inc1uded beeause we never published it. (Though typed, it was never deeently edited until I did so for this eolleetion.) When we diseovered that we eould not explain it to the data proeessing experts in our immediate environment, we somehow lost interest. In May 1977, Martin Rem -whlle temporarily at the California Institute of Teehnology, Pasadena- designed a special purpose "elephant" -a set of eommunieating sequential proeesses with a fixed eonneetion pattern- for establishing whether a renumbering satisfying relation 7 (from this teehnieal note) exists. EWD376 Finding the Maximum Strong Components in a Directed Graph 22 The algorithm developed here is not the best one possible: it is not linear in the number of ares. It has been inc1uded for the sake of those interested in problem solving: it is one of my rare verbatim protoeols of what I wrote down while developing this solution. (I started thinking about the problem whlle travelling by train from Eindhoven to Amsterdam; the text was written in my vii vüi Contents hotel room.) [See Hopcroft, 1., and Tarjan, R. Efficient algorithms for graph manipulation. Comm. ACM 16,6 (June 1973),372-378.1 EWD385 Trip Report E.W. Dijkstra, Summer School Munich, July 25 to August 4, 1973 31 On August I, 1973, during that NATO Summer School in Marktoberdorf, I became a Burroughs Research Fellow; I still remember how funny it feit to write my trip report in English instead of in Dutch, as I had been used to do. At that Summer School I learned -blessed are the English!- that Norman Vincent Peale is practically unknown in the United Kingdom.