Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Topological sorting
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Relation to partial orders== Topological orderings are also closely related to the concept of a [[linear extension]] of a [[partial order]] in mathematics. A partially ordered set is just a set of objects together with a definition of the "β€" inequality relation, satisfying the axioms of reflexivity (''x'' β€ ''x''), antisymmetry (if ''x'' β€ ''y'' and ''y'' β€ ''x'' then ''x'' = ''y'') and [[transitive relation|transitivity]] (if ''x'' β€ ''y'' and ''y'' β€ ''z'', then ''x'' β€ ''z''). A [[total order]] is a partial order in which, for every two objects ''x'' and ''y'' in the set, either ''x'' β€ ''y'' or ''y'' β€ ''x''. Total orders are familiar in computer science as the comparison operators needed to perform [[comparison sort]]ing algorithms. For finite sets, total orders may be identified with linear sequences of objects, where the "β€" relation is true whenever the first object precedes the second object in the order; a comparison sorting algorithm may be used to convert a total order into a sequence in this way. A linear extension of a partial order is a total order that is compatible with it, in the sense that, if ''x'' β€ ''y'' in the partial order, then ''x'' β€ ''y'' in the total order as well. One can define a partial ordering from any DAG by letting the set of objects be the vertices of the DAG, and defining ''x'' β€ ''y'' to be true, for any two vertices ''x'' and ''y'', whenever there exists a [[directed path]] from ''x'' to ''y''; that is, whenever ''y'' is [[reachability|reachable]] from ''x''. With these definitions, a topological ordering of the DAG is the same thing as a linear extension of this partial order. Conversely, any partial ordering may be defined as the reachability relation in a DAG. One way of doing this is to define a DAG that has a vertex for every object in the partially ordered set, and an edge ''xy'' for every pair of objects for which ''x'' β€ ''y''. An alternative way of doing this is to use the [[transitive reduction]] of the partial ordering; in general, this produces DAGs with fewer edges, but the reachability relation in these DAGs is still the same partial order. By using these constructions, one can use topological ordering algorithms to find linear extensions of partial orders.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)