Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Concept

Topological Sort

Algorithm

An ordering of the vertices of a directed acyclic graph such that every edge points from an earlier vertex in the ordering to a later one, used to schedule tasks with dependencies such as a build system or a course prerequisite chain.

Facts
Origin Year
1962 1
Core Principle
Orders the vertices of a directed acyclic graph into a sequence so that every edge runs from an earlier vertex to a later one, giving a valid processing order for tasks with dependencies. 1
Connections

In Field

Invented

Robert Tarjan published a linear-time topological sort algorithm using depth-first search in his 1976 paper Edge-disjoint spanning trees and depth-first search, following Arthur Kahn's earlier 1962 algorithm.

Sources
1. Wikipedia: Topological Sort
Wikimedia Foundation
  • Kahn's algorithm section, first sentence
    first described by Kahn (1962)
  • Lead section, first sentence
    a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge (u,v) from vertex u to vertex v, u comes before v in the ordering.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.