Question: Consider our algorithm for computing a topological ordering that is based on depth - first search ( i . e . , NOT the straightforward
Consider our algorithm for computing a topological ordering that is based on depthfirst search ie NOT the "straightforward solution" Suppose we run this algorithm on a graph that is NOT directed acyclic. Obviously it won't compute a topological order since none exist
Does it compute an ordering that minimizes the number of edges that go backward?
For example, consider the fournode graph with the six directed edges Suppose the vertices are ordered Then there is one backwards arc, the arc. No ordering of the vertices has zero backwards arcs, and some have more than one.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
