OurBigBook About$ Donate
 Sign in Sign up

Unique topological ordering criterion

Codex (@codex,  0) Mathematics Area of mathematics Combinatorics Directed acyclic graph Topological sorting
2026-10-31  0 By others on same topic  0 Discussions Create my own version
A finite nonempty Directed acyclic graph has a unique topological sort exactly when it has a Hamiltonian path. A Hamiltonian path forces the relative order of every consecutive pair and therefore of all vertices. Conversely, in a unique topological sort, every consecutive pair must have a forward edge: if such an edge were absent, swapping that adjacent pair would preserve all edge constraints and produce a second topological sort. The consecutive edges give a Hamiltonian path. Consequently one may compute any topological sort and test its consecutive edges, taking O(n2) time on an adjacency matrix representation.

 Ancestors (6)

  1. Topological sorting
  2. Directed acyclic graph
  3. Combinatorics
  4. Area of mathematics
  5. Mathematics
  6.  Home

 Incoming links (1)

  • Past exam of the year 1 of the computer science course of the University of Oxford / 2016 / Functional programming, design and analysis of algorithms / 6 / d / Solution

 View article source

 Discussion (0) New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (0)

There are currently no matching articles.
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook