B A F C E essage transmission In a netwo rk 21○○21Q 21 3 Connected Path Cycle Disconnected Tree Various kinds of undirected graphs
Various kinds of undirected graphs
Directed cycle Strongly connected Weakly connected Examples of directed graphs
Examples of directed graphs
12.2 Computer Representation Set Implementations of Digraphs pg 573 Definition a digraph G consists of a set V, called the vertices of G, and, for all VE V, a subset Av of V, called the set of vertices adjacent to v directed graph
12.2 Computer Representation Set Implementations of Digraphs pg.573 Definition A digraph G consists of a set V , called the vertices of G, and, for all vV, a subset Av of V, called the set of vertices adjacent to v. directed graph
number of vertices Set as a bit string: pg 573 at most max size template <int max set> struct Set I bool is_element[max_set]s Digraph as a bit-strip set template <int Dax_size> class Digraph I int count Set<max size> neighbors[max size];
Digraph as a bit-string set: template <int max_size> class Digraph { int count; Set<max_size> neighbors[max_size]; }; number of vertices at most max_size Set as a bit string: pg.573 template <int max_set> struct Set { bool is_element[max_set]; };
Adjacency matrix Digraph as an adjacency table: pg 57 template < int max size> class digraph int count. bool adjacency[max size[max size]
Digraph as an adjacency table: pg.574 template <int max_size> class Digraph { int count; bool adjacency[max_size][max_size]; }; Adjacency matrix