betaFeedback

WorksComputer Science

How to Fix a Broken Metric: A Linear Kernel, Tight Bounds, and Tree Metrics

Abstract

Given a complete graph whose edge weights represent dissimilarities, Metric Violation Distance asks whether at most kk weights can be changed to form a metric. Motivated by metric repair for noisy data, the problem admits a polynomial-time O(log⁡n)O(\log n)-approximation due to Cohen-Addad, Fan, Lee and de Mesmay [SIAM J. Comput., 2025]. In the context of parameterized complexity, Fan, Gilbert, Raichel, Sonthalia and Van Buskirk [SWAT 2020] gave a kO(k)nO(1)k^{O(k)}n^{O(1)}-time algorithm. Fomin, Golovach and More [IPEC 2026] obtained an O(k2)O(k^2) kernel and a single-exponential algorithm for the ultrametric case. They asked whether general metrics admit a single-exponential algorithm and a polynomial kernel, and whether the tree-metric analogue is fixed-parameter tractable. We answer all three questions. We give a 2O(k)nO(1)2^{O(k)}n^{O(1)}-time algorithm and prove that, unless ETH fails, no 2o(k)nO(1)2^{o(k)}n^{O(1)}-time algorithm exists, even when all input distances lie in {1,2,3}\{1,2,3\}. We also give a kernel with at most 6k6k vertices. The kernel supports solution lifting and can precede any approximation algorithm. Combined with the O(log⁡n)O(\log n)-approximation of Cohen-Addad, Fan, Lee and de Mesmay, it yields an O(log⁡OPT)O(\log \mathrm{OPT})-approximation at no asymptotic cost in running time. Both results extend to an interval generalization in which each edge ee has an observed value MeM_e and an admissible range [Ae,Be][A_e,B_e] within which it may be reassigned; the kernel then has 7k7k vertices. Finally, Tree Metric Violation Distance is fixed-parameter tractable and solvable in kO(k)nO(1)k^{O(k)}n^{O(1)} time.

Introduction

Many algorithms in data analysis use distances in a metric space to represent dissimilarities between data points. This assumption is useful both conceptually and algorithmically: metric structure is central in clustering, metric embeddings, and many approximation algorithms. In practice, however, distances obtained from measurements, similarities, or incomplete data are often noisy, and may fail even the most basic metric constraint, namely the triangle inequality.

This motivates the problem of repairing a distance matrix. Classical metric repair, often formulated as metric nearness, asks for a nearby metric, typically with respect to an ℓp\ell_p-type objective [20, 19, 3]. Such repairs may change a large fraction of the input distances. The Metric Violation Distance problem instead asks for a sparse repair: given pairwise distances δ:E(G)→R≥0\delta: E(G) \to\mathbb{R}_{\ge0} on a complete graph, modify as few edge lengths as possible so that the resulting distances form a metric [14, 13]. Throughout, we work with the parameterized decision version: the input is (G,δ,k)(G, \delta, k), and the question is whether some S⊆E(G)S \subseteq E(G) with ∣S∣≤k|S| \le k admits a reassignment of the lengths of its edges after which δ\delta is a metric. The parameter is kk, the number of distances one is allowed to touch, and we call such an SS a feasible support.

The problem has mainly been studied from the viewpoint of approximation algorithms. Fan, Raichel, and Van Buskirk initiated this line, proving hardness results and giving an O(OPT1/3)O(\mathrm{OPT}^{1/3})-approximation [13]. More recently, Cohen-Addad, Fan, Lee, and de Mesmay gave an O(log⁡n)O(\log n)-approximation for Metric Violation Distance [6]. Whether the problem admits a constant-factor approximation remains open.

The same fitting approach has also been considered for more specific metrics, most notably ultrametrics and tree metrics [6 CG24, 16]. These metrics are central in applications where distances are expected to come from an underlying hierarchy: ultrametrics model hierarchical clusterings [1], while tree metrics are the basic distance model in phylogenetics and numerical taxonomy [17, 9 Far72]. A constant-factor approximation is known for these two variants [6 CG24, 16], but to our knowledge, nothing is known regarding their parameterized complexity.

In this paper we study the parameterized complexity of distance repair, parameterized by the number kk of distances that may be modified. Fan, Raichel and Van Buskirk [13] asked whether Metric Violation Distance on complete graphs is fixed-parameter tractable in the solution size. This was answered by Fan, Gilbert, Raichel, Sonthalia and Van Buskirk [FGR+20], who gave a bounded search-tree algorithm for the more general class of ζ\zeta-chordal graphs, those in which every chordless cycle has length at most ζ\zeta. Complete graphs are 33-chordal, so their algorithm solves Metric Violation Distance in kO(k)nO(1)k^{O(k)}n^{O(1)} time. Recently, Fomin Golovach and More [11] raised three questions about this state of affairs:

(Q1) Can the kO(k)k^{O(k)} dependence be improved to single-exponential?

(Q2) Does Metric Violation Distance admit a polynomial kernel?

(Q3) What is the parameterized complexity of the tree-metric analogue?

We answer all three.

Questions (Q1) and (Q2) are natural, and (Q2) has a concrete obstruction behind it: Fan et al. explicitly observe [FGR+20, Sec. 5] that the edges of the broken chordless cycles, which drive their search tree, do not form a kernel of size bounded by the parameter. Their example is KnK_n with one edge of weight n+1n+1 and all others of weight 11: the optimum has size 11, while 2n−32n-3 edges survive. A kernel must therefore come from somewhere else.

Our results hold for a natural interval generalization of the problem that we call INTERVAL METRIC VIOLATION. For every edge ee, the input consists of an observed value MeM_e and an allowed interval [Ae,Be][A_e, B_e]. If ee is not modified, its final length must remain MeM_e; if ee is modified, its final length may be chosen anywhere in [Ae,Be][A_e, B_e]. This captures the common situation where the observed distances come with uncertainty or confidence intervals. The standard METRIC VIOLATION DISTANCE problem is recovered by choosing sufficiently permissive intervals for modified edges.

Our Results and Techniques

Our first result answers (Q1): a single-exponential algorithm, improving the kO(k)nO(1)k^{O(k)}n^{O(1)} bound of [FGR+20].

Theorem 1.1. INTERVAL METRIC VIOLATION can be solved in 2O(k)⋅nO(1)2^{O(k)} \cdot n^{O(1)} time.

Both this and the kernel below rest on a characterization of the sets SS that can serve as supports. Every edge ee has a range of admissible final lengths, namely [Ae,Be][A_e, B_e] if e∈Se \in S and the single value MeM_e otherwise; write aS(e)a_S(e) and bS(e)b_S(e) for its endpoints. Call a cycle bad for SS if one of its edges hh satisfies aS(h)>∑f≠hbS(f)a_S(h) > \sum_{f \ne h} b_S(f), and call SS good if no cycle is bad for it. Goodness is testable in polynomial time by a shortest-path computation with lengths bSb_S, and Lemma 2.4 shows it to be equivalent to feasibility.

§ 3 then proceeds by random separation. Color the edges red and blue uniformly at random, and let FχF_\chi consist of the red edges whose deletion from the red set destroys goodness. If an inclusion-minimal solution OO is colored red, and the edges of the bad cycles certifying the minimality of each e∈Oe \in O are colored blue, then Fχ=OF_\chi= O exactly. To obtain the desired running time, those certifying cycles must not be large in aggregate: writing QQ for their edges outside OO, the coloring succeeds with probability 2−∣O∣−∣Q∣2^{-|O|-|Q|}. Choosing the cycles first to be shortest, and then, among those, so as to minimise the number of edges far from the heavy edge that are not already accounted for, we obtain ∣Q∣≤10k|Q| \le10k, hence success probability 2−11k2^{-11k}. Universal sets derandomize the algorithm.

Our second result answers (Q2), and does better than a polynomial kernel: the number of vertices is linear in kk.

Theorem 1.2. INTERVAL METRIC VIOLATION admits a kernel with at most 7k7k vertices, computable in O(n3)O(n^3) time. For the standard METRIC VIOLATION DISTANCE problem the bound improves to 6k6k vertices.

§ 4 starts from the triangles that already violate the triangle inequality. Take a maximal family of edge-disjoint such triangles; every feasible support must contain an edge of each, so more than kk of them is a NO-instance, and otherwise their at most 3k3k edges and 3k3k vertices form a mandatory core. What remains is to bound the rest of the graph: a vertex outside these triangles may still form an initially bad triangle with one of their edges, and there may be Θ(n)\Theta(n) such witnesses. Keeping k+1k+1 witnesses per edge is a representative-set argument, and gives an O(k2)O(k^2)-vertex kernel. To reach a linear bound we keep instead only what a matching needs: form the bipartite graph between outside vertices and the core edges they witness, take a maximum matching, and delete every unmatched outside vertex.

The rule is safe by an exchange argument along alternating paths, and this yields more than equivalence of the two instances: any solution SS of the kernel lifts, in O(n2)O(n^2) time, to a solution S+S^+ of the original instance with ∣S+∣≤∣S∣|S^+| \le|S|. The kernel is therefore solution-lifting, and can be placed in front of any approximation algorithm. Doing so before the O(log⁡n)O(\log n)-approximation of [6] gives, for the standard problem, an approximation factor of O(log⁡OPT)O(\log\mathrm{OPT}). This improvement is not merely cosmetic: in [6] they exhibit instances with optimum 1 on which their algorithm has expected cost Ω(log⁡n)\Omega(\log n). Moreover, the kernel runs in O(n3)O(n^3) time, matching their algorithm, so the preprocessing does not increase the asymptotic running time.

Our third result shows that the answer to (Q1) is optimal: the dependence on kk in Theorem 1.1 cannot be improved further.

Theorem 1.3. Unless ETH fails, Metric Violation Distance on complete graphs has no algorithm with running time 2o(k)nO(1)2^{o(k)}n^{O(1)}, even when all edge weights belong to {1,2,3}\{1,2,3\}.

§ 5 obtains this from a parameter-preserving reduction from Vertex Cover, which adds a single apex vertex rr to the input graph and gives weight 1 to every edge at rr, weight 3 to every edge of the graph, and weight 2 to every non-edge. The bad triangles of the construction are then exactly the triangles ruvruv with uvuv an edge, so hitting them is covering.

The last two sections move from metrics to the structured distance functions of numerical taxonomy. A distance function dd on a finite set XX is a tree metric if there is a tree TT with nonnegative edge lengths and X⊆V(T)X \subseteq V(T) such that d(x,y)d(x,y) is the length of the unique x,yx,y-path of TT; equivalently, dd is a metric satisfying the four-point condition, that for all distinct a,b,c,ea,b,c,e the maximum of

d(ab)+d(ce),d(ac)+d(be),d(ae)+d(bc)d(ab) + d(ce), \qquad d(ac) + d(be), \qquad d(ae) + d(bc)

is attained at least twice. It is an ultrametric if moreover d(xz)≤max⁡{d(xy),d(yz)}d(xz) \le\max\{d(xy),d(yz)\} for all x,y,zx,y,z, that is, if in every triangle the maximum length is attained at least twice; equivalently, if TT may be taken rooted with all points of XX at the same distance from the root. Every ultrametric is a tree metric and every tree metric is a metric, so the three classes are nested. Ultrametric Violation Distance and Tree Metric Violation Distance ask exactly the question of Metric Violation Distance with “metric” replaced by the corresponding class.

§ 6 observes that a standard order-preserving blow-up of the input distances transfers Theorems 1.1 and 1.2 to Ultrametric Violation Distance with no loss (Corollary 6.1). Finally, § 7 answers (Q3).

Theorem 1.4. Tree Metric Violation Distance can be solved in kO(k)nO(1)k^{O(k)}n^{O(1)} time.

Preliminaries

For a graph GG, an edge-length function d:E(G)→R≥0d:E(G) \to\mathbb{R}_{\ge0}, and a path PP, the length of PP is d(P)=∑e∈E(P)d(e)d(P) = \sum_{e\in E(P)} d(e). We say that dd is a metric on GG if every edge is no longer than any alternative path between its endpoints: for every edge uv∈E(G)uv \in E(G) and every u,vu,v-path PP in G−uvG-uv, d(uv)≤d(P)d(uv) \le d(P). On complete graphs this is exactly the usual triangle inequality.

We now restate the main problem studied in the paper. For the rest of the paper, GG is the complete graph on nn vertices.

Interval Metric Violation

Input: A complete graph GG, values 0≤Ae≤Me≤Be0 \le A_e \le M_e \le B_e for every edge ee, and an integer kk.

Parameter: kk.

Question: Is there a set S⊆E(G)S \subseteq E(G) with ∣S∣≤k|S| \le k and final edge lengths ded_e such that de=Med_e = M_e for e∉Se \notin S, de∈[Ae,Be]d_e \in[A_e,B_e] for e∈Se \in S, and dd is a metric?

When Ae=0A_e = 0 and BeB_e is large enough for every edge, this corresponds to the standard Metric Violation Distance problem, which is usually given by a weight function δ:E(G)→R≥0\delta:E(G) \to\mathbb{R}_{\ge0}.

Concretely, it suffices to take Be=n⋅max⁡f∈E(G)δ(f)B_e = n \cdot\max_{f \in E(G)} \delta(f) for every edge. One useful feature of the standard version is that the problem reduces to hitting cycles that violate the metric inequality. More specifically, if δ\delta is a length function from E(G)E(G) to R≥0\mathbb{R}_{\ge0}, then a cycle CC in GG is said to be bad if there exists an edge ee in CC such that δ(e)>∑e′∈C∖eδ(e′)\delta(e) > \sum_{e' \in C \setminus e} \delta(e'). In that case the edge ee is said to be the heavy edge of the bad cycle. A solution SS to the standard problem is then exactly a set of edges hitting every bad cycle [FGR+20]. Assuming G−SG-S is connected, the final weight of an edge of the solution may be taken to be the shortest weighted distance between its endpoints in G−SG-S. One way to interpret this is that, in the standard problem, the final weight of an edge in SS can be pushed as high as possible without making that edge heavy. In the interval version, this may exceed BeB_e. We therefore push only up to the upper endpoint BeB_e. One consequence is that bad cycles of G−SG-S depend not only on the edges left in G−SG-S, but also on the weights allowed for the edges of SS. The following definitions formalize this.

Definition 2.1. A support is a set S⊆E(G)S \subseteq E(G) of edges that are allowed to be changed. For a fixed support SS, the admissible interval of an edge ee is

IS(e)={[Ae,Be],e∈S,[Me,Me],e∉S.I_S(e) = \begin{cases} [A_e, B_e], & e \in S,\\ [M_e, M_e], & e \notin S. \end{cases}

Let aS(e)a_S(e) and bS(e)b_S(e) denote the lower and upper endpoints of IS(e)I_S(e).

A support SS is feasible if there is a metric dd on GG with de∈IS(e)d_e \in I_S(e) for every edge ee; equivalently, if the lengths of the edges of SS can be reassigned within their intervals so that the result is a metric. A solution is a feasible support of size at most kk, so the question is whether a solution exists.

We can then define bad cycles relative to a support.

Definition 2.2. We say that a cycle CC is bad for a support SS if it has an edge hh such that

aS(h)>∑f∈E(C)∖{h}bS(f).a_S(h) > \sum_{f \in E(C) \setminus\{h\}} b_S(f).

We call hh the heavy edge of the bad cycle. A support is good if it has no bad cycle.

Observation 2.3. Let RR and R′R' be two supports, and let CC be a cycle. If R∩E(C)⊆R′∩E(C)R \cap E(C) \subseteq R' \cap E(C) and CC is bad for R′R', then CC is bad for RR. In particular, if R⊆R′R \subseteq R' and RR is good, then R′R' is good. Moreover, if R∩E(C)=R′∩E(C)R \cap E(C) = R' \cap E(C), then CC is bad for RR if and only if it is bad for R′R'.

Proof. For every edge e∈E(C)e \in E(C), the containment R∩E(C)⊆R′∩E(C)R \cap E(C) \subseteq R' \cap E(C) implies aR(e)≥aR′(e)a_R(e) \ge a_{R'}(e) and bR(e)≤bR′(e)b_R(e) \le b_{R'}(e), so any inequality showing that CC is bad for R′R' also shows that it is bad for RR. If R∩E(C)=R′∩E(C)R \cap E(C) = R' \cap E(C), then the values aa and bb used in the definition of a bad cycle are the same for both supports.

We let dist⁡bS(x,y)\operatorname{dist}_{b_S}(x,y) denote the shortest (x,y)(x,y) distance in the graph GG when every edge ee has length bS(e)b_S(e). We say that a set SS is feasible if there exist final edge lengths ded_e such that de=Med_e = M_e for e∉Se \notin S, de∈[Ae,Be]d_e \in[A_e,B_e] for e∈Se \in S, and dd is a metric. Note that if SS is feasible, then so is S∪{e}S \cup\{e\} with the same weight function. We are now ready to show the following lemma, which is the interval analogue of the classical characterization described above.

Lemma 2.4. A set SS is feasible if and only if it is good. Moreover, the weight function d(xy):=dist⁡bS(x,y)d_{(xy)} := \operatorname{dist}_{b_S}(x,y) is a metric such that de=Med_e = M_e for e∉Se \notin S and de∈[Ae,Be]d_e \in[A_e,B_e] for $e \in S.

Proof. Suppose first that SS is feasible with dd the associated metric. Note that by definition this means that aS(e)≤d(e)≤bS(e)a_S(e) \le d(e) \le b_S(e) for every edge. A bad cycle CC with heavy edge hh would satisfy aS(h)>∑f∈E(C)∖{h}bS(f)a_S(h) > \sum_{f\in E(C)\setminus\{h\}} b_S(f). Since aS(h)≤d(h)a_S(h) \le d(h) and ∑f∈E(C)∖{h}bS(f)≥∑f∈E(C)∖{h}d(f)\sum_{f\in E(C)\setminus\{h\}} b_S(f) \ge\sum_{f\in E(C)\setminus\{h\}} d(f), we immediately reach a contradiction.

Assume now that SS is good, i.e., has no bad cycle, and consider the edge length defined as d(xy):=dist⁡bS(x,y)d_{(xy)} := \operatorname{dist}_{b_S}(x,y). This length is indeed a metric since it is the shortest path metric on the complete graph GG with weight bS(e)b_S(e) on every edge ee. Therefore, to conclude the proof we only have to verify the conditions that de=Med_e = M_e for e∉Se \notin S and de∈[Ae,Be]d_e \in[A_e,B_e] for e∈Se \in S.

If xy∉Sxy \notin S, we have that aS(xy)=bS(xy)=Mxya_S(xy) = b_S(xy) = M_{xy}. Moreover, if the edge xyxy is not the shortest path in the graph with weight bS(e)b_S(e) on every edge, then we would immediately obtain a bad cycle with xyxy as the heavy edge, which is a contradiction. Therefore d(xy)=Mxyd_{(xy)} = M_{xy}.

Similarly, if xy∈Sxy \in S, let PxyP_{xy} be a path of shortest weight. By definition we have that dxy=∑f∈PxybS(f)d_{xy} = \sum_{f\in P_{xy}} b_S(f). Since xyxy is a path between xx and yy, we automatically have that dxy≤Bxyd_{xy} \le B_{xy}. Finally, if dxy<aS(xy)d_{xy} < a_S(xy), then xyxy and PxyP_{xy} form a bad cycle for SS, which is not possible.

FPT algorithm

Our FPT algorithm will use random separation to find the set OO. For that purpose we need the notion of private bad cycle, which will be used to certify that an edge ee must belong to OO. More precisely, let OO, with ∣O∣≤k|O| \le k, denote an inclusion-minimal feasible solution. Lemma 2.4 tells us that no cycle is bad for OO, and by minimality of OO, we also have that Oe:=O∖{e}O_e := O \setminus\{e\} must contain a bad cycle. By Observation 2.3, this cycle must contain ee: otherwise OO and OeO_e agree on all of its edges, and it would also be bad for OO. We say that such a cycle is a private bad cycle for ee. For every e∈Oe \in O, let CeC_e denote an arbitrary private bad cycle with heavy edge heh_e, and let Q:=(⋃e∈OE(Ce))∖OQ := \left(\bigcup_{e\in O} E(C_e)\right) \setminus O. Before arguing about the size of QQ which will be necessary for bounding the complexity of our algorithm, let us explain how a random separation can be used to recover the set OO.

Lemma 3.1. Let χ\chi denote a red-blue coloring of E(G)E(G) such that the set RχR_\chi of red edges contains OO and the set BχB_\chi of blue edges contains QQ. OO is exactly the set of edges ee such that Rχ∖{e}R_\chi\setminus\{e\} is not good.

Proof. If e∈Oe \in O and the edges of E(Ce)∖OE(C_e) \setminus O are in BχB_\chi, then Rχ∖{e}R_\chi\setminus\{e\} agrees with OeO_e on the edges of CeC_e. Hence, by Observation 2.3, CeC_e is a bad cycle in Rχ∖{e}R_\chi\setminus\{e\}. Conversely, for any e∉Oe \notin O, Rχ∖{e}R_\chi\setminus\{e\} contains OO, which is a good support for the instance. By Observation 2.3, Rχ∖{e}R_\chi\setminus\{e\} is good.

Therefore, in order for a random separation to allow us to find the solution, we only need to know its value on the elements of OO and QQ, for some choice of private bad cycles. This means that, if we can show that QQ has size linear in kk, then we immediately obtain the desired algorithm, as a uniform red-blue coloring has probability 1/2∣Q∪O∣1/2^{|Q\cup O|} of satisfying the properties of Lemma 3.1. This is the purpose of the next lemma.

Lemma 3.2. There exists a choice of private bad cycles CeC_e over e∈Oe \in O such that

Q:=(⋃e∈OE(Ce))∖OQ := \left(\bigcup_{e\in O} E(C_e)\right) \setminus O

has size at most 10k10k.

Proof. Let us start with a choice of CeC_e for each e∈Oe \in O which is minimal, i.e., one that uses the fewest edges among all the bad cycles of OeO_e.

Claim 3.3. Any chord qq of CeC_e not adjacent to heh_e belongs to OeO_e.

Proof. Indeed, suppose that q∉Oeq \notin O_e and let P2P_2 be the path between the endpoints of qq that does not contain heh_e. By minimality of CeC_e, we have that q∪P2q \cup P_2 is not a bad cycle; in particular, this means that aOe(q)≤∑f∈P2bOe(f)a_{O_e}(q) \le\sum_{f\in P_2} b_{O_e}(f). However, since q∉Oeq \notin O_e, we have that aOe(q)=bOe(q)a_{O_e}(q) = b_{O_e}(q) and we can therefore replace P2P_2 with qq and still obtain a bad cycle. This contradicts the minimality of CeC_e.

We will now partition each cycle CeC_e into two subpaths Pe,1P_{e,1} and Pe,2P_{e,2} such that:

  • Pe,1P_{e,1} is a path or a cycle of length at most 4 containing heh_e

  • Pe,2P_{e,2} is a path of length either 0 or at least 2 whose endpoints are not adjacent to heh_e.

To do so, let PeP_e be the path Ce−heC_e - h_e between the endpoints of heh_e. If PeP_e has length at most 3, then we set Pe,1P_{e,1} as the entire cycle CeC_e and Pe,2P_{e,2} as the empty path. Otherwise, we let Pe,1P_{e,1} consist of heh_e and the two adjacent edges on CeC_e, and Pe,2P_{e,2} be the rest of the cycle.

If ∣V(G)∣≤3|V(G)| \le3, then the proof is immediate, so assume ∣V(G)∣≥4|V(G)| \ge4. For every xy∈Oxy \in O, let α1(xy)\alpha_1(xy) and α2(xy)\alpha_2(xy) denote the two lightest length-two x,yx,y-paths for the edge weights bOb_O, taken with distinct internal vertices, and let H:=⋃xy∈O⋃i∈[2]E(αi(xy))H := \bigcup_{xy\in O}\bigcup_{i\in[2]} E(\alpha_i(xy)). Note that for a fixed pair (x,y)(x,y) these two paths are edge disjoint because the intermediate vertices are different. In particular, at most one of them contains any fixed edge; we will use this to avoid heh_e. The following claim is the main part of the proof. It shows that, after choosing the private cycles carefully, every edge of the part of CeC_e far from the heavy edge is either already in the global replacement set HH, belongs to OO, or lies next to ee. The proof is a shortcut argument: if two consecutive edges fgfg violate this, then the chord joining the endpoints of fgfg must belong to OO, and one of the two cheapest two-edge x,yx,y-paths gives an equally short private bad cycle with fewer offending edges.

Claim 3.4. Each CeC_e can be chosen so that every edge of Pe,2∖(H∪O)P_{e,2} \setminus(H \cup O) is adjacent to ee on Pe,2P_{e,2}. (If e∉E(Pe,2)e \notin E(P_{e,2}), this asserts that Pe,2∖(H∪O)=∅P_{e,2} \setminus(H \cup O) = \emptyset.)

Proof. Indeed, fix e∈Oe \in O and choose CeC_e, among the private bad cycles with the minimum number of edges, to minimize the number of edges of Pe,2∖(H∪O)P_{e,2} \setminus(H \cup O) that are not adjacent to ee on Pe,2P_{e,2}. Assume for contradiction that such an edge ff exists. Let gg be an edge adjacent to ff on Pe,2P_{e,2} with g≠eg \ne e, which exists by the choice of ff, and let x,yx,y denote the endpoints of the path fgfg. The edge xyxy is a chord of CeC_e, and it is not adjacent to heh_e because fgfg lies on Pe,2P_{e,2}. By Claim 3.3, xy∈Oe⊆Oxy \in O_e \subseteq O, so let us consider α1(xy)\alpha_1(xy) and α2(xy)\alpha_2(xy). Let β\beta be α1(xy)\alpha_1(xy) if it does not contain heh_e, and $\alpha_2(xy) otherwise.

The path β\beta does not contain heh_e. Moreover, since the path fgfg also avoids heh_e, the choice of α1(xy)\alpha_1(xy) and α2(xy)\alpha_2(xy) gives bO(β)≤bO(f)+bO(g)b_O(\beta) \le b_O(f) + b_O(g): this is immediate if β=α1(xy)\beta= \alpha_1(xy), and if β=α2(xy)\beta= \alpha_2(xy) then α1(xy)\alpha_1(xy) contains heh_e while fgfg does not, so fgfg is a length-2 path distinct from α1(xy)\alpha_1(xy). Since f,g≠ef,g \ne e, we have bO(f)=bOe(f)b_O(f) = b_{O_e}(f) and bO(g)=bOe(g)b_O(g) = b_{O_e}(g); also bO(β)≤bO(β)b_O(\beta) \le b_O(\beta). Replacing fgfg by β\beta therefore gives a walk WW between the endpoints of heh_e with bOe(W)≤aOe(he)b_{O_e}(W) \le a_{O_e}(h_e). The walk WW has the same number of edges as Ce−heC_e - h_e. Removing closed subwalks from WW gives a simple path between the endpoints of heh_e of no larger bOeb_{O_e} weight. This simple path together with heh_e gives another bad cycle of OeO_e whose length is at most ∣Ce∣|C_e|. This cycle must contain ee, since otherwise OO and OeO_e would agree on all its edges and it would be a bad cycle of OO by Observation 2.3.

Finally, if the extracted cycle is shorter than CeC_e, this contradicts the choice of CeC_e. On the other hand, if the extracted cycle has the same length as CeC_e, then no closed subwalk was removed. Thus the replacement really removed ff and inserted only edges of HH, contradicting the secondary choice of CeC_e. Indeed, replacing Pe,2P_{e,2} by the path WW will still give a bad cycle with heavy edge heh_e for OeO_e, and by the properties of OeO_e, this must be a private bad cycle of ee.

It remains to count the edges of QQ. Indeed, as OO is a set of size kk, HH contains at most 4k4k edges, and the union of the Pe,1P_{e,1} has size at most 4k4k. Moreover, for each e∈Oe \in O, at most two edges of Pe,2∖(H∪O)P_{e,2} \setminus(H \cup O) are adjacent to ee on Pe,2P_{e,2}: an edge of a path has at most two neighbours on it, and if e∉E(Pe,2)e \notin E(P_{e,2}) there are none. Thus QQ has size at most 4k+4k+2k=10k4k + 4k + 2k = 10k, which concludes the proof.

We are now ready to prove Theorem 1.1.

Theorem 1.1. Interval Metric Violation can be solved in 2O(k)⋅nO(1)2^{O(k)} \cdot n^{O(1)} time.

Proof of Theorem 1.1. The algorithm picks a random coloring χ\chi of the edges into red or blue uniformly, and lets RχR_\chi be the set of red edges. If RχR_\chi is not good, it rejects the coloring. Otherwise, it computes

Fχ:={e∈E(G)∣Rχ∖{e} is not good}.F_\chi:= \{e \in E(G) \mid R_\chi\setminus\{e\} \text{ is not good}\}.

If ∣Fχ∣≤k|F_\chi| \le k and FχF_\chi is good, then it accepts and returns FχF_\chi; otherwise, it rejects the coloring. Each goodness test can be done in polynomial time: a support TT is not good if and only if, for some edge h=xyh = xy, the shortest x,yx,y path in G−hG-h with edge weights bTb_T has length smaller than aT(h)a_T(h).

The algorithm is sound by Lemma 2.4: whenever it accepts, FχF_\chi is a good support of size at most kk, and hence is feasible. For completeness, suppose that the instance is a YES instance, and let OO be an inclusion minimal feasible solution. If χ\chi colors the edges of OO red and the edges of QQ blue, then Lemma 3.1 gives Fχ=OF_\chi= O, so the algorithm accepts. By Lemma 3.2, this event has probability at least 1/2∣Q∣+∣O∣≥1/211k1/2^{|Q|+|O|} \ge1/2^{11k}. Repeating the process 2O(k)2^{O(k)} times gives constant success probability on every YES instance, and the standard universal-sets derandomization gives a deterministic 2O(k)⋅nO(1)2^{O(k)} \cdot n^{O(1)} algorithm.

Kernelization

For a vertex set YY, let I[Y]I[Y] denote the instance induced by YY, with all intervals inherited from the original instance and with the same parameter kk. We first give a representative O(k2)O(k^2)-kernel as a warm-up, and then explain how to replace the representatives by a matching argument to obtain a linear kernel.

Call a triangle initially bad if it is bad for the empty support. Let T\mathcal{T} be a maximal family of edge-disjoint initially bad triangles. If ∣T∣>k|\mathcal{T}| > k, then we return a fixed NO-instance, since every feasible support must contain one edge from each triangle of T\mathcal{T}. Otherwise, let

F:=⋃T∈TE(T),U:=V(F).F := \bigcup_{T \in\mathcal{T}} E(T), \qquad U := V(F).

Then ∣F∣≤3k|F| \le3k, ∣U∣≤3k|U| \le3k, and by maximality every initially bad triangle contains an edge of FF. We call the edges of FF the core edges, the set UU the core, and a vertex of V(G)∖UV(G) \setminus U an outside vertex.

Claim 4.1. Let Y⊆V(G)Y \subseteq V(G), let R⊆E(G[Y])R \subseteq E(G[Y]), and let CC be a shortest cycle in G[Y]G[Y] that is bad for RR. Then either CC is a triangle, or every vertex of CC is incident with some edge of RR.

Proof. Suppose that CC is not a triangle, and let z∈V(C)z \in V(C) be a vertex incident with no edge of RR. Let zgzg be a chord from zz to a nonconsecutive vertex of CC. This chord is not in RR, so aR(zg)=bR(zg)=Mzga_R(zg) = b_R(zg) = M_{zg}. Let P1,P2P_1, P_2 be the two z,gz,g-paths on CC, and assume that a heavy edge hh of CC lies on P1P_1. If bR(zg)≤bR(P2)b_R(zg) \le b_R(P_2), then P1∪{zg}P_1 \cup\{zg\} is a shorter bad cycle with heavy edge hh. If bR(zg)>bR(P2)b_R(zg) > b_R(P_2), then P2∪{zg}P_2 \cup\{zg\} is a shorter bad cycle with heavy edge zgzg. Both cases contradict the choice of CC.

For a core edge f=ab∈Ff = ab \in F and a vertex z∉Uz \notin U, we say that zz is a witness for ff if abzabz is initially bad. Such a witness is ff-dominated if abzabz is not bad for the support {f}\{f\}. An outside vertex z∉Uz \notin U is non-dominated if it is a witness for some f∈Ff \in F, but is not ff-dominated.

Claim 4.2. If there are more than kk non-dominated outside vertices, then the instance is a NO-instance.

Proof. Let z∉Uz \notin U be non-dominated, and let f=ab∈Ff = ab \in F witness this. Then abzabz is initially bad and remains bad for the support {f}\{f\}. Hence every feasible support SS must contain one of the two side edges az,bzaz, bz: if neither side edge is in SS, then the restriction of SS to the triangle abzabz is either empty or {f}\{f\}, and in both cases the triangle is bad. The side edges forced by different outside vertices are distinct, because each has one endpoint equal to its outside vertex and the other endpoint in UU. Thus more than kk non-dominated outside vertices cannot be covered by a support of size at most kk.

Let B\mathcal{B} be the set of non-dominated outside vertices. By Claim 4.2, either we already returned NO or ∣B∣≤k|\mathcal{B}| \le k. For the standard problem this set is in fact empty.

Proposition 4.3. Interval Metric Violation admits a kernel with O(k2)O(k^2) vertices.

Proof. For each core edge f∈Ff \in F, keep k+1k+1 arbitrary ff-dominated witnesses, or all of them if there are fewer than k+1k+1. Let XX be U∪BU \cup\mathcal{B} together with all kept witnesses. Since ∣F∣≤3k|F| \le3k and ∣B∣≤k|\mathcal{B}| \le k, we have ∣X∣=O(k2)|X| = O(k^2).

If OO is a good support in the original instance, then O∩E(G[X])O \cap E(G[X]) is good in I[X]I[X]. Conversely, let S⊆E(G[X])S \subseteq E(G[X]), ∣S∣≤k|S| \le k, be good in I[X]I[X]. Suppose that SS is not good in the original instance, and take a shortest cycle CC that is bad for SS. Since SS is good on XX, the cycle contains a vertex z∉Xz \notin X. No edge incident with zz belongs to SS, so Claim 4.1 implies that CC is a triangle, say xyzxyz. Since CC is bad for SS and z∉Bz \notin\mathcal{B}, Observation 2.3 shows that it is initially bad. By maximality of T\mathcal{T}, it contains an edge of FF; since z∉Xz \notin X and U⊆XU \subseteq X, this edge must be the edge xyxy opposite zz. Thus zz is a witness for xyxy. Moreover z∉Bz \notin\mathcal{B}, so zz is xyxy-dominated. If xy∈Sxy \in S, then the restriction of SS to the triangle xyzxyz is exactly {xy}\{xy\}, so xyzxyz is not bad, a contradiction. Hence xy∉Sxy \notin S.

Because z∉Xz \notin X, not all xyxy-dominated witnesses were kept, so XX contains k+1k+1 kept xyxy-dominated witnesses. Therefore, one such witness, say z′z', is such that neither xz′∈Sxz' \in S nor yz′∈Syz' \in S. Then xyz′xyz' is initially bad, and none of its three edges belongs to SS. Hence xyz′xyz' is bad for SS inside XX, contradicting that SS is good in I[X]I[X]. Therefore SS is good globally.

The linear kernel keeps the same mandatory set U∪BU \cup\mathcal{B}, but avoids storing k+1k+1 dominated witnesses for every core edge. Instead, we keep only the vertices that are still needed by the following matching argument. Set

W:=V(G)∖(U∪B),W := V(G) \setminus(U \cup\mathcal{B}),

and build the bipartite graph

H=(W,F;EH),H = (W,F;E_H),

where z∈Wz \in W is adjacent to f∈Ff \in F if zz is a witness for ff. By definition of B\mathcal{B}, every witness z∈Wz \in W for a core edge ff is ff-dominated.

We now apply the following reduction rule: compute a maximum matching MM in HH and let WMW_M be the set of vertices of WW saturated by MM. The kernel simply removes R:=W∖WMR := W \setminus W_M from the instance.

Claim 4.4. The instance I[U∪B∪WM]I[U \cup B \cup W_M] is equivalent to the original instance. In fact any solution to I[U∪B∪WM]I[U \cup B \cup W_M] can be lifted, in polynomial time, to a solution of the original instance of the same size.

Proof. The forward direction is immediate, since restricting to an induced subinstance cannot create a bad cycle. For the reverse direction, let SS be a good support for I[U∪B∪WM]I[U \cup B \cup W_M].

Consider the directed alternating graph obtained from HH by orienting every edge of MM from FF to WW, and every edge of E(H)∖ME(H) \setminus M from WW to FF. Let A⊆WA \subseteq W and P⊆FP \subseteq F be the vertices reachable from RR in this directed graph, on the two sides respectively.

We have P=NH(A)P = N_H(A). Indeed, if z∈Az \in A and f∈NH(z)f \in N_H(z), then either zf∉Mzf \notin M, in which case the alternating path reaching zz extends to ff, or zf∈Mzf \in M, in which case z∉Rz \notin R and the alternating path reaching zz must enter zz through the matching edge fzfz. In both cases f∈Pf \in P.

Moreover, by maximality of MM, every vertex of PP is matched. Otherwise an alternating path from RR to an unmatched vertex of FF would be an augmenting path. The matching partner of every f∈Pf \in P belongs to A∖RA \setminus R, and conversely every vertex of A∖RA \setminus R is matched to a vertex of PP. Thus MM gives a bijection between PP and A∖RA \setminus R. For f∈Pf \in P, let m(f)∈A∖Rm(f) \in A \setminus R denote its matched vertex.

Now define

D:={e∈S:e is incident with a vertex of A∖R}.D := \{e \in S : e \text{ is incident with a vertex of } A \setminus R\}.

For every f=ab∈P∖Sf = ab \in P \setminus S, the vertex m(f)m(f) is a witness for ff, so the triangle abm(f)abm(f) is initially bad. Since f∉Sf \notin S, goodness of SS forces SS to contain one of the side edges am(f),bm(f)am(f), bm(f), which belongs to DD. These side edges are distinct for different ff, hence ∣D∣≥∣P∖S∣|D| \ge|P \setminus S|. Now set

S+:=(S∖D)∪P.S^+ := (S \setminus D) \cup P.

The edges of PP have both endpoints in UU, while every edge of DD is incident with A∖R⊆WA \setminus R \subseteq W. Therefore ∣S+∣≤∣S∣|S^+| \le|S| and no edge of S+S^+ is incident with any vertex of AA.

It remains to show that S+S^+ is good for the original instance. Suppose not, and let CC be a shortest cycle that is bad for S+S^+. If CC avoids AA, then it also avoids RR, since R⊆AR \subseteq A. Hence CC is contained in the kept instance I[U∪B∪WM]I[U \cup B \cup W_M]. Moreover, no edge of DD lies on CC, so on the edges of CC the support S+S^+ is obtained from SS only by possibly adding edges of PP. By Observation 2.3, CC would also be bad for SS in I[U∪B∪WM]I[U \cup B \cup W_M], a contradiction. Hence CC contains some z∈Az \in A. Since no edge of S+S^+ is incident with zz, Claim 4.1 implies that CC is a triangle.

Since CC is bad for S+S^+, Observation 2.3 shows that CC is initially bad. Thus, by maximality of T\mathcal{T}, it contains an edge f∈Ff \in F. As z∉Uz \notin U, this core edge is opposite zz, and zz is a witness for ff. Since z∈A⊆Wz \in A \subseteq W, we have f∈NH(A)f \in N_H(A), so f∈P⊆S+f \in P \subseteq S^+. But every witness in WW is dominated, and no side edge incident with zz belongs to S+S^+. Therefore the restriction of S+S^+ to CC is exactly {f}\{f\}, which makes CC non-bad, a contradiction.

Thus S+S^+ is a good support of size at most ∣S∣|S| for the original instance, and deleting RR preserves equivalence. Moreover, S+S^+ can easily be computed from SS. Indeed, since the maximum matching MM is known, computing DD and PP can be done in O(n2)O(n^2) time. □\square

Theorem 1.2. Interval Metric Violation admits a kernel with at most 7k7k vertices, computable in O(n3)O(n^3) time. For the standard Metric Violation Distance problem the bound improves to 6k6k vertices.

Proof. If n≤6kn \le6k, then the original instance is already a kernel of the desired size, in both the interval and the standard case, so assume k<n/6k < n/6. The NO-answers above are correct: edge-disjoint initially bad triangles force distinct support edges, and Claim 4.2 handles the non-dominated vertices. Thus we may assume ∣T∣≤k|\mathcal{T}| \le k and ∣B∣≤k|\mathcal{B}| \le k.

Let MM be a maximum matching in HH, and let WMW_M be the set of vertices of WW saturated by MM. By Claim 4.4, the instance induced by

Y:=U∪B∪WMY := U \cup\mathcal{B} \cup W_M

is equivalent to the original instance. Since MM saturates WMW_M, we have ∣WM∣≤∣F∣≤3k|W_M| \le|F| \le3k. Therefore

∣Y∣=∣U∣+∣B∣+∣WM∣≤3k+k+3k=7k,|Y| = |U| + |\mathcal{B}| + |W_M| \le3k + k + 3k = 7k,

so the returned instance has the desired size.

For the running time, computing FF and UU can be done in O(n3)O(n^3) time by checking all possible triangles. Since k<n/6k < n/6, we have ∣F∣≤3k=O(n)|F| \le3k = O(n). The set B\mathcal{B} and the graph HH can be constructed in O(n∣F∣)=O(n2)O(n|F|) = O(n^2) time, and HH has O(n)O(n) vertices and O(n2)O(n^2) edges. A maximum matching in HH can be computed in O(n3)O(n^3) time. Thus the kernel is computed in O(n3)O(n^3) time.

For the standard Metric Violation Distance problem, it is easy to see that picking any edge fixes a bad triangle and so B=∅\mathcal{B} = \emptyset. The bound then improves to ∣Y∣≤3k+3k=6k|Y| \le3k + 3k = 6k.

For the optimization version, we run the same preprocessing without using a guessed budget. The number of edge-disjoint initially bad triangles and the number of non-dominated outside vertices are both lower bounds on OPT\mathrm{OPT}. Hence the reduced instance has at most 6∣T∣+∣B∣≤7OPT6|\mathcal{T}| + |\mathcal{B}| \le7\mathrm{OPT} vertices. Moreover, Claim 4.4 shows that any solution in the kernel can be lifted in O(n2)O(n^2) time to a solution of the original instance, which means that we can indeed apply our kernel before running any approximation algorithm to improve the approximation ratio. Applying the O(log⁡n)O(\log n)-approximation algorithm to this reduced instance therefore gives an O(log⁡OPT)O(\log\mathrm{OPT})-approximation.

ETH lower bound

In this section we show that the single-exponential dependence on kk in the complete-graph algorithm cannot be improved to subexponential under ETH. The reduction is for the standard version Metric Violation Distance, and therefore also applies to Interval Metric Violation by taking sufficiently large intervals. It follows closely the NP-hardness proof of [13].

Theorem 1.3. Unless ETH fails, Metric Violation Distance on complete graphs has no algorithm with running time 2o(k)nO(1)2^{o(k)}n^{O(1)}, even when all edge weights belong to {1,2,3}\{1,2,3\}.

Proof. We reduce from Vertex Cover, for which no 2o(k)nO(1)2^{o(k)}n^{O(1)}-time algorithm exists under ETH [15 CFK+15]. Let (H=(V,E),k)(H = (V,E), k) be an instance of Vertex Cover. We construct a complete graph GG on vertex set V(G)=V∪{r}V(G) = V \cup\{r\}, where rr is a new vertex. For every v∈Vv \in V, set δ(rv)=1\delta(rv) = 1. For every pair u,v∈Vu,v \in V, set

δ(uv)={3,uv∈E,2,uv∉E.\delta(uv) = \begin{cases} 3, & uv \in E,\\ 2, & uv \notin E. \end{cases}

The budget remains kk.

For every edge uv∈Euv \in E, the triangle ruvruv is bad, with heavy edge uvuv, because

δ(uv)=3>1+1=δ(ru)+δ(rv).\delta(uv) = 3 > 1 + 1 = \delta(ru) + \delta(rv).

For every non-edge uv∉Euv \notin E, the same triangle is not bad, since δ(uv)=2=1+1\delta(uv)=2=1+1. Moreover, no triangle contained entirely in VV is bad: all its edge weights are in {2,3}\{2,3\}, so the largest edge has weight at most 3, while the sum of the other two is at least 4.

Suppose first that HH has a vertex cover X⊆VX \subseteq V with ∣X∣≤k|X| \le k. Let

S={rv:v∈X}.S=\{rv:v\in X\}.

We claim that G−SG-S has no bad cycle. Root edges have weight 1, and hence cannot be heavy. Edges of weight 2 cannot be heavy either, because every alternative path between their endpoints has weight at least 2. Finally, let uv∈Euv \in E, so δ(uv)=3\delta(uv)=3. Since XX is a vertex cover, at least one of ruru, rvrv belongs to SS, and therefore the length-two path u−r−vu-r-v is not present in G−SG-S. Every remaining u,vu,v-path has weight at least 3. Thus no edge of G−SG-S is heavier than any alternative path between its endpoints, so G−SG-S has no bad cycle and SS is a solution of size at most kk.

Conversely, suppose that the constructed instance has a feasible support SS with ∣S∣≤k|S| \le k. We build a vertex cover XX of HH. If rv∈Srv \in S, put vv into XX. If uv∈Suv \in S for an edge uv∈Euv \in E, put one arbitrary endpoint of uvuv into XX. Ignore selected edges corresponding to non-edges of HH. Then ∣X∣≤∣S∣≤k|X| \le|S| \le k.

Now take any edge uv∈Euv \in E. The triangle ruvruv is bad, and SS contains at least one of ruru, rvrv, uvuv. In the first case u∈Xu \in X, in the second case v∈Xv \in X, and in the third case we explicitly put one endpoint of uvuv into XX. Hence uvuv is covered by XX. Therefore XX is a vertex cover of size at most kk.

The reduction is polynomial, adds only one vertex, uses weights in {1,2,3}\{1,2,3\}, and preserves the parameter. A 2o(k)nO(1)2^{o(k)}n^{O(1)}-time algorithm for Metric Violation Distance would therefore imply such an algorithm for Vertex Cover, contradicting the standard ETH lower bound for Vertex Cover.

Ultrametric Violation Distance

We record that our results for Metric Violation Distance transfer to ultrametrics by a standard blow-up of the distances. By the classical characterization, a complete distance function is an ultrametric if and only if in every triangle the maximum distance is attained at least twice [2]. As with bad cycles in the standard metric case, this can be lifted to partial edge-length function: A partial edge-length function extends to an ultrametric if and only if no cycle has a unique maximum-length edge. Thus a support S⊆E(G)S \subseteq E(G) is feasible for Ultrametric Violation Distance if and only if G−SG-S contains no cycle whose maximum-length edge is unique.

Suppose now that (G,δ,k)(G,\delta,k) is an instance of Ultrametric Violation Distance and let λ1<⋯<λt\lambda_1 < \cdots< \lambda_t be the distinct input lengths, set N:=∣V(G)∣+1N := |V(G)|+1, and define

δ′(e):=Niwhenever δ(e)=λi.\delta'(e):=N^i \qquad\text{whenever }\delta(e)=\lambda_i.

Then a cycle has a unique maximum edge under δ\delta if and only if it is a bad cycle under δ′\delta': if the unique maximum has rank ii, then its new length is NiN^i, while all other edges have length at most Ni−1N^{i-1}, and Ni>(∣C∣−1)Ni−1N^i > (|C|-1)N^{i-1}; conversely, if the maximum under δ\delta is attained at least twice, then no edge can be larger than the sum of the others after the rescaling. Hence (G,δ,k)(G,\delta,k) and the standard Metric Violation Distance instance (G,δ′,k)(G,\delta',k) have exactly the same feasible supports. This is the same blow-up argument used in [6], proof of Corollary 5.16. The rescaled lengths have polynomial bit complexity.

Corollary 6.1. Ultrametric Violation Distance can be solved in 2O(k)nO(1)2^{O(k)}n^{O(1)} time, and admits a solution-lifting kernel with at most 6k6k vertices, computable in O(n3)O(n^3) time.

Proof. Apply Theorem 1.1 to the support-preserving Metric Violation Distance instance (G,δ′,k)(G,\delta',k). For the kernel, apply the standard-case bound in Theorem 1.2 to (G,δ′,k)(G,\delta',k). It returns an induced subgraph G[Y]G[Y] with ∣Y∣≤6k|Y| \le6k. We output G[Y]G[Y] with the original lengths δ\delta. The same base NN still satisfies N>∣Y∣−1N > |Y|-1, so the support-preserving equivalence above also holds on the induced subinstance. Thus the returned instance is a genuine ultrametric kernel, and the solution-lifting guarantee transfers through the same equivalence.

Tree Metric Violation Distance

We now prove fixed-parameter tractability for the tree-metric variant. The ultrametric reduction of § 6 does not give a comparable reduction here: the four-point condition forbids a strict maximum among three sums, rather than among three individual lengths. Thus the tree-metric case requires a separate argument.

Throughout this section, a tree metric means a positive tree metric. In other words, a distance function dd on a finite set XX is a tree metric if d(x,y)>0d(x,y)>0 for all distinct x,y∈Xx,y \in X, and there is a tree TT with nonnegative edge lengths and X⊆V(T)X \subseteq V(T) such that d(x,y)d(x,y) is the length of the unique x,yx,y-path in TT. We do not require the points of XX to be leaves of TT. If the positivity condition on distances is dropped, we obtain the larger class of tree pseudometrics; this distinction is relevant for the L0L_0 objective, since the optimum tree pseudometric and tree metric can differ by Ω(n)\Omega(n) modifications [5 Sec. 8.2].

Tree Metric Violation Distance

Input: A complete graph GG, an edge-length function δ:E(G)→R>0\delta:E(G)\to\mathbb{R}_{>0}, and an integer kk.

Parameter: kk.

Question: Is there a set S⊆E(G)S \subseteq E(G), ∣S∣≤k|S| \le k, such that the lengths of the edges in SS can be changed so that the resulting distance function is a tree metric?

As before, we call S⊆E(G)S \subseteq E(G) a feasible support if the partial distance function δ∣E(G)∖S\delta|_{E(G)\setminus S} has a completion to a tree metric. Feasible supports are closed under taking supersets. The goal is to decide whether a feasible support of size at most kk exists.

Theorem 1.4. Tree Metric Violation Distance can be solved in kO(k)nO(1)k^{O(k)}n^{O(1)} time.

The proof uses a branching algorithm whose nodes are partial supports. The key is the following oracle. Given a partial support SS, the oracle either constructs a tree-metric completion, or returns a bounded set of pairs, one of which must be added by every feasible extension of SS.

Let ZZ be the set of vertices incident with an edge of SS, and let W:=V(G)∖ZW := V(G)\setminus Z. Then ∣Z∣≤2k|Z| \le2k, and every pair meeting WW is fixed. If δ∣W\delta|_W is a tree metric, the vertices of WW determine a unique reduced tree TWT_W. Each vertex z∈Zz \in Z is then forced, by its fixed distances to WW, to attach to a point pz∈TWp_z \in T_W with an edge of length λz\lambda_z. The only remaining freedom is local: vertices with the same attachment point may still be arranged among themselves. The lemmas below make this statement algorithmic and turn failures into small branching certificates.

Tree-metric preliminaries. We use the following standard facts. A finite positive metric is a tree metric if and only if it satisfies the four-point condition: for all distinct a,b,c,ea,b,c,e, the maximum of

d(ab)+d(ce),d(ac)+d(be),d(ae)+d(bc)d(ab)+d(ce), \qquad d(ac)+d(be), \qquad d(ae)+d(bc)

is attained at least twice [4, 18]. Moreover, every finite tree metric has a unique reduced representing tree, obtained by requiring all edges to have positive length, every leaf to belong to the ground set, and no degree-two vertex outside the ground set. This reduced tree can be constructed in polynomial time by classical exact reconstruction algorithms [21]. Finally, if a positive distance function on a set YY is not a tree metric, then a violating triple or quadruple can be found by inspecting all triples and quadruples of YY.

Observation 7.1. Let dd be a tree metric on XX with representing tree TT, and let Y⊆XY \subseteq X, ∣Y∣≥2|Y| \ge2. Then d∣Yd|_Y is a tree metric. The subtree of TT spanned by YY is isometrically embedded in TT, and the reduced representing tree of d∣Yd|_Y is obtained from it by pruning leaves outside YY, suppressing degree-two vertices outside YY, and contracting zero-length edges.

We will also use the following elementary observation:

Observation 7.2. Fix S⊆E(G)S \subseteq E(G), and let X0⊆V(G)X_0 \subseteq V(G). Suppose that no tree metric on X0X_0 agrees with δ\delta on E(G[X0])∖SE(G[X_0]) \setminus S. Then F:=E(G[X0])∖SF := E(G[X_0]) \setminus S intersects every feasible support S′⊇SS' \supseteq S.

Anchors. Assume that ∣W∣≥2|W| \ge2 and that δ∣W\delta|_W is a tree metric, and let TWT_W be its reduced representing tree. For A⊆WA \subseteq W, ∣A∣≥2|A| \ge2, write Σ(A)\Sigma(A) for the subtree of TWT_W spanned by AA. Every point of Σ(A)\Sigma(A) lies on a path between two vertices of AA. The next lemma says that, once the attachment point is known to lie in Σ(A)\Sigma(A), the distances to AA determine both the attachment point and the pendant length.

Lemma 7.3 (Anchor rigidity). Let A⊆WA \subseteq W with ∣A∣≥2|A| \ge2, and let p,q∈Σ(A)p, q \in\Sigma(A) and λ,λ′≥0\lambda, \lambda' \ge0 satisfy

λ+dist⁡TW(q,a)=λ′+dist⁡TW(p,a)for every a∈A.\lambda+ \operatorname{dist}_{T_W}(q,a) = \lambda' + \operatorname{dist}_{T_W}(p,a) \qquad\text{for every } a \in A.

Then q=pq = p and λ=λ′\lambda= \lambda'.

Proof. Choose a1,a2∈Aa_1, a_2 \in A such that qq lies on the a1,a2a_1,a_2-path. Adding the two corresponding equalities gives

2λ+dist⁡TW(a1,a2)=2λ′+dist⁡TW(p,a1)+dist⁡TW(p,a2)≥2λ′+dist⁡TW(a1,a2),2\lambda+ \operatorname{dist}_{T_W}(a_1,a_2) = 2\lambda' + \operatorname{dist}_{T_W}(p,a_1) + \operatorname{dist}_{T_W}(p,a_2) \ge2\lambda' + \operatorname{dist}_{T_W}(a_1,a_2),

and hence λ≥λ′\lambda\ge\lambda'. By symmetry, using two vertices of AA whose path contains pp, we also get λ′≥λ\lambda' \ge\lambda. Thus λ=λ′\lambda= \lambda', and the displayed hypothesis gives dist⁡TW(q,a)=dist⁡TW(p,a)\operatorname{dist}_{T_W}(q,a) = \operatorname{dist}_{T_W}(p,a) for all a∈Aa \in A. In particular, equality holds in the triangle inequality above, so pp also lies on the a1,a2a_1,a_2-path. Two points on this path with the same distance from a1a_1 coincide, so p=qp = q.

The condition p,q∈Σ(A)p, q \in\Sigma(A) is essential. If pp lies outside Σ(A)\Sigma(A) and qq is its projection to Σ(A)\Sigma(A), then distances from pp to all vertices of AA differ from the corresponding distances from qq by the same additive constant. Thus an attachment at pp is indistinguishable from an attachment at qq after changing the pendant length by that constant.

For every point pp of TWT_W, fix two vertices Ap:={a,b}⊆WA_p := \{a,b\} \subseteq W such that pp lies on the unique a,ba,b path. Such vertices exist because ∣W∣≥2|W| \ge2, every point of a tree lies on a path between two leaves, and every leaf of the reduced tree TWT_W belongs to WW. Then p∈Σ(A)p \in\Sigma(A) for every A⊇ApA \supseteq A_p.

The following lemma is a core subroutine of our algorithm. It shows how to check if a set SS is a solution on a small set of vertices:

Lemma 7.4. The following two problems can be solved in 2O(mlog⁡m)mO(1)2^{O(m \log m)}m^{O(1)} time.

  1. Partial tree-metric completion. Given a set X0X_0 of mm terminals, a set F0⊆(X02)F_0 \subseteq\binom{X_0}{2} of fixed pairs, and positive values μ(xy)>0\mu(xy) > 0 for all xy∈F0xy \in F_0, decide whether there is a tree metric dd on X0X_0 such that

d(x,y)=μ(xy)for every xy∈F0.d(x,y) = \mu(xy) \qquad\text{for every } xy \in F_0.
  1. Rooted partial tree completion. Given a set RR of mm terminals, a root symbol r∉Rr \notin R, prescribed values h(z)≥0h(z) \geq0 for all z∈Rz \in R, a set F0⊆(R2)F_0 \subseteq\binom{R}{2} of fixed terminal pairs, and positive values μ(zz′)>0\mu(zz') > 0 for all zz′∈F0zz' \in F_0, decide whether there is a tree containing the terminals RR and a marked root rr such that all edges have positive length,

dist⁡(r,z)=h(z)for all z∈R,\operatorname{dist}(r,z) = h(z) \qquad\text{for all } z \in R,
dist⁡(z,z′)=μ(zz′)for all zz′∈F0,\operatorname{dist}(z,z') = \mu(zz') \qquad\text{for all } zz' \in F_0,

and the terminals in RR are represented by distinct vertices. The root rr is allowed to be placed on the same vertex as one terminal of RR.

In both cases, if the answer is yes, a witnessing tree can also be returned within the same running time.

Proof. We first consider the partial tree-metric completion problem. We enumerate all reduced marked tree topologies for the terminal set X0X_0. By this we mean tree topologies in which the labels of X0X_0 are placed injectively on vertices, every leaf carries a label, and every unlabelled vertex has degree at least three. Labels are not required to be leaves: a terminal may be an internal vertex of the representing tree.

There are only 2O(mlog⁡m)2^{O(m \log m)} such topologies. Indeed, every such topology has at most 2m−22m-2 vertices: if there are mm labelled vertices, every leaf is labelled, and every unlabelled vertex has degree at least three, then the usual degree-counting argument bounds the number of unlabelled vertices by m−2m-2. Thus we can enumerate, for each t≤2m−2t \leq2m-2, all labelled trees on tt auxiliary vertices and all placements of the mm terminal labels, and keep only the reduced marked tree topologies. The number of possibilities is 2O(mlog⁡m)2^{O(m \log m)}.

Fix one enumerated topology τ\tau. We introduce a variable ℓe\ell_e for every edge ee of τ\tau. For x,y∈X0x,y \in X_0, let

Dxyτ(ℓ)=∑e∈τ[x,y]ℓeD^\tau_{xy}(\ell) = \sum_{e \in\tau[x,y]} \ell_e

be the length of the unique xx-yy path in τ\tau. We impose the linear equations

Dxyτ(ℓ)=μ(xy)for every xy∈F0.D^\tau_{xy}(\ell) = \mu(xy) \qquad\text{for every } xy \in F_0.

It remains to enforce that the chosen topology has positive edge lengths. To avoid strict inequalities, introduce one additional variable η\eta, and solve the linear program

maximizeηsubject toDxyτ(ℓ)=μ(xy)for every xy∈F0,ℓe≥ηfor every edge e∈E(τ),0≤η≤1.\begin{aligned} \text{maximize}\quad& \eta\\ \text{subject to}\quad& D^\tau_{xy}(\ell) = \mu(xy) && \text{for every } xy \in F_0,\\ & \ell_e \geq\eta&& \text{for every edge } e \in E(\tau),\\ & 0 \leq\eta\leq1. \end{aligned}

The topology τ\tau is feasible if and only if the optimum value is strictly positive. If the optimum is positive, all edges of τ\tau have positive length, and therefore all distances between distinct terminals of X0X_0 are positive. Conversely, any tree-metric completion whose reduced representing tree has topology τ\tau has all edge lengths positive, so the minimum edge length gives a feasible positive value of η\eta, after truncating at 1 if necessary.

Thus feasibility for a fixed topology can be checked by linear programming. If the test succeeds, the edge lengths returned by the linear program give a witnessing tree. Since the number of topologies is 2O(mlog⁡m)2^{O(m\log m)}, the claimed running time follows for the first problem.

The rooted partial completion problem is similar. We enumerate reduced marked tree topologies with terminal labels RR and one additional root label rr. The labels in RR must be placed injectively on vertices, but the root label rr may be placed either on an unlabelled vertex or on a vertex already carrying one terminal label. Again every leaf must carry at least one label, and every unlabelled vertex must have degree at least three. The same counting argument gives 2O(mlog⁡m)2^{O(m\log m)} topologies.

Fix such a rooted topology τ\tau. For labels a,b∈R∪{r}a,b \in R \cup\{r\}, let Dabτ(ℓ)D^\tau_{ab}(\ell) denote the length of the path between their marked vertices. If rr is placed on the same vertex as some terminal zz, then Drzτ(ℓ)=0D^\tau_{rz}(\ell)=0.

We impose the equations

Drzτ(ℓ)=h(z)for every z∈R,D^\tau_{rz}(\ell)=h(z) \qquad\text{for every }z\in R,

and

Dzz′τ(ℓ)=μ(zz′)for every zz′∈F0.D^\tau_{zz'}(\ell)=\mu(zz') \qquad\text{for every }zz'\in F_0.

As before, we introduce η\eta and maximize it subject to these equations,

ℓe≥ηfor every edge e∈E(τ),\ell_e\geq\eta\qquad\text{for every edge }e\in E(\tau),

and

0≤η≤1.0\leq\eta\leq1.

The topology is feasible if and only if the optimum value is strictly positive.

The distinction from the first problem is that the root is not required to be a separate terminal of a positive metric. Thus h(z)=0h(z)=0 is allowed: it is represented by placing the root label rr on the same vertex as zz. However, two distinct terminals of RR are never placed on the same vertex, and all edges have positive length, so the distance between any two distinct terminals in RR is automatically positive.

Finally, any rooted completion with nonnegative edge lengths can be converted to one of the topologies enumerated above by contracting all zero-length edges and then suppressing unlabelled degree-two vertices. The terminals in RR remain distinct because their pairwise distances are required to be positive; only the root may become identified with a terminal. This proves correctness of the rooted test and completes the proof.

We are now ready to prove the main lemma of the search tree.

Lemma 7.5. Let S⊆E(G)S\subseteq E(G), ∣S∣≤k|S|\leq k. There is an algorithm running in kO(k)nO(1)k^{O(k)}n^{O(1)} time that decides whether δ∣E(G)∖S\delta|_{E(G)\setminus S} has a tree-metric completion. If no completion exists, the algorithm outputs a set F⊆E(G)∖SF\subseteq E(G)\setminus S, ∣F∣=O(k2)|F|=O(k^2), that intersects every feasible support S′⊇SS'\supseteq S.

Proof. Let ZZ be the set of vertices incident with an edge of SS, and let W:=V(G)∖ZW:=V(G)\setminus Z. Thus ∣Z∣≤2k|Z|\leq2k, and every pair meeting WW is fixed.

If ∣W∣≤1|W|\leq1, then ∣V(G)∣≤2k+1|V(G)|\leq2k+1. We apply Lemma 7.4 to X0:=V(G)X_0:=V(G), F0:=E(G)∖SF_0:=E(G)\setminus S, and the prescribed values μ=δ\mu=\delta on $E(G)\setminus S. If it succeeds, we have a completion. If it fails, then F:=E(G)∖SF:=E(G)\setminus S has size O(k2)O(k^2) and is valid by Observation 7.2. We may therefore assume from now on that ∣W∣≥2|W|\geq2. First test whether δ∣W\delta|_{W} is a tree metric. If not, let X0⊆WX_0 \subseteq W be a violating triple or quadruple. Since all edges of G[X0]G[X_0] are fixed, Observation 7.2 allows us to return F:=E(G[X0])F := E(G[X_0]), which has size at most six. Otherwise let TWT_W be the reduced representing tree of δ∣W\delta|_{W}.

Next consider each z∈Zz \in Z. Test whether δ∣W∪{z}\delta|_{W \cup\{z\}} is a tree metric. If this fails, choose a violating triple or quadruple X0⊆W∪{z}X_0 \subseteq W \cup\{z\}. Since δ∣W\delta|_{W} is already a tree metric, the set X0X_0 contains zz; every edge of G[X0]G[X_0] is fixed, because the only vertex of ZZ in X0X_0 is zz. Again we return F:=E(G[X0])F := E(G[X_0]).

Let TW,zT_{W,z} be the reduced representing tree of δ∣W∪{z}\delta|_{W \cup\{z\}}. The minimal subtree of TW,zT_{W,z} spanning WW, after suppressing unlabelled degree-two vertices, is canonically isometric to TWT_W. Under this identification, let pzp_z be the first point of TWT_W met by the path from zz to TWT_W, and let λz=dist⁡TW,z(z,pz)\lambda_z = \operatorname{dist}_{T_{W,z}}(z,p_z). Then, for every w∈Ww \in W:

δ(zw)=λz+dist⁡TW(pz,w)(1)\delta(zw) = \lambda_z + \operatorname{dist}_{T_W}(p_z,w) \tag*{(1)}

Uniqueness follows from Lemma 7.3, applied with A=WA = W. Both pzp_z and λz\lambda_z can be read from TW,zT_{W,z}, and hence are computable in polynomial time. Moreover, every completion extending SS restricts to the same fixed tree metric on W∪{z}W \cup\{z\}, and therefore induces the same pair (pz,λz)(p_z,\lambda_z).

Now consider every pair z,z′∈Zz,z' \in Z with distinct gates pz≠pz′p_z \ne p_{z'}. In any completion, the path from zz to z′z' must pass through pzp_z and pz′p_{z'}. Indeed, if the branches containing zz and z′z' met before reaching their distinct gates, their union with the pz,pz′p_z,p_{z'}-path in TWT_W would contain a cycle. Therefore every completion forces

d(zz′)=λz+dist⁡TW(pz,pz′)+λz′.(2)d(zz') = \lambda_z + \operatorname{dist}_{T_W}(p_z,p_{z'}) + \lambda_{z'}. \tag*{(2)}

If zz′∈Szz' \in S, no test is needed. If zz′∉Szz' \notin S and the fixed value δ(zz′)\delta(zz') differs from the right-hand side of (2), we build a constant-size certificate. Let

A:=Apz∪Apz′,X0:={z,z′}∪A.A := A_{p_z} \cup A_{p_{z'}}, \qquad X_0 := \{z,z'\} \cup A.

Then ∣X0∣≤6|X_0| \le6, and every edge of G[X0]G[X_0] is fixed. Moreover, since AA contains both ApzA_{p_z} and Apz′A_{p_{z'}}, we have pz,pz′∈Σ(A)p_z,p_{z'} \in\Sigma(A). We claim that no tree metric on X0X_0 agrees with δ\delta. Indeed, in any such tree metric, the subtree spanned by AA identifies isometrically with Σ(A)⊆TW\Sigma(A) \subseteq T_W. Let q∈Σ(A)q \in\Sigma(A) be the point where the path from zz first meets this subtree, and let λ=d(z,q)\lambda= d(z,q). For every a∈Aa \in A,

δ(za)=λ+dist⁡(q,a)=λz+dist⁡TW(pz,a).\delta(za) = \lambda+ \operatorname{dist}(q,a) = \lambda_z + \operatorname{dist}_{T_W}(p_z,a).

Since pz,q∈Σ(A)p_z,q \in\Sigma(A), Lemma 7.3 gives q=pzq = p_z and λ=λz\lambda= \lambda_z. The same argument applies to z′z'. Thus the distance between zz and z′z' is forced to be the right-hand side of (2), contradicting the fixed value δ(zz′)\delta(zz'). By Observation 7.2, we return F:=E(G[X0])∖SF := E(G[X_0]) \setminus S.

After all distinct-gate distances have been verified, constraints involving different gate classes are completely determined by TWT_W and the values λz\lambda_z. Consequently, the remaining completion problems for the different sets ZpZ_p are independent. It remains to handle vertices with a common gate. For each attachment point pp, let Zp:={z∈Z:pz=p}Z_p := \{z \in Z : p_z = p\}. The only constraints not yet accounted for inside this group are the distances among vertices of ZpZ_p. They form the following rooted completion instance on Zp∪{rp}Z_p \cup\{r_p\}, where rpr_p is a formal root representing pp:

d(rp,z)=λz(z∈Zp),d(zz′)=δ(zz′)for zz′∉S,d(r_p,z) = \lambda_z \quad(z \in Z_p), \qquad d(zz') = \delta(zz') \quad\text{for } zz' \notin S,

and pairs zz′∈S∩E(G[Zp])zz' \in S \cap E(G[Z_p]) are free. The vertices of ZpZ_p must be pairwise distinct, while rpr_p is allowed to coincide with a vertex zz when λz=0\lambda_z = 0. If ∣Zp∣≤1|Z_p| \le1, this rooted instance is feasible. Otherwise we solve it using the rooted variant of Lemma 7.4, in time kO(k)k^{O(k)}.

Suppose the rooted instance for some pp is infeasible. Set X0:=Zp∪ApX_0 := Z_p \cup A_p. We claim that no tree metric on X0X_0 agrees with δ\delta on E(G[X0])∖SE(G[X_0]) \setminus S. As above, Lemma 7.3, applied with A=ApA = A_p, forces every z∈Zpz \in Z_p to attach at pp with pendant length λz\lambda_z. Restricting such a tree to Zp∪{p}Z_p \cup\{p\} would give a feasible rooted completion, a contradiction. Therefore F:=E(G[X0])∖SF := E(G[X_0]) \setminus S is valid by Observation 7.2; its size is O(k2)O(k^2).

Suppose now that all the previous tests were successful and let us show how to construct the final tree from TWT_W. Start with TWT_W. For each attachment point pp, take a feasible rooted tree for Zp∪{rp}Z_p \cup\{r_p\} and identify rpr_p with the point pp of TWT_W, subdividing edges of TWT_W as needed when attachment points lie in their interiors. The resulting weighted tree realises δ\delta on WW by construction, realises every fixed distance from ZZ to WW by (1), realises every fixed distance between distinct gate classes by (2), and realises the fixed distances inside each class ZpZ_p by the rooted completion. Thus it is a tree-metric completion of δ∣E(G)∖S\delta|_{E(G)\setminus S}.

The only super-polynomial work is the enumeration of tree topologies on O(k)O(k) points in Lemma 7.4. Hence the running time is kO(k)nO(1)k^{O(k)}n^{O(1)}, and every returned certificate has size O(k2)O(k^2).

Proof of Theorem 1.4. We build a bounded search tree. A node is a set S⊆E(G)S \subseteq E(G) of pairs chosen so far. The root is S=∅S = \emptyset. If ∣S∣>k|S| > k, we reject the node. Otherwise we apply Lemma 7.5. If a completion exists, then SS is a feasible support and we accept. If no completion exists, the lemma returns a set F⊆E(G)∖SF \subseteq E(G) \setminus S of size O(k2)O(k^2) that intersects every feasible support extending SS; we branch on all choices e∈Fe \in F and recurse on S∪{e}S \cup\{e\}.

For correctness, let S∗S^* be any feasible support of size at most kk. At any node with S⊆S∗S \subseteq S^*, either the oracle finds a completion and the algorithm accepts, or it returns a set FF meeting S∗∖SS^* \setminus S. Hence one child again satisfies S∪{e}⊆S∗S \cup\{e\} \subseteq S^*. Therefore the search tree reaches S∗S^*, unless it accepts earlier.

The depth is at most kk, and the branching factor is O(k2)O(k^2). Each node is processed in kO(k)nO(1)k^{O(k)}n^{O(1)} time by Lemma 7.5. This gives the claimed running time.

Concluding Remarks

The main open problem remains whether Metric Violation Distance admits a constant-factor approximation in polynomial time [13, 6]. Our kernel shows that it is enough to solve this question on instances with O(OPT)O(\mathrm{OPT}) vertices: running the kernel at k=OPTk = \mathrm{OPT} preserves the optimum and leaves at most 6OPT6\mathrm{OPT} vertices. Thus the obstacle is not large ground sets, but rather dense instances in which the optimum is already linear in the number of vertices.

Several quantitative questions also remain open. We did not try to optimize the constants in the kernels: can the bounds 6k6k and 7k7k be improved? Similarly, the randomized FPT algorithm has success probability 2−11k2^{-11k}, coming from the random-separation bound ∣O∪Q∣≤11k|O \cup Q| \le11k. Although ETH rules out a subexponential dependence on kk, the best possible base of the exponent is unknown.

For structured metrics, the parameterized picture is still incomplete. Ultrametrics follow from Metric Violation Distance by the rescaling of § 6, while tree metrics require a separate argument and currently yield only a kO(k)nO(1)k^{O(k)}n^{O(1)}-time algorithm. The two bottlenecks are the O(k2)O(k^2)-size obstruction in Lemma 7.5 and the enumeration of kO(k)k^{O(k)} tree topologies. Whether Tree Metric Violation Distance admits a 2O(k)nO(1)2^{O(k)}n^{O(1)}-time algorithm, or a polynomial kernel, remains open.

Declarations

Use of generative AI. We used Claude (Anthropic) and OpenAI ChatGPT to assist with (i) conducting a literature survey, (ii) tightening and improving the language and exposition throughout the paper, (iii) suggesting formulations for parts of the introduction, (iv) generating drafts of proofs throughout the paper; in all cases based on scaffolding, proof strategies, and technical direction provided by the authors, and (vi) preparing an initial draft for this disclosure statement. The tool materially affected the exposition across all sections of the paper. The authors verified the correctness and originality of all content, including all mathematical statements, proofs, and references.

References

  1. [1]Nir Ailon and Moses Charikar. Fitting tree metrics: Hierarchical clustering and phylogeny. SIAM Journal on Computing, 40(5):1275–1291, 2011. 1
  2. [2]Federico Ardila and Caroline J. Klivans. The bergman complex of a matroid and phylogenetic trees. Journal of Combinatorial Theory, Series B, 96(1):38–49, 2006. 11DOI
  3. [3]Justin Brickell, Inderjit S. Dhillon, Suvrit Sra, and Joel A. Tropp. The metric nearness problem. SIAM Journal on Matrix Analysis and Applications, 30(1):375–396, 2008. 1DOI
  4. [4]Peter Buneman. The recovery of trees from measures of dissimilarity. In F. R. Hodson, D. G. Kendall, and P. Tautu, editors, Mathematics in the Archaeological and Historical Sciences, pages 387–395. Edinburgh University Press, Edinburgh, 1971. 13
  5. [5]Vincent Cohen-Addad, Debarati Das, Evangelos Kipouridis, Nikos Parotsidis, and Mikkel Thorup. Fitting distances by tree metrics minimizing the total error within a constant factor. Journal of the ACM, 71(2):10:1–10:41, 2024. 12
  6. [6]Vincent Cohen-Addad, Chenglin Fan, Euiwoong Lee, and Arnaud de Mesmay. Fitting metrics and ultrametrics with minimum disagreements. SIAM Journal on Computing, 54(1):92–133, 2025. 1, 2, 3, 11, 17
  7. [9]Luigi Luca Cavalli-Sforza and Anthony W. F. Edwards. Phylogenetic analysis: Models and estimation procedures. Evolution, 21(3):550–570, 1967. 1
  8. [11]Fedor V. Fomin, Petr A. Golovach, and Yash Hiren More. Ultrametric violation distance: Polynomial kernel and FPT algorithm. In International Symposium on Parameterized and Exact Computation (IPEC), 2026. 1arxiv.org/abs/2608.09546
  9. [13]Chenglin Fan, Benjamin Raichel, and Gregory Van Buskirk. Metric violation distance: Hardness and approximation. Algorithmica, 84(5):1441–1465, 2022. 1, 10, 17
  10. [14]Anna C. Gilbert and Lalit Jain. If it ain’t broke, don’t fix it: Sparse metric repair. In 2017 55th Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 612–619, 2017. 1arxiv.org/abs/1710.10655
  11. [15]Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63(4):512–530, 2001. 10
  12. [16]Evangelos Kipouridis. Fitting tree metrics with minimum disagreements. In 31st Annual European Symposium on Algorithms, ESA 2023, volume 274 of LIPIcs, pages 70:1–70:10. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. 1arxiv.org/abs/2307.16066
  13. [17]Peter H. A. Sneath and Robert R. Sokal. Numerical taxonomy. Nature, 193:855–860, 1962. 1
  14. [18]Charles Semple and Mike Steel. Phylogenetics, volume 24 of Oxford Lecture Series in Mathematics and its Applications. Oxford University Press, 2003. 13
  15. [19]Peipei Tang, Bo Jiang, and Chengjing Wang. An efficient algorithm for the ℓp norm based metric nearness problem. Mathematics of Computation, 94(355):2495–2532, 2025. 1
  16. [20]Nate Veldt, David F. Gleich, Anthony Wirth, and James Saunderson. Metric-constrained optimization for graph clustering algorithms. SIAM Journal on Mathematics of Data Science, 1(2):333–355, 2019. 1DOI
  17. [21]Michael S. Waterman, Temple F. Smith, Mona Singh, and William A. Beyer. Additive evolutionary trees. Journal of Theoretical Biology, 64(2):199–213, 1977. 13pubmed.ncbi.nlm.nih.gov/839800

Paper details

vlnc:W_pnzmbe6m
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 8

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Claude, OpenAI ChatGPT

View statement
Looking for related papers…
Contents