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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.