Checkout
checkout
view
Your Cart Your Cart: item(s)
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Data Structures and Algorithms
Year 3

Topological Sorting


An algorithm for computing a topological ordering of a DAG(Directed
Acyclic Graph) repeatedly finds a node with no incoming edges and
deletes it. This will eventually produce a topological ordering,
provided that the input graph really is a DAG.

But suppose that we're given an arbitrary graph that may or may not
be a DAG. Extend the topological ordering algorithm so that given an
input directed graph G it outputs one of two things: (a) a topological
ordering, thus establishing that G is a DAG; or (b) a cycle in G, and
thus establishing that G is not a DAG. The running time of your
algorithm should be O(m+n) for a directed graph with n nodes and m
edges.

By OTA:  Mike Mikailov, PhD

OTA Rating:  4.8/5

What's included:

  • Plain text response
  • Attachment(s):
    • TopologicalSorting.pdf
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download

Page generated in 0.0201 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples