Abstract
An attempt is made to identify the most important decisions which arise in the processes of program synthesis and program transformation by analysing in detail the steps involved in designing two classical algorithms — binary search and Dijkstra’s shortest path algorithm. The use of non-determinism in the early stages of the development of traditional, sequential programs is advocated as an aid to avoiding the pitfalls of premature decision making. Dynamic programming is then suggested as a technique for evaluating nondeterministic decisions and its use illustrated by the proof of the optimality of binary search in the worst and average cases and by developing an optimal gcd algorithm.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aho, A.V. Hopcroft, J.E. and Ullman, J.D. (1974) “The design and analysis of computer algorithms”, Addison-Wesley Publishing Co., Reading, Mass.
Aho, A.V. and Peterson, T.G. (1972) “A minimum-distance error-correcting parser for context-free languages”, SIAM Journal of Computing, 1, 4, pp. 305–312.
Aho, A.V. and Ullman, J.D. (1972) “Optimization of straightline code”, SIAM J. Computing 1, 1, pp. 1–19.
Backhouse, R.C. (1979) “Syntax of programming languages: Theory and practice”, Prentice-Hall International, London.
Bauer, F.L. (1979) “Program development by stepwise transformations- the project CIP”, In Program construction, Eds F.L. Bauer and M. Broy, Springer-Verlag Lecture Notes in Computer Science 69, pp. 237–272.
Bellman, R. (1957) “Dynamic programming”, Princeton Univ. Press: Princeton, New Jersey.
Burstall, R.M. and Darlington, J. (1977) “Some transformations for developing recursive programs”, J. ACM 24, 1, pp. 44–67.
Carre, B.A. (1979) “Graphs and networks”, Oxford Applied Mathematics and Computing Science Series, Clarendon Press, Oxford.
Dijkstra, E.W. (1959) “A note on two problems in connexion with graphs”, Numerische Mathematik 1, pp. 269–271.
Dijkstra, E.W. (1976) “A discipline of programming”, Prentice Hall Inc., Englewood Cliffs, N.J.
Earley, J. (1970) “An efficient context-free parsing algorithm”, Comm. ACM 13, 2, pp. 94–102.
Gries, D. (1980) “Educating the programmer: notation, proofs and the development of programs”. Dept. of Computer Science, Cornell Univ., Tech. Rep. No. TR80-414.
Hoare, C.A.R. (1971) “Proof of a program: FIND”, Comm. ACM 14, 1, pp. 39–45.
Hoare, C.A.R. (1972) “Notes on data structuring”, In Structured programming by O.-J. Dahl, E.W. Dijkstra and C.A.R. Hoare, APIC Studies in Data Processing No. 8, Academic Press, London.
Johnson, D.B. (1973) “A note on Dijkstra1s shortest path algorithm”, J. ACM 20, 3, pp. 385–388.
Priority queues with update and finding minimum spanning trees–, Info. Proc. Letters 4, 3, pp. 53–57.
Johnson, D.B. (1977) “Efficient algorithms for shortest paths in sparce networks”, J. ACM 24, 1, pp. 1–13.
Knuth, D.E. (1971) “Optimum binary search trees”, Acta Informatica 1, pp. 14–25.
Knuth, D.E. (1973) “The Art of Computer Programming, vol. 3, Sorting and Searching”, Addison-Wesley Publ. Co., Reading, Mass.
Low, J.R. (1978) “Automatic data structure selection: an example and overview”, Comm. ACM 21, 5, pp. 376–385.
Manna, Z. and Waldinger, R. (1979) “Synthesis: Dreams =>programs”, IEEE Trans, on Software Engineering, vol. SE-5, n- 4, pp. 294–328.
Nemhauser, G.L. (1966) “Introduction to dynamic programming” J. Wiley and Sons, New York.
Pohl, I. (1972) “A sorting problem and its complexity”, Comm. ACM 15, 6 (June 72 ) pp. 462–464.
Reynolds, J.C. (1979) “Reasoning about arrays”, Comm. ACM 22, 5 (May 79 ) pp. 290–299.
Reynolds, J.C. (1981) “The craft of programming”, Prentice Hall International, London.
Schwartz, J.T. (1975) “Automatic data structure choice in a language of very high level”, Comm. ACM 18, 12 (Dec. 75 ) pp. 722–728.
Sintzoff, M. (1976) “Eliminating blind alleys from backtrack programs” in Automata, Languages and programming, 3rd ICALP, Michaelson, S. and Milner, R. (Eds).
Vuillemin, J. (1978) “A dat structure for manipulating priority queues”, Comm. ACM 21, pp. 309–315.
Wagner, R.A. (1974) “Order-n correction for regular languages”, Comm. ACM 17, 5 (May 74 ) pp. 269–271.
Wagner, R.A. (1976) “A shortest path algorithm for edgesparse graphs”, J. ACM 23, 1 (Jan. 76 ) pp. 50–57.
Wagner, R.A. and Fischer, M.J. (1974) “The string-to-string correction problem”, J. ACM 21, 1 (Jan. 74 ) pp. 168–173.
Wegbreit, B. (1975) “Mechanical program analysis”, Comm. ACM 18, 9 (Sept. 75 ) pp. 528–539.
Williams, J.W.J. (1964) “Algorithm 232. Heapsort”, Comm. ACM 7, 6 (June 64 ) pp. 347–348.
Yen, J.Y. (1970) “An algorithm for finding shortest routes from all source nodes to a given destination in general networks”, Quart. Appl. Maths. 27, pp. 526–530.
Yen, J.Y. (1972) “Finding the lengths of all shortest paths in N-node non-negative distance-complete networks using IN3 additions and N comparisons”, J. ACM 19, 3 (July 72 ) pp. 423–424.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1983 D. Reidel Publishing Company
About this paper
Cite this paper
Backhouse, R. (1983). An Analysis of Choice in Program Design. In: Biermann, A.W., Guiho, G. (eds) Computer Program Synthesis Methodologies. NATO Advanced Study Institutes Series, vol 95. Springer, Dordrecht. https://doi.org/10.1007/978-94-009-7019-9_3
Download citation
DOI: https://doi.org/10.1007/978-94-009-7019-9_3
Publisher Name: Springer, Dordrecht
Print ISBN: 978-94-009-7021-2
Online ISBN: 978-94-009-7019-9
eBook Packages: Springer Book Archive