LOGBOOK

HELP

Quiz Entry - updated: 2026.11.27

What is the difference between a directed and an undirected edge, and when is a whole graph directed?

A directed edge is an ordered pair $(u, v)$: it leads from the origin $u$ to the destination $v$, like a flight from ORD to PVD. An undirected edge is an unordered pair $\{u, v\}$ that works both ways, like the route between ORD and PVD. A graph whose edges are all directed is a directed graph; one whose edges are all undirected is an undirected graph.

A directed flight ORD to PVD next to an undirected route ORD to PVD, and a small directed and undirected graph

* A flight has a direction and the return flight is a second edge; a route serves both directions. *

Which kind to use follows from the relationship being modelled. Symmetric relationships are undirected: a road usable both ways, a cable between two computers, a route between two airports. Asymmetric ones are directed: one-way streets, scheduled flights, hyperlinks from one web page to another, "A depends on B". In a flight schedule the flights ORD to LGA and LGA to ORD are two separate edges, each with its own flight number.

An undirected edge can always be replaced by two directed edges pointing in opposite directions, which is how some programs store undirected graphs. For directed graphs the degree splits in two: the in-degree counts incoming edges, the out-degree outgoing ones.

Go deeper:

  • doc Directed graph โ€” terminology for directed graphs: in- and out-degree, sources, sinks, and the special kinds.

From Quiz: ADS / Graphs: Basics, Representations and Spanning Trees | Updated: Nov 27, 2026