All Questions
Tagged with sorting directed-graphs
1 question
13
votes
1
answer
8k
views
How can you compute the number of topological sorts in a DAG?
If you have a directed acyclic graph (DAG) $G$, a topological sort is just an ordering of the vertices such that if an edge $x \to y$ exists in $G$, then the index of $x$ is less than the index of $y$....