Basics
Graph vocabulary, ways to store a graph, and graphs hidden inside grids and puzzles.
- Graphs: vertices, edges, directed, weighted, degree, paths A graph is a set of vertices joined by edges, which can be directed or weighted. Learn degree, paths and cycles by hovering over a graph.
- Adjacency matrix, adjacency list, edge list Store a graph as an adjacency matrix, an adjacency list or an edge list. Click an edge to see it in all three and compare their costs.
- Implicit graphs: grids, states and puzzles Many problems are graphs in disguise: grid cells, game states and puzzle positions. Each cell or state is a vertex and each move is an edge.