Question: Topological Sort: Let G = (V,E) be a complete directed acyclic graph that has an edge between every pair of vertices and whose vertices are
Topological Sort:
Let G = (V,E) be a complete directed acyclic graph that has an edge between every pair of vertices and whose vertices are labelled 1, 2, . . . , n, where n = |V |. To determine the direction of an edge between two vertices in V you are only allowed to ask a query. A query consists of two specified vertices u and v and is answered as follows:
from u to v if (u,v)E ,or
from v to u if (v,u)E
Give a worst-case lower bound (as a function of n) for the number of queries required to find a topological sort of G. (Hint: this problem can be solved by popular algorithms)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
