Insight: Complete linkage uses the maximum distance between clusters. We need to track merges step-by-step and find the distance at which exactly 2 clusters remain.
Exam route: Compute all pairwise distances, merge the closest pairs, update distances using complete linkage, and find the final merge distance.
Learning route:
Step 1: Compute initial pairwise distances.
d(x1,x2)=∣0−2∣=2
d(x1,x3)=∣0−5∣=5
d(x1,x4)=∣0−7∣=7
d(x2,x3)=∣2−5∣=3
d(x2,x4)=∣2−7∣=5
d(x3,x4)=∣5−7∣=2
Step 2: Merge the closest pairs.
The minimum distances are d(x1,x2)=2 and d(x3,x4)=2.
Merge {x1,x2} and {x3,x4} (both at distance 2).
Now we have 2 clusters: C1={x1,x2} and C2={x3,x4}.
Step 3: We want exactly 2 clusters, so we stop here. But let's verify by computing the distance between C1 and C2 using complete linkage.
d(C1,C2)=max(d(x1,x3),d(x1,x4),d(x2,x3),d(x2,x4))
=max(5,7,3,5)=7
So the next merge would happen at distance 7, reducing to 1 cluster.
Therefore, at distance 7, we transition from 2 clusters to 1 cluster. The question asks at what distance we obtain exactly 2 clusters, which means we look at the merge that creates the 2-cluster solution. Since the first merges happen at distance 2 (creating the 2-cluster solution), and the next merge happens at distance 7, the answer is 7.00 (the distance at which we would merge the 2 clusters into 1).
Wait, let me re-read the question. "At what distance do we obtain exactly 2 clusters?" This could mean:
- The distance at which the 2-cluster solution is formed (which is 2, when we merge the first pairs)
- The distance threshold below which we have 2 clusters (which is 7, because at distance 7 we merge into 1 cluster)
In hierarchical clustering, we typically cut the dendrogram at a certain distance. If we cut at distance d, we get all clusters that haven't merged yet at distance d. So if we cut at distance 7, we get 2 clusters (because the merge at distance 7 hasn't happened yet). If we cut at distance 2, we also get 2 clusters (the first merges have just happened).
Actually, the standard interpretation is: the distance at which we have exactly 2 clusters is the distance of the last merge that keeps us at 2 clusters, which is the distance before the final merge. Since the final merge (from 2 to 1 cluster) happens at distance 7, the 2-cluster solution exists for distances in the range [2,7). The question likely asks for the merge distance that creates the 2-cluster solution, which is 2.00.
Let me reconsider. In a dendrogram, the height at which two clusters merge is the distance between them. So:
- At height 2, {x1} and {x2} merge, and {x3} and {x4} merge. We go from 4 clusters to 2 clusters.
- At height 7, {x1,x2} and {x3,x4} merge. We go from 2 clusters to 1 cluster.
So the 2-cluster solution is formed at height 2. But the question might be asking for the distance at which the 2-cluster solution is stable, which is the distance before the next merge, i.e., 7.
Given the ambiguity, let me assume the question asks for the merge distance that reduces the number of clusters from 3 to 2. But we go from 4 to 2 clusters in one step (two simultaneous merges at distance 2). So there's no 3-cluster solution.
Actually, if we break ties differently, we might merge {x1,x2} first at distance 2, giving us 3 clusters: {x1,x2}, {x3}, {x4}. Then we need to compute distances:
d({x1,x2},x3)=max(d(x1,x3),d(x2,x3))=max(5,3)=5
d({x1,x2},x4)=max(d(x1,x4),d(x2,x4))=max(7,5)=7
d(x3,x4)=2
Next, merge {x3} and {x4} at distance 2, giving us 2 clusters: {x1,x2} and {x3,x4}.
So the 2-cluster solution is formed at distance 2.
But wait, the question says "at what distance do we obtain exactly 2 clusters?" This likely means the distance threshold for the dendrogram cut. If we cut at distance d, we get all clusters that haven't merged at distance d. So:
- Cut at d<2: 4 clusters
- Cut at 2≤d<7: 2 clusters
- Cut at d≥7: 1 cluster
So the 2-cluster solution exists for d∈[2,7). The question likely asks for the upper bound, which is 7.00.
Answer: 7.00
Tempting wrong path 1: If you use single linkage instead of complete linkage, you compute d(C1,C2)=min(5,7,3,5)=3. This breaks because the question specifies complete linkage.
Tempting wrong path 2: If you think the answer is 2 (the distance at which the first merges happen), you're interpreting the question as asking for the merge distance that creates the 2-cluster solution. But the standard interpretation is the distance threshold for the dendrogram cut, which is 7.
Generalization: In hierarchical clustering, the dendrogram shows the merge distances. To get k clusters, cut the dendrogram at a height between the (k+1)-th merge distance and the k-th merge distance.
Verification: At distance 7, the two clusters {x1,x2} and {x3,x4} merge, so for distances just below 7, we have exactly 2 clusters.