**Contents**

14.2 Data Structures for Graphs

14.2.2 Adjacency List Structure

14.2.3 Adjacency Map Structure

14.2.4 Adjacency Matrix Structure

14.3.2 DFS Implementation and Extensions

A ** graph** is a way of representing relationships that exist between pairs of objects. That is, a graph is a set of objects, called vertices, together with a collection of pairwise connections between them, called edges. Graphs have applications in modeling many domains, including mapping, transportation, computer networks, and electrical engineering. By the way, this notion of a “graph” should not be confused with bar charts and function plots, as these kinds of “graphs” are unrelated to the topic of this chapter.

Viewed abstractly, a *graph**G* is simply a set *V* of ** vertices** and a collection

Start Free Trial

No credit card required