Tree Distance Sandbox β€” Cophenetic, Euclidean & Ultrametric

Compare three distance measures on a weighted tree and discover triadic rigidity: among any three points, the two largest ultrametric distances are equal

Tree Parameters

A Leaf A (cyan) B Leaf B (amber)

Distances

Cophenetic Distanceβ€”
Euclidean Distanceβ€”
Ultrametric Distanceβ€”
Triadic Rigidityβ€”
dcoph(a,b) = depth(LCA(a,b))
dultra(a,b) = pβˆ’depth(LCA(a,b))
deucl(a,b) = √(Ξ£ (aiβˆ’bi)Β²)
Triadic rigidity: among any 3 leaves, the two largest ultrametric distances are equal. Guaranteed by the strong triangle inequality.

Weighted Tree β€” p=3, d=4

Distance Comparison