Data Structures and Notation

G=(V,E) is a graph, with V[G] as its vertices (or nodes), and E[G] as its edges (or links).

By convention, n = |V| and m= |E|. Note that tex2html_wrap_inline168 .

Often, we also have tex2html_wrap_inline170 (connected, undirected graph).

For tex2html_wrap_inline172 , we write tex2html_wrap_inline174 to be the set of vertices to which u is directly connected (i.e., tex2html_wrap_inline178 if and only if tex2html_wrap_inline180 (adjacency list).

Note: Matrices also useful for representing edges: tex2html_wrap_inline182 if tex2html_wrap_inline180 and 0 otherwise (adjacency matrix). If A is an adjacency matrix representing a graph G, which does tex2html_wrap_inline192 represent?


next up previous
Next: Topological Sort in Words Up: TOPOLOGICAL SORT Previous: Topological Sort