Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Algorithms in C++, part 5 : graph algorithms
Sedgewick R., Van Wyk C., Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 2002. 496 pp.  Type: Book (9780201361186)
Date Reviewed: Jun 19 2002

The first edition of this book [1] was an undergraduate level text widely used in courses like “Data structures” and “Analysis of algorithms.” In this third edition, Sedgewick divides his first edition into three separate texts (the second of which is the subject of this review):

  • Algorithms in C++, Parts 1 to 4, covering fundamental concepts, data structures, sorting algorithms, and searching algorithms. This volume contains the first 16 chapters of the three-volume set.
  • Algorithms in C++, Part 5, covering graphs and graph algorithms. This volume contains chapters 17 through 22.
  • Algorithms in C++, Parts 6 to 8, the yet-to-be published third volume, which will cover strings, computational geometry, and advanced algorithms.

The first edition, which had companion versions in C and Pascal, was widely praised for explaining complex algorithms at an intuitive level through the use of hundreds of figures, scattered throughout the book. In this edition, Sedgewick expands the use of sequential figures to demonstrate clearly the principal graph structures, their properties, and the behavior of the associated algorithms. A C version of the book is available, and a Java version should be out shortly.

The first edition was criticized for simply translating Pascal into C++ for the associated code. In the third edition, Sedgewick has wisely employed the services of Christopher Van Wyk to provide C++ consulting. Consequently, the C++ code is object oriented, and should be quite useful to serious students.

There are six chapters, “Graph Properties and Types,” “Graph Search, Digraphs and DAGs,” “Minimum Spanning Trees,” “Shortest Paths,” and “Network Flows.” The first step to wisdom, as the Chinese say, is getting things by their right names. In “Graph Properties and Types,” Sedgewick offers a lucid taxonomy of graph types, explanations of the fundamental paths (Simple, Hamilton, and Euler), and clear definitions of the principal properties (connectivity, colorability, transitive closure, isomorphism, and so on). The “Graph Search” chapter provides clear, detailed explanations of breadth-first and depth-first search. In the succeeding chapters, there are excellent treatments of the classic algorithms for minimum spanning trees and shortest paths. The dramatically expanded size of the third edition also allows room for topics seldom covered in similar texts such as the Tremaux maze exploration and the failure of Dijkstra’s shortest path when confronted with negative weights.

The paragraphs above describe what this book is; it is probably just as important to describe what it is not. It is not a rigorous mathematical treatment of graph theory, nor does it offer any groundbreaking advancement of the topic. It is, as the author promised, “useful as [a text] early in the computer science curriculum” and “as a reference for people engaged in the de velopment of computer systems or applications programs.”

I don’t know if a Java-based review of the third edition would be as favorable as this C++-based review is; but I suspect that a C-based one would be. In either case, the insightful explanations should hold across languages. A three-language version of a given text is ample evidence that the problem of selecting a language on which to base a computer science education continues to bedevil both students and faculty, just as it continues to torment industry. And those who claim that the choice of language/operating system/database is irrelevant to good design should be condemned to the purgatory of the many projects that are imploding around such choices. But at least from the C/C++ perspective, Sedgwick’s effort may join the set of computer science undergraduate classics, particularly if Parts 1 to 4 and Parts 6 to 8 are of the same quality.

Reviewer:  Thomas Sheehan Review #: CR126184 (0209-0495)
1) Sedgewick, R. Algorithms in C++. Addison-Wesley, Reading, MA, 1992.
Bookmark and Share
Graph Algorithms (G.2.2 ... )
C++ (D.3.2 ... )
Trees (G.2.2 ... )
Nonnumerical Algorithms And Problems (F.2.2 )
Would you recommend this review?
Other reviews under "Graph Algorithms": Date
Practical minimum cut algorithms
Henzinger M., Noe A., Schulz C., Strash D.  Journal of Experimental Algorithmics 231-8, 2018. Type: Article
Jul 10 2019
 Guide to graph algorithms: sequential, parallel and distributed
Erciyes K.,  Springer International Publishing, New York, NY, 2018. 471 pp. Type: Book (978-3-319732-34-3)
Jan 22 2019
Handbook of graph theory, combinatorial optimization, and algorithms
Thulasiraman K., Nishizeki T., Arumugam S., Brandst├Ądt A.,  Chapman & Hall/CRC, Boca Raton, FL, 2016. 1216 pp. Type: Book (978-1-584885-95-5)
Apr 12 2017

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright © 2000-2021 ThinkLoud, Inc.
Terms of Use
| Privacy Policy