graph

A set of vertices (points) connected by edges (links), used to model networks such as roads, friendships or dependencies.

In more detail

Unlike a tree, a graph may contain cycles and need not have a root. Edges can be one-way (directed) or two-way (undirected), and can carry weights such as distances. Graphs are stored as an adjacency list or an adjacency matrix.

Related terms

Taught in

References