Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Depth-first digraph algorithms without recursion

Published: 01 February 1977 Publication History

Abstract

After having taught the design of algorithms for more than ten years I still find that recursive algorithms are much too difficult for most computer science students. There seem to be two problems: the students are unable to grasp the essence of an algorithm in a recursive setting, and they rarely have any knowledge of the mechanisms underlying recursive calls.
In view of the above it was thought useful to translate a number of recursive algorithms into nonrecursive form for classroom use. Tarjan's depth-first search algorithms for digraphs (4,5) were selected because they are sufficiently important to require their study in some computer science course or other. The translation consists of making the depth-first search tree of the digraph explicit, and letting tree traversals take over the role of recursion. The nonrecursive algorithm for topological ordering of an acyclic digraph will be our example here. This algorithm is used to preprocess a scheduling network before it is subjected to critical path analysis.

References

[1]
Jackson, G.A. A graphical technique for describing recursion. Proc. ACM SIGCSE Sixth Tech.Symp.Comp.Sci.Education (SIGCSE Bull. 8, No. 3 (Sept.1976)), pp. 30-32.
[2]
Wirth,N. Algorithms + Data Structures &equil; Programs. Prentice-Hall, Englewood Cliffs, N.J., 1976.
[3]
Dijkstra,E.W. Correctness concerns and, among other things, why they are resented. Proc. 1975 International Conf. Reliable Software (SIGPLAN Notices 10, No.6 (June 1975)), pp.546-550.
[4]
Tarjan, R. Depth-first search and linear graph algorithms. SIAM J. comput. 1 (1972) 146-159.
[5]
Tarjan, R. Finding dominators in directed graphs. SIAM J. Comput. 3 (1974), 62-89.
[6]
Berztiss, A.T. K-tree algorithms for critical path analysis. To be published. (Available as a report from the author.)
[7]
Knuth, D.E. The Art of Computer Programming Vol.1: Fundamental Algorithms, 2nd Ed. Addison-Wesley, Reading, Mass., 1973.
[8]
Berztiss,A.T. Data Structures: Theory and Practice, 2nd Ed. Academic Press, New York, 1975.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGCSE Bulletin
ACM SIGCSE Bulletin  Volume 9, Issue 1
Special issue seventh technical symposium on computer science education
Feb 1977
187 pages
ISSN:0097-8418
DOI:10.1145/382063
Issue’s Table of Contents
  • cover image ACM Conferences
    SIGCSE '77: Proceedings of the seventh SIGCSE technical symposium on Computer science education
    February 1977
    187 pages
    ISBN:9781450374071
    DOI:10.1145/800104
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 February 1977
Published in SIGCSE Volume 9, Issue 1

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 1,097
    Total Downloads
  • Downloads (Last 12 months)52
  • Downloads (Last 6 weeks)13
Reflects downloads up to 10 Oct 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media