TOPICS
Search

Topological Sort


A topological sort is a permutation p of the vertices of a graph such that an edge {i,j} implies that i appears before j in p (Skiena 1990, p. 208). Only acyclic digraphs can be topologically sorted. The topological sort of a graph can be computed using TopologicalSort[g] in the Wolfram Language package Combinatorica` .


Explore with Wolfram|Alpha

References

Skiena, S. "Topological Sorting." §5.4.3 in Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, pp. 208-209, 1990.

Referenced on Wolfram|Alpha

Topological Sort

Cite this as:

Weisstein, Eric W. "Topological Sort." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/TopologicalSort.html

Subject classifications