Physics and reasoning by analogy

Dated: 

June 1972

Dahl, Dijkstra, and Hoare's book Structured Programming [1] was published in June 1972. Dijkstra wrote the first chapter, `Notes on Structured Programming', in which he introduced several new ideas. Some of those ideas were a result of his aptitude for mathematics which he had acquired during his teens from his mother (who was a strong mathematician). Other ideas were due to Dijkstra's professional training as a theoretical physicist from Leiden University.

One of Dijkstra's main points was that mathematical techniques for small demonstration programs do not necessarily work for programs a thousand times larger. In his words:

Apparently we are too much trained to disregard differences in scale, to treat them as “gradual differences that are not essential”. We tell ourselves that what we can do once, we can also do twice and by induction we fool ourselves into believing that we can do it as many times as needed, but this is just not true! A factor of a thousand is already far beyond our powers of imagination! [1, p.2]

To clarify, Dijkstra gave two analogies between physical observations and computer programs. The first analogy was about a one-year old child crawling on all fours one mile per hour and a supersonic jet moving at a speed of a thousand miles per hour. “Considered as objects with moving ability the child and the jet are incomparable, for whatever one can do the other cannot and vice versa”. The first object, the child, operates very differently from the second object, the jet, even though both objects move forward. Likewise, for computer programs, one cannot expect a small program to operate like a large program even though both programs compute a function. Hence, one cannot expect to successfully use the same structuring mechanisms for both small and large programs. Dijkstra's second analogy was similar in spirit. He asked the reader to close one's eyes and to imagine standing in a prairie.

[W]hile far away a big, reinless horse is approaching at a gallop, one can “see” it approaching and passing. To do the same with a phalanx of a thousand of these big beasts is mentally impossible: your heart would miss a number of beats by pure panic, if you could! [1, p.2]

It is the operational point of view that I find most intriguing in Dijkstra's reasoning. When writing his `Notes on Structured Programming' (mostly during the late 1960s), Dijkstra viewed a computer program from an operational perspective. Only during the 1970s did Dijkstra become inspired by axiom based reasoning.

For another blog in which I discuss an analogy of Dijkstra with physics, see Turing award lecture — an analogy with physics

 

[1] O.-J. Dahl, E.W. Dijkstra, and C.A.R. Hoare. Structured Programming. Academic Press, London - New York - San Francisco, 1972.

Tags: