**4. Fundamental relationships for accelerating the algorithm**

A number of key relationships hold for the C(W) Algorithm that make it possible to accelerate its execution. We discuss the relationships here in broad outline and then incorporate them in Section 7 within a template for a computer code that applies not only to C(W) but to additional related types of cluster collections C(Y) and C(Z) whose algorithms are described in Sections 5 and 6.

checks of Case (2) is not great in any case. Instead, we can make use of the foregoing relationships in a simpler manner without having to keep track of the values k(1), k(2), …, k(m).

nk = 1, and then setting nk′: = nk′ + nk″ when Nk″ is absorbed into Nk′ in Case (3). We also record the number of times t(i) each node i is encountered as a node i′ = p(s) or i″ = q(s) by initializing t(i) = 0 for all i, and then setting t(i′): = t(i′) + 1 and t(i″): = t(i″) + 1 when the edge e(s) is examined in the prelude to Case (1)of the algorithm (and also for i′ and i″ in the Initialization). Note that t(i) is bounded by tMax(i) which is the number of nodes adjacent to i in the graph G

We are interested in determining when t(i) = tMax(i) for an isolated node. We can conveniently identify the condition of being isolated by i = L(i). In conjunction with the preceding records, this makes it possible to keep track of the number nTrack of nodes that cannot take part in any further steps of adding an edge to C(W), and hence permitting the inner loop to

Specifically, by initializing nTrack = 0, the first time c(e(s)) > W + MinCost(k)occurs for a given

FirstTime(k) = True, and then set FirstTime(k) = False at the point of setting nTrack: = nTrack + nk.) We also set nTrack: = nTrack + 1 whenever t(i) is incremented for i = i′ and i″ in the prelude to Cases (1) to (3) to yield t(i) = tMax(i) under the condition that i = L(i). By checking for nTrack = n at each point where nTrack changes its value, we can then terminate the inner loop

Having performed the foregoing operations to terminate early for W = Wo, we may take advantage of another useful relationship to terminate early for all W > Wo. In particular, let sEnd(W) equal the value of s for the final edge e(s) added to C(W) for a given W. Then for values W′ and W″ such that W″ > W′, we are assured that sEnd(W″) ≤ sEnd(W′). Consequently, we can exploit this fact by introducing a variable sEnd which is set to sEnd = s at the conclusion of Case (3), which will cause sEnd to be the index s of the final edge added in constructing the current C(W). Then it is only necessary to set sLast = sEnd after the termination of the Inner Loop, thus overriding the initialization sLast = |E| to permit the next execution of the Inner Loop to terminate earlier. We can also allow the final execution of the Inner Loop to terminate earlier by the fact that the spanning tree generated on this execution will have n − 1

We can also accelerate the computation of the algorithm by saving information to produce an advanced start on successive executions of the Inner Loop. The underlying relationships are

where the values s2(v) for v > 1 identify successive edges e(s) for which a new (smaller) value of Wnext is identified in Case (2). Also, starting with W(1) = Large, let W(1), W(2), …, W(v″) denote the corresponding values for Wnext identified at these points (hence, for v<sup>2</sup> > 1,

)). Similarly, let s3(1), s3(2), …, s3(v<sup>3</sup>

) denote the s indexes starting with s2(1) = 1 (when Wnext = Large)

) denote the s indexes starting with

edges, while all other constructions must have fewer than this number of edges.

in each node set N<sup>k</sup>

A Class of Parametric Tree-Based Clustering Methods http://dx.doi.org/10.5772/intechopen.76406

. (To identify this first occurrence, initialize

by initializing all

141

To accomplish this, we record the number of elements n<sup>k</sup>

(where tMax(i) = n – 1 if G is complete).

k = k′ or k″ in Case (2), we set nTrack: = nTrack + n<sup>k</sup>

**4.2. Advanced starting for successive W values**

terminate when nTrack = n.

when this condition occurs.

as follows.

Let s2(1), s2(2), …, s2(v<sup>2</sup>

W(1) > W(2) > … > W(v<sup>2</sup>
