Edge Classification in Undirected Graphs

Learn how to classify edges in a graph using depth-first search.

Edges in graphs are much simpler to classify than edges in digraphs. Primarily because, unlike an edge in a digraph, each edge (u,v)(u,v) of a graph can be explored in either direction, from uu to vv, or from vv to uu.

Each edge of a graph is classified as a tree-edge or a back-edge, depending on how depth-first search traverses the graph.

Get hands-on with 1200+ tech skills courses.