正在加载图片...
2. Describe in detail the topological sort algorithm, and what the running time it is when using it to sort the vertices of a DAG Can the topological sort be used to solve the single-source shortest path problem for a DAG with negative edge path costs? Why? (10 points) 3. Give an algorithm to find the minimum number of edges that need to be removed from an undirected graph so that the resulting graph is acyclic. Show that this problem IS NP-complete for directed graphs? (10 points)- 2 - 2. Describe in detail the topological sort algorithm, and what the running time it is when using it to sort the vertices of a DAG. Can the topological sort be used to solve the single-source shortest path problem for a DAG with negative edge path costs? Why? (10 points) 3. Give an algorithm to find the minimum number of edges that need to be removed from an undirected graph so that the resulting graph is acyclic. Show that this problem is NP-complete for directed graphs? (10 points)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有