Introduction

Published

2023-08-02

We have looked at the dictionary data structure, which associates keys with values, and we’ve looked at some examples and use cases. Now that we understand dictionaries, we’re going to dive into graphs. Graphs are a collection of vertices (nodes) connected by edges, that represent relationships between the vertices (nodes). We’ll see that a dictionary can be used to represent a graph.

Learning objectives

  • You will learn some of the terms associated with graphs.
  • You will learn how to represent data using a graph.
  • You will learn about searching a graph using breadth-first search.

Terms introduced

  • graph
  • vertices (nodes)
  • edge
  • neighbor (common edge)
  • adjacent
  • breadth-first search

Original author: Clayton Cafiero < [given name] DOT [surname] AT uvm DOT edu >

No generative AI was used in producing this material. This was written the old-fashioned way.

This material is for free use under either the GNU Free Documentation License or the Creative Commons Attribution-ShareAlike 3.0 United States License (take your pick).