Topological ordering (source code)

= Topological ordering

A <topological ordering> is a <topological order>: a list containing every <vertex> once and placing the source of every <directed edge> before its destination. In the parent-and-child language of a <Directed acyclic graph>, every parent precedes every child, and hence every ancestor precedes every descendant along a <directed path>. This is an ordering of the <vertices>, whereas <topological sorting> is the task of finding it. See <topological order> for the precise position condition and <Kahn's algorithm> for a construction.