**Begin Outer Loop for Z > Zo**

While Z < Large

*Initialization(A)*. Set Znext = Large, K = N (= {1, …, n}), and for each k ∈ K let.

L(k) = k, N<sup>k</sup> = {k}, E<sup>k</sup> = ∅, and MinCostA(k) = MinCostB(k) = MinCostC(k) = Large.

*Initialization(B)*. Let i′ = p(1) and i″ = q(1) and select e(1) (= (i′, i″)).Set k′ = L(i′) and k″ = L(i″) and absorb Nk″ into Nk′ to create the cluster Nk′: = Nk′∪ N<sup>k</sup> ″= {i′, i″} with edge set Ek′ = e(1). Set MinCostA(k′) = c(e(1)) and MinCostB(i) = c(e(1)) for i = i′ and i″ and set K: = K \ {k″}. Then set n<sup>e</sup> = 1 and s = 1.

If (Copy = False) then.

#### **Execute Preliminary Loop**

Set v\* = Max(v: s3(v) < s2(v<sup>2</sup> )); v<sup>3</sup> = v\* + 1; s3(v<sup>3</sup> ) = s2(v<sup>2</sup> ); v<sup>2</sup> : = v<sup>2</sup> –1.

v = 1

While v < v3

v: = v + 1

s = s3(v)

Identify edge e(s) = (p(s), q(s)). Let i′ = p(s), i″ = q(s) and let k′ = L(i′) and k″ = L(i″).

Execute Case (3): Absorb Nk″ into Nk′ by setting Nk′: = Nk′∪ Nk″ with its associated edge set Ek″: = Ek′∪ Ek″ ∪ {e(s)}. Set L(i) = k′ for all i∈ N<sup>k</sup> ″, and set MinCostA(k′): = Min(MinCostA(k′),MinCostA(k″), c(e(s)); MinCostB(i): = Min(MinCostB(i),c(e(s)) for i = i′ and i″ (thus yielding MinCostC(i) by the definitions of Section 7). Set K: = K \ {k″} and sEnd = s. Set ne: = n<sup>e</sup> + 1 and if ne = n – 1 terminate the C(Z) Algorithm.

EndWhile

Set s = s3(v<sup>3</sup> )

Else

Read the latest copy of ne and the arrays saved in Case (2) of the Inner Loop into the active form of these arrays. Set s = s2(v<sup>2</sup> ) and Copy = False.

Endif

interest for experimental purposes. The case where added memory is used is identified in Case (2) so that this memory need not be used if desired. (In that case, the variable Copy will

*Initialization(A)*. Set Znext = Large, K = N (= {1, …, n}), and for each k ∈ K let.

*Initialization(B)*. Let i′ = p(1) and i″ = q(1) and select e(1) (= (i′, i″)).Set k′ = L(i′) and k″ =

= e(1). Set MinCostA(k′) = c(e(1)) and MinCostB(i) = c(e(1)) for i = i′ and i″ and set K: = K

)); v<sup>3</sup> = v\* + 1; s3(v<sup>3</sup>

= ∅, and MinCostA(k) = MinCostB(k) = MinCostC(k) = Large.

) = s2(v<sup>2</sup>

Identify edge e(s) = (p(s), q(s)). Let i′ = p(s), i″ = q(s) and let k′ = L(i′) and k″

Execute Case (3): Absorb Nk″ into Nk′ by setting Nk′: = Nk′∪ Nk″ with its

MinCostA(k′): = Min(MinCostA(k′),MinCostA(k″), c(e(s)); MinCostB(i): = Min(MinCostB(i),c(e(s)) for i = i′ and i″ (thus yielding MinCostC(i) by the definitions of Section 7). Set K: = K \ {k″} and sEnd = s. Set ne: = n<sup>e</sup> + 1 and if

) and Copy = False.

and the arrays saved in Case (2) of the Inner Loop into the

associated edge set Ek″: = Ek′∪ Ek″ ∪ {e(s)}. Set L(i) = k′ for all i∈ N<sup>k</sup>

); v<sup>2</sup> : = v<sup>2</sup> –1.

″= {i′, i″} with edge set Ek′

″, and set

*Inputs*: The graph G(N, E), cost vector c(e), e ∈ E, initial Zo value for Z. Edges are ordered so that the costs satisfy c(e(1)) ≤ c(e(2)) ≤ … ≤ c(e(|E|)).

L(i″) and absorb Nk″ into Nk′ to create the cluster Nk′: = Nk′∪ N<sup>k</sup>

ne = n – 1 terminate the C(Z) Algorithm.

always remain False, as in Initialization(B).) **C(Z) Algorithm with Accelerated Updates**

Set Z = Zo and sLast = |E|. Copy = False. **Execute Routine for Z = Zo** (Given Below)

\ {k″}. Then set n<sup>e</sup> = 1 and s = 1.

v: = v + 1 s = s3(v)

= L(i″).

**Execute Preliminary Loop** Set v\* = Max(v: s3(v) < s2(v<sup>2</sup>

**Begin Outer Loop for Z > Zo**

150 Recent Applications in Data Clustering

L(k) = k, N<sup>k</sup> = {k}, E<sup>k</sup>

If (Copy = False) then.

While v < v3

EndWhile

)

Read the latest copy of ne

active form of these arrays. Set s = s2(v<sup>2</sup>

Set s = s3(v<sup>3</sup>

Else

v = 1

While Z < Large

#### **Begin Inner Loop**

While s < sLast

Set s: = s + 1 and identify edge e(s) = (p(s), q(s)). Let i′ = p(s), i″ = q(s) and let k′ = L(i′) and k″ = L(i″).

Case (1): If k′ = k″, then continue to the next iteration of the Inner Loop.

Case (2): If c(e(s)) > Z + MinCostC0, then compute Znext = Min(Znext, c(e(s)) – MinCostC0), set v<sup>2</sup> = v<sup>2</sup> + 1, s2(v<sup>2</sup> ) = s, Z(v<sup>2</sup> ) = Znext.

*For added memory case*:

Set Copy = True and record a copy of ne, the set K and arrays N<sup>k</sup> , E<sup>k</sup> , MinCostA(k), k ∈K and the arrays L(i), MinCostB(i), MinCostC(i), i∈ N (writing over any previous copy).

Continue to the next iteration of the Inner Loop.

Case (3): Absorb Nk″ into Nk′ by setting Nk′: = Nk′∪Nk″ with its associated edge set Ek″: = Ek′∪ Ek″ ∪{e(s)}. Set L(i)=k′ for all i∈ N<sup>k</sup> ″, and set MinCostA(k′): = Min(MinCostA(k′), MinCostA(k″), c(e(s)); MinCostB(i): = Min(MinCostB(i), c(e(s)) for i = i′ and i″ (thus yielding MinCostC(i) by the definitions of Section 7). Set K: = K \ {k″} and sEnd = s.Set v<sup>3</sup> := v<sup>3</sup> + 1, s3(v<sup>3</sup> ) = s, ne:= n<sup>e</sup> + 1 and if n<sup>e</sup> = n – 1 terminate the Inner Loop.

Endwhile

Z = Znext

sLast = sEnd

If v<sup>2</sup> = 1 terminate the C(Z) Algorithm

#### Endwhile

#### **End of C(Z) Algorithm**

#### **Routine for Z = Zo**

*Initialization(A)*. Set Znext = Large, K = N (= {1, …, n}), and for each k ∈ K let.

L(k) = k, N<sup>k</sup> = {k}, E<sup>k</sup> = ∅, and MinCostA(k) = MinCostB(k) = MinCostC(k) = Large.

*Initialization(B)*. Let i′ = p(1) and i″ = q(1) and select e(1) (= (i′, i″)).Set k′ = L(i′) and.

k″ = L(i″) and absorb Nk″ into Nk′ to create the cluster Nk′: = Nk′∪ N<sup>k</sup> ″= {i′, i″} with edge set Ek′ = e(1). Set MinCostA(k′) = c(e(1)) and MinCostB(i) = c(e(1)) for i = i′ and i″ and set K: = K \ {k″}. Set v<sup>2</sup> = v<sup>3</sup> = 1; s2(1) = s3(1) = 1 and Z(1) = Large. Set n<sup>e</sup> = 1 and s = 1.

Initialization(C): Set nk = 1, k ∈ K \ {k′}, and nk′ = 2; set t(i) = 0 for i∈ N \{i′, i″} and set t(i′) = t(i″) = 1. Set nTrack = 0 and set FirstTime(k) = True, k ∈ K.

#### **Begin Inner Loop**

While s < sLast

Set s: = s + 1 and identify edge e(s) = (p(s), q(s)). Let i′ = p(s), i″ = q(s) and let k′ = L(i′) and k″ = L(i″). For i = i′ and i″: If i = L(i) then set t(i): = t(i) + 1 and if (now) t(i) = tMax(i) then set nTrack: = nTrack +1 and if (now) nTrack = n terminate the Inner Loop.

**Author details**

\* and Yang Wang<sup>2</sup>

Intelligence. 1985;**25**(2):236-238

2008;**7**(3):225-239

puter Science; 2009

2008

Understanding the Nature of Learning. 1983;**2**:3-26

big impact. MIS Quarterly. 2012;**36**(4):1165-1188

Genome Informatics. 2001;**12**:24-33

\*Address all correspondence to: fredwglover@yahoo.com

1 School of Engineering and Science, University of Colorado, Boulder, CO, USA 2 School of Management, Northwestern Polytechnical University, Xian, China

[1] Anderberg MR. Cluster analysis for applications. In: Monographs and Textbooks on Probability and Mathematical Statistics. New York: Academic Press, Inc.; 1973

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

[2] Stefik MJ. Machine learning: An artificial intelligence approach. R.S. Michalski, J.G. Carbonell and T.M. Mitchell, (Tioga, Palo Alto, CA); 572 pages, \$39.50. Artificial

[3] Michalski RS, Carbonell JG, Learning TMMM. An artificial intelligence approach.

[4] Rinzivillo S, Pedreschi D, Nanni M, Giannotti F, Andrienko N, Andrienko G. Visually driven analysis of movement data by progressive clustering. Information Visualization.

[5] Chen H, Chiang RHL, Storey VC. Business intelligence and analytics: From big data to

[6] Xu Y, Olman V, Xu D. Minimum spanning trees for gene expression data clustering.

[7] Xu Y, Olman V, Xu D. Clustering gene expression data using a graph-theoretic approach: An application of minimum spanning trees. Bioinformatics. 2002;**18**(4):536-545

[8] Jana PK, Naik A, editors. An efficient minimum spanning tree based clustering algorithm. In: Proceedings of International Conference on Methods and MODELS in Com-

[9] Grygorash O, Zhou Y, Jorgensen Z, editors. Minimum spanning tree based clustering algorithms. In: IEEE International Conference on TOOLS with Artificial Intelligence;

[10] Wang ZM, Soh YC, Song Q, Kang S. Adaptive spatial information-theoretic clustering

[11] Gower JC, Ross GJS. Minimum spanning trees and single linkage cluster analysis.

for image segmentation. Pattern Recognition. 2009;**42**(9):2029-2044

Journal of the Royal Statistical Society. 1969;**18**(1):54-64

Fred Glover<sup>1</sup>

**References**

Case (1): If k′ = k″ (i′ and i″ belong to the same cluster), then continue to the next iteration of the Inner Loop.

Case (2): Execute the following for k = k′ and k = k″: If FirstTime(k) = True, then if c(e(s)) > Z + MinCostC(k): set FirstTime(k) = False, set nTrack: = nTrack + n<sup>k</sup> , compute Znext = Min(Znext, c(e(s)) – MinCostC(k) and if (now) nTrack = n, terminate the Inner Loop. After performing the preceding for both k′ and k″: If FirstTime(k) = False for k = k′ or k = k″ execute the following (and otherwise proceed to Case (3)): set v<sup>2</sup> = v<sup>2</sup> + 1, s2(v<sup>2</sup> ) = s, Z(v<sup>2</sup> ) = Znext.

*For added memory case*:

Set Copy = True and record a copy of ne, the set K and arrays N<sup>k</sup> , E<sup>k</sup> , MinCostA(k), k ∈K and the arrays L(i), MinCostB(i), MinCostC(i), i∈ N (writing over any previous copy).

Continue to the next iteration of the Inner Loop.

Case (3): Absorb Nk″ into Nk′ to create the larger cluster Nk′: = Nk′∪ Nk″ with its associated edge set Ek″: = Ek′∪ Ek″ ∪{e(s)}. Correspondingly, update L(i) by setting L(i) = k′ for all i∈ N<sup>k</sup> ″, and set MinCostA(k′): = Min(MinCostA(k′),MinCostA(k″), c(e(s)); MinCostB(i): = Min(MinCostB(i),c(e(s)) for i = i′ and i″ (thus yielding MinCostC(i) by the definitions of Section 7). Set K: = K \ {k″}, nk′: = nk′ + n<sup>k</sup> ″, and sEnd = s. Set v<sup>3</sup> := v3 + 1, s3(v<sup>3</sup> ) = s, n<sup>e</sup> := n<sup>e</sup> + 1 and if n<sup>e</sup> = n – 1 terminate the Inner Loop.

Endwhile

Z = Znext

sLast = sEnd

If v<sup>2</sup> = 1 then

Terminate the C(Z) Algorithm

Else.

$$\mathbf{v}^\* = \text{Max}(\mathbf{v} \colon \mathbf{s} \mathbf{3}(\mathbf{v}) \le \mathbf{s} \mathbf{2}(\mathbf{v}\_2)) \\
\text{; } \mathbf{v}\_\circ = \mathbf{v}^\* + 1 \text{; } \mathbf{s} \mathbf{3}(\mathbf{v}\_\circ) = \mathbf{s} \mathbf{2}(\mathbf{v}\_\circ) \\
\text{; } \mathbf{v}\_\circ \coloneqq \mathbf{v}\_\circ - 1.$$

Endif

**End of Routine for Z = Zo**
