
406 ◾ Software Metrics
9.3.4 Tree Impurity
e graphs in Figure 9.21 represent dierent system structures that might
be found in a typical design. ey exhibit properties that may help us to
judge good designs. We say that a graph is connected if, for each pair of
nodes in the graph, there is a path between the two. All of the graphs
in Figure 9.21 are connected. e complete graph, K
n
, is a graph with n
nodes, where every node is connected to every other node, so there are
n(n − 1)/2 edges. Graphs G
4
, G
5
, and G
6
in Figure 9.21 are complete graphs
with three, four, and ve nodes, respectively. e graph G
1
in Figure 9.21 is
called a tree, b