Question Details

Let 4 points in 3D: P1 = [2,3,4,], P2 = [3,1,1], P3 = [5, -2, 3] ,P4 = [3,3,3]. Hierarchical Agglomerative clustering is used to cluster the above points. If Manhattan Distance is used as the distance metric during clustering, which two points will be merged first?

Options

A

P2 P3

B

P1P2

C

P2P4

D

P3P4

Show Answer

Correct Answer :

Option C

P2P4

Solution :

The correct option is P2P4.

Hierarchical Agglomerative Clustering starts by treating each data point as a single cluster. At each step, it merges the two closest clusters. Since Manhattan distance is specified as the distance metric, we need to calculate the Manhattan distance between the pairs of points to find the pair with the smallest distance.

The Manhattan distance between two points A=[x1,y1,z1] and B=[x2,y2,z2] in 3D space is calculated using the formula:
d(A,B)=|x1-x2|+|y1-y2|+|z1-z2|

Let's calculate the Manhattan distances for the pairs given in the options:

1. For the pair P1 and P2:
d(P1,P2)=|2-3|+|3-1|+|4-1|
d(P1,P2)=1+2+3=6

2. For the pair P2 and P3:
d(P2,P3)=|3-5|+|1-(-2)|+|1-3|
d(P2,P3)=2+3+2=7

3. For the pair P2 and P4:
d(P2,P4)=|3-3|+|1-3|+|1-3|
d(P2,P4)=0+2+2=4

4. For the pair P3 and P4:
d(P3,P4)=|5-3|+|-2-3|+|3-3|
d(P3,P4)=2+5+0=7

Comparing the calculated Manhattan distances for the given choices, the distance between P2 and P4 is the smallest (equal to 4). Thus, the pair P2P4 has the highest similarity among the options and will be merged first.

Unlock Our Free Library

Access expert-curated educational resources and study materials—completely free.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...