Overview
In Chapter 11 we give a brief introduction to the theory of graphs, including the definition of
some basic graph concepts such as paths, degree, isomorphism, coloring, planarity, and so
forth. This is followed by a discussion of the standard implementations of the graph and
digraph ADTs. We also discuss the two classical searching algorithms depth-first search and
bread-first search and the associated traversal algorithms depth-first traversal and breadth-first
traversal. We finish the chapter by showing how the reverse explored numbering solves the
problem of efficiently determining a topological sorting of the vertices in a directed graph
without cycles (dag).
Chapter Objectives
After completing the chapter the student will know:
• The importance of graphs and digraphs in modeling problems and networks
• The basic definitions relating to graphs and digraphs
• The two main methods of implementing graphs and digraphs, namely, adjacency matrices
versus adjacency lists, and the advantages of each implementation
• The importance of topological sorting in digraphs, and how the reverse explored numbering
solves this problem efficiently
Instructor Notes
The concept of a digraph is a generalization of a graph in the sense that any given graph G can
be thought of as beings combinatorially equivalent to the symmetric digraph obtained by
replacing each edge {u,v} with the two directed edges (u,v) and (v,u). Hence, algorithms
designed for digraphs can typically be applied to graphs.