The problem of finding prime numbers has been much favoured by expositors of modern programming methodology. In this paper the problem is tackled once more, but from a broader view of the programming process than has previously been taken. The initial steps toward a solution parallel those in the well-known presentations of Dijkstra and Wirth. However a general program transformation is shown to capture the clever "inventive step" in Dijkstra's solution, and another is employed to lead naturally to an alternative program. Complexity analyses of the two programs show that the latter is significantly more efficient.
CITATION STYLE
Pritchard, P. (1980). On the prime example of programming. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 79 LNCS, pp. 85–94). Springer Verlag. https://doi.org/10.1007/3-540-09745-7_5
Mendeley helps you to discover research relevant for your work.