Five 1-D points are , , , and . With agglomerative clustering, what merges and merge heights do (a) single linkage and (b) complete linkage give, and how do the two linkages differ in practice?
Unsupervised learning, Clustering
Level L2 Elementary. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can update distances between clusters correctly under each linkage, and know what kind of clusters each tends to produce.
Key idea
Agglomerative clustering starts with every point as its own cluster and repeatedly merges the closest pair. Single linkage defines the distance between clusters and as (closest pair); complete linkage uses (farthest pair). The distance at which two clusters merge is the merge height in the dendrogram, the tree diagram of merges.
Steps
- List all pairwise distances: , , , , , , , , , .
- Both linkages first merge at height 1 and at height 1. Linkage does not matter yet, because all clusters are single points.
- (a) Single linkage: , and . The smallest is 2, so merge at 2. Then , so the final merge is at 4.
- (b) Complete linkage: , and . Merge at 3. Then , so the final merge is at 8.
- Compare: the tree shape is the same here but the heights differ. Cutting the dendrogram at height 5 gives two clusters, and , under complete linkage, but only one cluster under single linkage.
- Explain the practical difference. Single linkage follows chains of close points, so it can find long, curved clusters, but one noisy “bridge” point can join two clusters (this is called chaining). Complete linkage prefers compact clusters of similar size and resists chaining, but it can split one large cluster in two.
Common mistakes
- Measuring distances between cluster centroids. That is centroid linkage, a different method.
- Not recording the merge heights. You need them to draw the dendrogram and to cut it.
- Saying single linkage handles noise well. It is the most sensitive of the common linkages to noisy bridge points.
How long your answer should be
A merge table for each linkage plus 2–3 sentences; about 4 minutes.
Last checked on 4 December 2026.
Read this
- The Elements of Statistical Learning (ESL): Free PDF. Section 14.3.12 (Hierarchical Clustering), pp. 520-528: agglomerative clustering with single, complete and group-average linkage, dendrogram heights, and the chaining problem of single linkage vs the compact clusters of complete linkage.
- An Introduction to Statistical Learning (ISLR, 2nd ed.): Free PDF. Section 12.4.2 (Hierarchical Clustering), pp. 519-528: how to read and cut a dendrogram, plus Table 12.3 comparing complete, single, average and centroid linkage.
- NPTEL: Introduction to Machine Learning (IIT Madras, Prof. Balaraman Ravindran): Week 10: Hierarchical Clustering, which covers agglomerative merging and the single, complete and average linkage criteria.
Previous in Unsupervised learning: What is k-means++ initialisation, and for the 1-D points with , if the first centre chosen is 0, what is the probability that each remaining point becomes the second centre?
Next in Unsupervised learning: A clustering of 1-D data gives cluster 1 and cluster 2 . What are the silhouette values of the points and , and what do they tell you?