DiGraphs

ClassS04CS141 | recent changes | Preferences

No diff available--this is the first major revision. (no other diffs)

Directed Graphs

Directed graphs are graphs in which each edge (u,v) has an orientation. That is, the edge (u,v) (from u to v) is different than the edge (v,u) (from v to u). Thus, the edge set is a subset of V× V -- the ordered pairs of vertices.

Paths and cycles in directed graphs must traverse edges in the forward direction. That is, if a path has vertices v1, v2, ... vk, then each edge (vi, vi+1) must exist.

BreadthFirstSearch (BFS) extends straightforwardly to directed graphs.

DepthFirstSearch (DFS) also works in directed graphs, but it becomes more interesting.

See DFSInDiGraphs .


References


ClassS04CS141 | recent changes | Preferences
This page is read-only | View other revisions
Last edited May 4, 2004 8:40 pm by Neal (diff)
Search: