I came across the following formula $$ d_2 (X, Y) = \sum_{j=1}^p (x_j − y_j)^2 + \gamma \sum_{j=p+1}^m \delta (x_j,y_j) $$
Are the two parts of the formula multiplying each other?
I assumed this to be the case but it does not make sense as this is a distance function. If the second part equates to $0$ then the result would be that $X$ and $Y$ are $0$ unit apart even though they might not be according to the first half.
However, there is a clarification from the author, that I don't understand: "The weight $\gamma$ is used to avoid favouring either type of attribute".
How would you interpret this formula properly?
Source: "Extensions to the k-Means Algorithm for Clustering Large Data Sets with Categorical Values" formula 9.