Skip to main content

An Analysis of Choice in Program Design

  • Conference paper
Computer Program Synthesis Methodologies

Part of the book series: NATO Advanced Study Institutes Series ((ASIC,volume 95))

  • 87 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A.V. Hopcroft, J.E. and Ullman, J.D. (1974) “The design and analysis of computer algorithms”, Addison-Wesley Publishing Co., Reading, Mass.

    MATH  Google Scholar 

  2. 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.

    Article  MathSciNet  MATH  Google Scholar 

  3. Aho, A.V. and Ullman, J.D. (1972) “Optimization of straightline code”, SIAM J. Computing 1, 1, pp. 1–19.

    Article  MathSciNet  MATH  Google Scholar 

  4. Backhouse, R.C. (1979) “Syntax of programming languages: Theory and practice”, Prentice-Hall International, London.

    MATH  Google Scholar 

  5. 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.

    Chapter  Google Scholar 

  6. Bellman, R. (1957) “Dynamic programming”, Princeton Univ. Press: Princeton, New Jersey.

    MATH  Google Scholar 

  7. Burstall, R.M. and Darlington, J. (1977) “Some transformations for developing recursive programs”, J. ACM 24, 1, pp. 44–67.

    Article  MathSciNet  MATH  Google Scholar 

  8. Carre, B.A. (1979) “Graphs and networks”, Oxford Applied Mathematics and Computing Science Series, Clarendon Press, Oxford.

    Google Scholar 

  9. Dijkstra, E.W. (1959) “A note on two problems in connexion with graphs”, Numerische Mathematik 1, pp. 269–271.

    Article  MathSciNet  MATH  Google Scholar 

  10. Dijkstra, E.W. (1976) “A discipline of programming”, Prentice Hall Inc., Englewood Cliffs, N.J.

    MATH  Google Scholar 

  11. Earley, J. (1970) “An efficient context-free parsing algorithm”, Comm. ACM 13, 2, pp. 94–102.

    Article  MATH  Google Scholar 

  12. Gries, D. (1980) “Educating the programmer: notation, proofs and the development of programs”. Dept. of Computer Science, Cornell Univ., Tech. Rep. No. TR80-414.

    Google Scholar 

  13. Hoare, C.A.R. (1971) “Proof of a program: FIND”, Comm. ACM 14, 1, pp. 39–45.

    Article  MATH  Google Scholar 

  14. 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.

    Google Scholar 

  15. Johnson, D.B. (1973) “A note on Dijkstra1s shortest path algorithm”, J. ACM 20, 3, pp. 385–388.

    Article  MATH  Google Scholar 

  16. Priority queues with update and finding minimum spanning trees–, Info. Proc. Letters 4, 3, pp. 53–57.

    Google Scholar 

  17. Johnson, D.B. (1977) “Efficient algorithms for shortest paths in sparce networks”, J. ACM 24, 1, pp. 1–13.

    Article  MATH  Google Scholar 

  18. Knuth, D.E. (1971) “Optimum binary search trees”, Acta Informatica 1, pp. 14–25.

    Article  MATH  Google Scholar 

  19. Knuth, D.E. (1973) “The Art of Computer Programming, vol. 3, Sorting and Searching”, Addison-Wesley Publ. Co., Reading, Mass.

    Google Scholar 

  20. Low, J.R. (1978) “Automatic data structure selection: an example and overview”, Comm. ACM 21, 5, pp. 376–385.

    Article  Google Scholar 

  21. Manna, Z. and Waldinger, R. (1979) “Synthesis: Dreams =>programs”, IEEE Trans, on Software Engineering, vol. SE-5, n- 4, pp. 294–328.

    Article  Google Scholar 

  22. Nemhauser, G.L. (1966) “Introduction to dynamic programming” J. Wiley and Sons, New York.

    Google Scholar 

  23. Pohl, I. (1972) “A sorting problem and its complexity”, Comm. ACM 15, 6 (June 72 ) pp. 462–464.

    Google Scholar 

  24. Reynolds, J.C. (1979) “Reasoning about arrays”, Comm. ACM 22, 5 (May 79 ) pp. 290–299.

    MathSciNet  Google Scholar 

  25. Reynolds, J.C. (1981) “The craft of programming”, Prentice Hall International, London.

    MATH  Google Scholar 

  26. Schwartz, J.T. (1975) “Automatic data structure choice in a language of very high level”, Comm. ACM 18, 12 (Dec. 75 ) pp. 722–728.

    Google Scholar 

  27. Sintzoff, M. (1976) “Eliminating blind alleys from backtrack programs” in Automata, Languages and programming, 3rd ICALP, Michaelson, S. and Milner, R. (Eds).

    Google Scholar 

  28. Vuillemin, J. (1978) “A dat structure for manipulating priority queues”, Comm. ACM 21, pp. 309–315.

    Article  MathSciNet  MATH  Google Scholar 

  29. Wagner, R.A. (1974) “Order-n correction for regular languages”, Comm. ACM 17, 5 (May 74 ) pp. 269–271.

    Google Scholar 

  30. Wagner, R.A. (1976) “A shortest path algorithm for edgesparse graphs”, J. ACM 23, 1 (Jan. 76 ) pp. 50–57.

    Google Scholar 

  31. Wagner, R.A. and Fischer, M.J. (1974) “The string-to-string correction problem”, J. ACM 21, 1 (Jan. 74 ) pp. 168–173.

    MathSciNet  Google Scholar 

  32. Wegbreit, B. (1975) “Mechanical program analysis”, Comm. ACM 18, 9 (Sept. 75 ) pp. 528–539.

    MathSciNet  Google Scholar 

  33. Williams, J.W.J. (1964) “Algorithm 232. Heapsort”, Comm. ACM 7, 6 (June 64 ) pp. 347–348.

    Google Scholar 

  34. 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.

    MathSciNet  MATH  Google Scholar 

  35. 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.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics