Skip to main content

Deriving Efficient Graph Algorithms

  • Chapter
Verification: Theory and Practice

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2772))

  • 548 Accesses

Abstract

Two case studies are presented that demonstrate the systematic derivation of efficient algorithms from simple combinatorial definitions. These case studies contribute to an exploration of evolutionary approaches to the explanation, proof, adaptation, and possibly the design of complex algorithms.

The algorithms derived are the linear-time depth-first-search algorithms developed by Tarjan and Hopcroft for strong connectivity and biconnectivity. These algorithms are generally considered by students to be complex and difficult to understand. The problems they solve, however, have simple combinatorial definitions that can themselves be considered inefficient algorithms.

The derivations employ systematic program manipulation techniques combined with appropriate domain-specific knowledge. The derivation approach offers evolutionary explanations of the algorithms that make explicit the respective roles of programming knowledge (embodied as program manipulation techniques) and domain-specific knowledge (embodied as graph-theoretic lemmas). Because the steps are rigorous and can potentially be formalized, the explanations are also proofs of correctness. We consider the merits of this approach to proof as compared with the usual a posteriori proofs. These case studies also illustrate how significant algorithmic derivations can be accomplished with a relatively small set of core program manipulation techniques.

A summary version of the biconnectivity derivation appeared in the first LICS conference, 1983 (Springer LNCS 164).

This research was supported in part by National Science Foundation Grant NSF-MCS79-21024, ONR N00014-80-C-0647, and DARPA/AFSOR F30602-01-2-0561, NSF ITR EIA-0086015, NSF EIA-0218376, and NSF EIA-0218359.

Author for correspondence. This research was supported in part by the Defense Advanced Research Projects Agency, ARPA Order No. 3597, monitored by the Air Force Avionics Laboratory under Contract F33615-81-K-1539, and U.S. Army Communications R&D Command under Contract DAAK80-81-K-0074, and the High Dependability Computing Program from NASA Ames cooperative agreement NCC-2-1298. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of NASA, DARPA, or the U.S. Government.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight 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.

Similar content being viewed by others

References

  1. A. Aho, J. Hopcroft, and J. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, 1974.

    Google Scholar 

  2. A. Aho, J. Hopcroft, and J. Ullman. Data Structures and Algorithms. Addison-Wesley, 1983.

    Google Scholar 

  3. D. Barstow. The roles of knowledge and deduction in algorithm design. Research Report 178, Yale University, April 1980.

    Google Scholar 

  4. F. Bauer et al. Programming in a wide spectrum language: a collection of examples. Science of Computer Programming, 1:73–114, 1981.

    Article  MATH  Google Scholar 

  5. R. Bird. Tabulation techniques for recursive programs. Computing Surveys, 12(4):403–417, 1980.

    Article  MATH  MathSciNet  Google Scholar 

  6. R. Burtall and J. Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1):44–67, 1977.

    Article  Google Scholar 

  7. K. Clark. Negation as failure. In H. Gallaire and J. Minker, editors, Logic and Databases. Plenum, 1978.

    Google Scholar 

  8. K. Clark and J. Darlington. Algorithm classification through synthesis. Computer Journal, 23(1), 1980.

    Google Scholar 

  9. S. Dietzen and W. Scherlis. Analogy and program development. In J. Boudreaux, editor, The Role of Language in Problem Solving II. North Holland, 1987.

    Google Scholar 

  10. C. Green and D. Barstow. On program synthesis knowledge. Artificial Intelligence, 10:241, 1978.

    Article  Google Scholar 

  11. Z. Manna and R. Waldinger. Synthesis: dreams → programs. IEEE Transactions on Software Engineering, SE-5(4), July 1979.

    Google Scholar 

  12. Z. Manna and R. Waldinger. Deductive synthesis of the unification algorithm. Science of Computer Programming, 1:5–48, 1981.

    Article  MATH  MathSciNet  Google Scholar 

  13. R. Paige and S. Koenig. Finite differencing of computable expressions. ACM Transactions on Programming Languages and Systems, 4(3):402–454, 1982.

    Article  MATH  Google Scholar 

  14. J. H. Reif. Synthesis of Parallel Algorithms. Morgan Kaufmann, 1993.

    Google Scholar 

  15. R. Reiter. On closed world data bases. In Gallaire and Minker [7].

    Google Scholar 

  16. R. W. Robert Paige, John Reif. Parallel Algorithm Derivation and Program Transformation. Kluwer Academic Publishers, 1993.

    Google Scholar 

  17. D. Sands. Higher-order expression procedures. In Proceedings of the ACM SIG-PLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM), pages 178-189. ACM Press, 1995.

    Google Scholar 

  18. W. Scherlis. Expression procedures and program derivation. PhD thesis, Stanford University, 1980.

    Google Scholar 

  19. W. Scherlis. Program improvement by internal specialization. In Eighth Symposium on Principles of Programming Languages, pages 41-49, 1981.

    Google Scholar 

  20. R. Tarjan. Depth first search and linear graph algorithms. SIAM Journal of Computing, 1(2):146–160, 1972.

    Article  MATH  MathSciNet  Google Scholar 

  21. R. Tarjan. Testing flow graph reducibility. Fifth ACM Symposium on the Theory of Computing, pages 96-107, 1973.

    Google Scholar 

  22. M. Tullsen and P. Hudak. Shifting expression procedures into reverse. In Partial Evaluation and Semantic-Based Program Manipulation, pages 95-104, 1999.

    Google Scholar 

  23. M. Wand. Continuation-based program transformation strategies. Journal of the ACM, 27(1):164–180, 1980.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Reif, J.H., Scherlis, W.L. (2003). Deriving Efficient Graph Algorithms. In: Dershowitz, N. (eds) Verification: Theory and Practice. Lecture Notes in Computer Science, vol 2772. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39910-0_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-39910-0_28

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-21002-3

  • Online ISBN: 978-3-540-39910-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics