arXiv:2608.23267math.MGAug 2026

Manuscript Offprint

arXiv:2608.23267

An Approach to Study the Structural Consistency of Triangle Badness Functions and Distance Metrics

Bowen Liu, Yizhou Wang, Lingqian Meng

Abstract

Triangle-based measures, commonly referred to as badness functions, are widely employed to quantify the extent to which a distance matrix deviates from an ideal geometric configuration. Different formulations of these functions may capture distinct facets of local non-uniformity, and their behavior is often influenced by the underlying distance metric chosen for evaluation. In practical settings, although a canonical badness function may be conceptually preferred, factors such as computational cost, algorithmic constraints, or data-specific characteristics frequently necessitate the adoption of modified versions—for instance, approximate forms or alternatives defined under different distance metrics. This gives rise to a central question: to what degree do these variants retain the structural consistency properties of their original counterparts? To address this issue, we develop a systematic correlation-based framework for evaluating structural consistency. As an illustrative instantiation of this framework, we compute badness sequences from a set of representative distance matrices alongside randomly generated triangle configurations, which are designed to cover variants that may arise under diverse practical scenarios. We then assess pairwise similarities among these sequences using four correlation coefficients. The experimental outcomes indicate that certain badness variants exhibit a notably high degree of structural consistency, whereas others reveal complementary behavioral patterns; moreover, the choice of distance metric exerts a considerable influence on the observed trends. These findings offer practical insights for the informed selection of distance metrics and triangle badness function variants in tasks including geometric reconstruction, triangulation, and structural analysis of pairwise distance data.

Keywords: Triangle Badness Function, Distance Metric, Structural Consistency, Rank Correlation.

1 Introduction

The hypothesis of the molecular clock of evolution emerged from the observation that the number of amino acid differences between homologous proteins is approximately proportional to

*Bowen Liu: Corresponding author. Student, Faculty of Computational Mathematics and Cybernetics, Shenzhen MSU–BIT University; email: liubowenmbu@outlook.com.

†^{\dagger}Yizhou Wang: Methodology and Computational Analysis Lead. Master's Student, Department of Automation for Scientific Research, Faculty of Computational Mathematics and Cybernetics, Lomonosov Moscow State University; email: saipeizyu@gmail.com.

‡^{\ddagger}Lingqian Meng: PhD Student, Department of Algorithmic Languages, Faculty of Computational Mathematics and Cybernetics, Lomonosov Moscow State University; email: menglq@cs.msu.ru.

the time elapsed since the divergence of the corresponding organisms [35][34][26]. This observation was later incorporated into Kimura’s neutral theory of molecular evolution [22][19][21][23], which assumes that a large proportion of mutations are selectively neutral and that their fixation is governed by stochastic processes such as genetic drift. Within this framework, the rate of molecular evolution can be considered approximately constant over time.

As a consequence, evolutionary distances derived from sequence data often exhibit regular structural patterns. In particular, when evolutionary rates are approximately homogeneous across lineages, pairwise distances between closely related taxa tend to satisfy near-ultrametric constraints [15], implying that triples of taxa form approximately isosceles (or equilateral) triangle configurations. This geometric property reflects the idea that sequences diverging from a common ancestor over comparable time spans accumulate similar numbers of substitutions.

However, real-world molecular data frequently deviate from this idealized behavior. Rate heterogeneity, slightly deleterious mutations, generation-time effects, and other biological factors introduce variability in substitution rates, leading to violations of the strict molecular clock assumption [21] [20] [16] [24] [17]. Consequently, the resulting distance matrices are only approximately ultrametric, and the corresponding triangle configurations may deviate from the ideal isosceles structure.

Furthermore, similar considerations arise in distance-based triangulation problems, where triangle structures are used to characterize geometric consistency. Distance-based triangulation methods [28] [29] are fundamental techniques for reconstructing point configurations from pairwise distances and are widely used in applications such as sensor network localization, robotic mapping, and spatial reconstruction. Moreover, these triangulation techniques are often used as a preprocessing step for subsequent computational tasks. For example, in certain solution approaches to the traveling salesman problem (TSP) [30], methods such as the onion-husk algorithm [1] utilize distance-based reconstruction to improve tour construction. In the ideal case of exact distance measurements, triangulation yields consistent and accurate coordinates. However, in practical settings, distance data are often corrupted by noise and random errors, leading to inconsistencies between the reconstructed configuration and the true geometric structure.

From a geometric perspective, the triangulation process inherently relies on local triangle structures: each new point is typically determined by forming triangles with already known points. When distance data are noisy, different triangle configurations exhibit varying sensitivity to perturbations, resulting in geometric uncertainty. This phenomenon is closely related to the concept of geometric dilution of precision (GDOP) [3], which was introduced to quantify the impact of geometric configurations on positioning accuracy [18] [25] [32]. Similar considerations naturally arise in triangulation problems with noisy inputs. In such settings, analyzing the structure of local triangles provides a natural and effective way to assess the stability of the reconstruction.

In the astrophysical numerical measurements calculation, for extremely small parallax, i.e., extremely narrow acute triangle, additional methods are often required, such as Bayesian spatial reconstruction methods based on the prior distribution of galaxy density, to reconstruct the data [6]. For materials characterization, data need to be triangulated using, i.e., Delaunay algorithm to connect isolated points into physically meaningful material surfaces or internal grains [14]. In materials measurements, the coherence and speckle noise of laser instruments can cause measurement errors [4]. Noise processing is necessary during reconstruction through experimental characterization of the microstructure, generation with geometrical methods concentrating solely on mimicking the morphology, et cetera [13]. The study of triangle structural properties can be used to construct relevant criteria for noise removal algorithms and triangle reconstruction processes.

Based on the above observations, triangles can be viewed as fundamental units for capturing local consistency and deviations, both in evolutionary distance analysis and in geometric reconstruction problems.

These deviations naturally motivate the introduction of quantitative measures to capture the extent to which local triangle configurations depart from ideal geometric constraints. Such measures, referred to in this paper as badness functions, can be interpreted as local indicators of inconsistency with respect to an underlying evolutionary model or geometric structure.

Importantly, different definitions of badness may emphasize different aspects of deviation, such as imbalance of edge lengths or angular distortion. From an optimization perspective, these functions often arise as surrogate objectives designed to satisfy specific requirements of optimization algorithms, such as smoothness, computational tractability, or robustness. As a result, different badness functions may correspond to different approximations of the original problem, potentially distorting its intrinsic structure. Moreover, different choices of distance metrics can also lead to varying results.

This observation motivates a key question: to what extent do different triangle badness functions respond consistently to the same underlying geometric structures? Additionally, how do different distance metrics affect the results, and to what extent do they influence the observed patterns?

To address this question, we propose a systematic evaluation framework in which four distinct correlation coefficients are used to quantify consistency across different scenarios. Each correlation coefficient will be introduced in detail in the following sections.

The remainder of this article is organized as follows. In Section 2, we introduce the triangle badness functions used in this study as representative examples. We do not provide a detailed discussion of the specific distance measures, as these are standard distances adopted from existing literature and are described in detail in the experimental design. Section 3 presents the rank correlation methods employed to quantify the structural similarity between badness sequences, explaining the significance of each coefficient. In Section 4, we describe the experimental setup, including dataset selection, preprocessing, and computation of badness sequences. Finally, Section 5 reports the correlation results obtained from these experiments and provides an interpretation of the findings.

References (33)