What is the expected total number of topological sorts in a Directed a cyclic graph with $n$ vertices?

261 Views Asked by At

I know that a DAG with $n$ vertices can have $O(n!)$ topological sorts. However, I am interested in knowing the expected number of topological sorts in a randomly generated DAG?

1

There are 1 best solutions below

0
On BEST ANSWER

After a lot of time and effort of research, I've found my answer.

In a paper published by Graham Brightwell 1, he showed that the average number of linear extensions (topological sorts) for a partial order (DAG) $A_n$ is given by the following asymptotic functions:

enter image description here

It's worth noting that the average number is still of O(n!) in magnitude which I find very interesting. In other words, on average, your DAG will have A LOT of topological sorts. It's not just the worst case that is $O(n!)$

[1] The Average Number of Linear Extensions of a Partial Order