This is an old revision of the document!


Chapter 3: Graphs

3.1 Basic Definitions and Applications

3.2 Graph Connectivity and Graph Traversal

3.3 Implementing Graph Traversal Using Queues and Stacks

3.5 Connectivity in Directed Graphs

3.6 Directed Acyclic Graphs and Topological Ordering

DAGs are directed graphs that do not contain cycles. G is a DAG ⇔ G has a topological ordering. Despite DAGs having no cycles, they can contain nC2 nodes. To find a topological ordering, recursively find nodes with no incoming edges and order them next in the ordering. (Once you order a node, delete it and all of its outgoing edges; this will cause there to be at least one new node that does not have an incoming edge.) Such an algorithm can run in time O(m+n).

courses/cs211/winter2011/journals/charles/chapter3.1297700638.txt.gz · Last modified: 2011/02/14 16:23 by gouldc
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0