Say we have a directed graph where each vertex vi represents a function fi(n) and there is an edge from vi to vj if and only if fi O(fj) (and i = j,…