d
i
k
=
1
2
d
i
j
+
d
i
m
-
d
j
m