Topological order and directed cycle detection
A finite directed graph admits an order placing u before v for every edge u→v exactly when it is acyclic.
Key knowledge
A finite directed graph admits an order placing u before v for every edge u→v exactly when it is acyclic. Full DFS's reverse finishing order is topological for a DAG. Checking every edge against that order detects a cycle otherwise; with adjacency lists the whole procedure takes O(|V|+|E|).
Conditions and scope
- Run DFS from every still-unvisited vertex, not only one source.
- Self-loops violate a topological order; finishing order itself must be reversed.
Sources · 1
References
Sources retain their recorded scope. A source link alone does not establish verification of every statement.
Evidence and review
Lecture10 Topological Sort proof and Cycle Detection, printed4; full-DFS cost includes isolated vertices.
2026-10-10 · Independent AI editorial review: All241 compact claims, hypotheses, displayed equations/conventions and all596 origin semantic links read; entire241-entry author exact-source inspection matrix and declared limitations reviewed. Prior105 actual inherited Mathematics/Information records read for whole-inventory breadth. Targeted independent primary sections are listed below; this does NOT claim every cited source body or every proof was independently re-read. This is AI reference-content review, not human disciplinary certification, exhaustive textbook reproduction or experimental replication. Receipt: mathematics-information-independent-content-review.1.
Entry details
Permanent link to this entry ↗- Record identity
- info-topological-order-cycle-test
- Revision
- university-core.1
- Structured reference record
- University core expansion