Abstract 1 Introduction 2 Preliminaries 3 Compressing 𝑮-partial matrices when 𝑮 is dense (distance from triviality I and II) 4 The case of bounded fill-in (distance from triviality III) 5 Concluding remarks and open questions References

Algorithms for Euclidean Distance Matrix Completion: Exploiting Proximity to Triviality

Fedor V. Fomin ORCID University of Bergen, Norway    Petr A. Golovach ORCID University of Bergen, Norway    M. S. Ramanujan ORCID University of Warwick, UK    Saket Saurabh ORCID Institute of Mathematical Sciences, Chennai, India
University of Bergen, Norway
Abstract

In the d-Euclidean Distance Matrix Completion (d-EDMC) problem, one aims to determine whether a given partial matrix of pairwise distances can be extended to a full Euclidean distance matrix in d dimensions. This problem is a cornerstone of computational geometry with numerous applications. While classical work on this problem often focuses on exploiting connections to semidefinite programming typically leading to approximation algorithms, we focus on exact algorithms and propose a novel distance-from-triviality parameterization framework to obtain tractability results for d-EDMC.

We identify key structural patterns in the input that capture entry density, including chordal substructures and coverability of specified entries by fully specified principal submatrices. We obtain:

  1. 1.

    The first fixed-parameter algorithm (FPT algorithm) for d-EDMC parameterized by d and the maximum number of unspecified entries per row/column. This is achieved through a novel compression algorithm that reduces a given instance to a submatrix on 𝒪(1) rows (for fixed values of the parameters).

  2. 2.

    The first FPT algorithm for d-EDMC parameterized by d and the minimum number of fully specified principal submatrices whose entries cover all specified entries of the given matrix. This result is also achieved through a compression algorithm.

  3. 3.

    A polynomial-time algorithm for d-EDMC when both d and the minimum fill-in of a natural graph representing the specified entries are fixed constants. This result is achieved by combining tools from distance geometry and algorithms from real algebraic geometry.

Our work identifies interesting parallels between EDM completion and graph problems, with our algorithms exploiting techniques from both domains.

Keywords and phrases:
Parameterized Complexity, Euclidean Embedding, Polynomial Compression
Funding:
Fedor V. Fomin: Supported by the Research Council of Norway under BWCA project (grant no. 314528) and by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (NewPC grant agreement No. 101199930)
Petr A. Golovach: Supported by the Research Council of Norway under the BWCA (grant no. 314528) and Extreme-Algorithms (grant no 355137) projects.
M. S. Ramanujan: Supported by Engineering and Physical Sciences Research Council (EPSRC) grant EP/V044621/1.
Saket Saurabh: margin: [Uncaptioned image] Supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 819416); and Swarnajayanti Fellowship grant DST/SJF/MSA-01/2017-18.
Copyright and License:
[Uncaptioned image] © Fedor V. Fomin, Petr A. Golovach, M. S. Ramanujan, and Saket Saurabh; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Combinatorial algorithms
; Theory of computation Fixed parameter tractability
Related Version:
Full Version: https://arxiv.org/abs/2603.19447
Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir Nayyeri

1 Introduction

Consider the following problem: given an n×n symmetric hollow matrix M, and integer d, determine whether M is a Euclidean Distance Matrix (EDM) that is isometrically embeddable into d, also said to be realizable in d. In other words, determine whether there exists a set P={p1,,pn} of n points in d such that Mij=pipj22, where Mij denotes the (i,j)-th entry of M, and pipj2 is the Euclidean distance between pi and pj. This question of determining the existence of such a point configuration P (up to congruence) is a central problem in Distance Geometry, whose solution is well understood and dates back to the works of Cayley [13] and Menger [34].

In this paper, we are interested in the version of this problem where the matrix M is partial, i.e., some entries may be “unspecified.” In this version, called d-EDM Completion (d-EDMC), the goal is to decide whether the missing entries in a matrix can be filled in so that the result is an EDM that can be realized in d. In general, such questions of reconstructing point configurations from partial distance measurements naturally occur across numerous disciplines. The study of d-EDMC in particular, goes back to mathematicians and mechanical engineers of the nineteenth century – see, for example, the work of Cauchy from 1813 [12] – and is at the heart of rigidity theory. This problem has many applications in different areas, such as molecular conformation in bioinformatics [31, 15, 14], dimensionality reduction in machine learning and statistics, and localization in wireless sensor networks [3, 21, 9].

Saxe [35] and Yemini [40] showed that the d-EDMC problem is already strongly NP-hard in dimensions d=1 and d=2. While numerous heuristics for solving d-EDMC under specific structural assumptions on M have been proposed in the literature [23, 39, 8, 11], theoretical results with provable performance guarantees are scarce. This lack of rigorous algorithmic understanding of the problem is a primary motivation for us to explore the computational complexity of this problem and in particular, its parameterized complexity.

In this work we adopt the distance-from-triviality viewpoint to study the complextity of d-EDMC. Distance-from-triviality is a well-established paradigm in parameterized complexity, where the idea is to introduce a parameter (or a combination of parameters) that measures how far a given instance lies from a class that can be solved efficiently; algorithms then exploit this “distance” to achieve tractability.

What is the notion of “triviality” for d-EDMC? Two natural extremal cases suggest themselves.
1. All entries are unspecified. If no entry of the matrix is given, any Euclidean distance matrix of the appropriate size is a valid completion, so the instance is trivial. Unfortunately, even a very small deviation from this case already yields hardness: Saxe’s reduction [35] shows NP-hardness when each row and column contains exactly two specified entries. Consequently, parameterizing by distance to the completely unspecified matrix appears unpromising.
2. All entries are specified. At the opposite extreme, when every entry is given, one need only test whether the matrix is an EDM that embeds isometrically into d, a task solvable in polynomial time. As we show in this paper, distance to this notion of “triviality” is a much more interesting parameter.

We may therefore formulate our main question as follows.

Which notions of distance to a fully specified matrix can be exploited algorithmically for d-EDMC?

From the standpoint of algorithms with provable guarantees, this question is largely unexplored. A notable exception is the work of Berger, Kleinberg, and Leighton [7]. They show that if, in every row of an n×n partial matrix M, at least 3n/4+1 entries are specified, then one can decide in polynomial time whether M can be completed to a 3-EDM. There is, however, a crucial caveat: their theorem assumes that the target point set is in general position and that no ten points lie on a quadric surface. We make no such assumptions – the points to be embedded need not be in general position or even distinct – rendering the problem substantially more realistic but also more challenging.

1.1 Our results and methods

We begin by observing that high density of specified entries (or, equivalently, a numerical sparsity of unspecified entries) does not by itself make the problem any easier. To exploit sparsity algorithmically, one must therefore identify and leverage additional structural properties that reflect the density of entries.

Theorem 1.

ε(0,1), d-EDMC remains strongly NP-hard even for instances (M,d) with d=2 in which the n×n matrix M contains at most εn unspecified entries.

The proof of the theorem is an adaptation of the classic complexity result of Saxe [35]. It also underscores that the general-position assumptions employed by Berger, Kleinberg, and Leighton [7] is essential for their polynomial-time algorithm.

1.1.1 Distance from triviality I

Our first main algorithmic result shows that imposing even a mild structural constraint on the unspecified entries – beyond mere numerical sparsity – makes the problem tractable. Our notion of density of a matrix is expressed by forbidden t-block patterns.

Definition 2 (t-block pattern).

For an n×n matrix M and disjoint sets I1,I2[n], we define by M[I1,I2] the submatrix of M indexed by the rows in I1 and the columns in I2. We say that M[I1,I2] is a t-block pattern if it is a t×t submatrix of M where every entry is unspecified. We say that M excludes a t-block pattern if there is no I1 and I2 such that M[I1,I2] is a t-block pattern. See top of Figure 1.

[02011020121012101102020]
Figure 1: Top: A 9×9 partial matrix M that excludes 4-block pattern. It contains a 3-block pattern formed by rows {3,8,9} and columns {1,5,7}. Bottom Left: the graph G underlying the partial EDM matrix M. The adjacencies of G are formed by the unspecified entries in the matrix. Bottom Right: the complement graph G¯ induced by the unspecified entries of M. The red edges of G¯ form K3,3, however G¯ does not contain K4,4.
Example 3.

Consider a partial matrix M. M excludes a 1-block pattern if and only if it is fully specified; if M has at most Δ unspecified entries in total, then M excludes a Δ+1-block pattern; if each row of M contains at most Δ unspecified entries, then M excludes a (Δ+1)-block pattern.

We are now ready to state our first tractability result. By solving an instance of d-EDMC, we mean deciding111As is standard in Computational Geometry, all our algorithms operate under the real RAM computational model, assuming that basic operations over real numbers can be executed in unit time. whether the answer is yes or no. We also say that an instance (M,d) is equivalent to an instance (M,d) if solving both instances leads to the same answer.

Theorem 4 (Compression for Kt,t-free complements).

There is a polynomial-time algorithm that, given an instance (M,d) of d-EDMC in which M excludes a t-block pattern for some t1, either solves the problem, or outputs an equivalent instance (M,d), such that M is a principal submatrix of M with (d+1)𝒪(t2) rows and columns.

The algorithm in Theorem 4 compresses the input instance in polynomial time to an equivalent matrix whose size is independent of n. This compression, however, does not guarantee that the numerical entries of the reduced matrix depend only on the parameters t and d; hence it is not a kernel in the strict parameterized complexity sense [17, 25].

Moreover, Theorem 4 by itself does not yield a complete algorithm for solving d-EDMC and we need the following algorithm, which relies on tools from real algebraic geometry.

Theorem 5.

There is an algorithm that, given an n×n partial matrix M and d, runs in time 2𝒪(n2logn) and correctly decides whether (M,d) is a yes-instance of d-EDMC.

Now, by combining Theorem 4 with Theorem 5, we obtain the following FPT algorithm for d-EDMC with parameters d and t.

Corollary 6.

For every d,t, and n×n partial matrix M excluding a t-block pattern, d-EDMC is solvable in time 2(d+1)𝒪(t2)+n𝒪(1).

 Remark 7 (Generality of Theorem 4 and Corollary 6).

A common way to capture the structure of a partial matrix, see e.g. [2, 7], is to encode it by an underlying graph G as follows. Let G be a graph with vertex set V(G)={1,,n}. An n×n symmetric hollow partial matrix M=(mij) is said to be a G-partial matrix if the entry mij is specified222In this paper, the specified entries of M will always be in 0. if and only if ijE(G). We refer to G as the underlying graph of M, see Figure 1. By studying partial matrices through a graph-theoretic lens motivated by this defintion, we can identify direct correspondences between their properties and those of their underlying graphs. The condition of Theorem 1 also translates naturally to the property that the average vertex degree of G¯ is at most ε. For instance, saying that a partial matrix M excludes a t-block pattern is equivalent to saying that the complement G¯ of its underlying graph G does not contain the complete bipartite graph Kt,t as a subgraph.

Although Theorem 1 shows that d-EDMC remains intractable even on matrices where the underlying graph’s complement has constant average degree, Theorem 4 and Corollary 6 demonstrate that imposing Kt,t-freeness on the complement of the underlying graph (i.e., excluding a t-block pattern in the input matrix) radically alters the complexity landscape and leads to tractability for a large class of instances.

Many widely studied graph classes with numerous applications can be expressed as Kt,t-free graphs for a suitable t. In particular, planar graphs are K3,3-free by Kuratowski’s theorem, graphs excluding a fixed minor H are Kt,t-free for some t depending on H, graphs of bounded expansion and nowhere dense graphs are Kt,t-free for an appropriate t, and any graph of maximum degree Δ (or more generally, bounded degeneracy) is Kt,t-free for t=Δ+1 or t equal to one plus the degeneracy.

In the rest of the paper, we freely switch between the graph and matrix viewpoints when describing structural properties of partial matrices.

Notice that in the more restricted case when every row of M contains at most Δ unspecified entries, the maximum vertex degree of G¯ is at most Δ. In this case, we show that the size of the compression provided by Theorem 4 can be refined as follows.

Theorem 8.

There is a polynomial-time algorithm that, given an instance (M,d) of d-EDMC such that every row of M has at most Δ unspecified entries, either solves the problem, or outputs an equivalent instance (M,d), such that M is a principal n×n submatrix of M, where n(d+1)(Δ+1)2.

Combined with Theorem 5, we have the following algorithm.

Corollary 9.

For every d,Δ, and n×n partial matrix M such that every row of M has at most Δ unspecified entries, d-EDMC is solvable in time 2𝒪(d2Δ4(logd+logΔ))+n𝒪(1).

1.1.2 Distance from triviality II

Consider the case where all specified entries of M lie in one fully specified principal submatrix M. In this case, d-EDMC is polynomial-time solvable: one first determines the minimum dimension d for which M is isometrically embeddable in d and then assigns values to the remaining entries of M so that the new points lie at appropriate distances. So, a natural definition of distance to this notion of triviality is the least number of fully specified principal submatrices such that their entries cover all specified entries of M. In terms of graphs, if all specified entries of M lie in one fully specified principal submatrix, then the underlying graph G consists of a clique and isolated vertices. Thus all edges of G are covered by one clique. So, when we say that the specified entries in M can be covered by k fully specified principal submatrices, this is equivalent to saying that the underlying graph G admits an edge clique cover of size k, that is, the edges of G can be covered by at most k cliques.

 Remark 10.

A small edge clique cover does not imply that G¯ is Kt,t-free for any fixed t. Indeed, the disjoint union of two copies of Kn can be covered by just two cliques, yet its complement contains Kn,n. Thus, the edge clique cover parameter is incomparable with the assumption of Kt,t-freeness, which motivates the parameterization by edge clique cover.

Theorem 11.

There is a polynomial-time algorithm that, given an instance (M,d) of d-EDMC in which M is an n×n G-partial matrix and the graph G is given together with an edge clique cover 𝒞 of size k, either solves the problem, or outputs an equivalent instance (M,d), such that M is an n×n principal submatrix of M, where n(d+1)k2.

Corollary 12.

For every d,k, and n×n partial matrix M such that the specified entries in M can be covered by at most k fully specified principal submatrices, d-EDMC is solvable in time 2𝒪(d2k4(logd+logk))+22𝒪(k)n𝒪(1).

Let us next give a brief overview of the proof technique behind Theorem 4, Theorem 8 and Theorem 11. Say that an instance (M,d) of d-EDMC is efficiently α-reducible if there is a polynomial-time computable pair comprising a fully specified α×α principal submatrix indexed by X[n] and an element wX such that (M,d) is equivalent to (Mw,d). Here, Mw is defined as the matrix obtained from M by removing the row and column indexed by w. The element w is called an irrelevant element. Clearly as long as such a pair X and w can be found, we can iteratively reduce the instance by deleting w. To prove these three theorems, we show the following, where G is the underlying graph of M.

  • if G¯ is Kt,t-free, then either the instance is solvable in polynomial time or it is already compressed to the claimed size or it is efficiently d𝒪(t)-reducible; and

  • if G¯ has max-degree at most Δ, then either the instance is solvable in polynomial time or it is already compressed to the claimed size or it is efficiently 𝒪(dΔ)-reducible; and

  • given an edge clique cover of size k for G, either the instance is solvable in polynomial time or it is already compressed to the claimed size or it is efficiently 𝒪(dk)-reducible.

Proving each of the above statements is done along similar lines, but there are certain instance-specific aspects that we exploit in each case. In fact, for the first two statements, we show the existence of an α depending only on the parameters such that the index set of any fully specified α×α principal submatrix must contain an irrelevant element. Then, we can use the sparsity of G¯ to infer the existence of such a fully specified principal submatrix of M. For the third statement, we observe that one of the cliques in the given edge clique cover of G must have size at least α (where α depends on the parameters) and then we argue that such a clique contains an irrelevant element.

1.1.3 Distance from triviality III

Our final result concerns a further class of matrices that admit polynomial-time completion algorithms. Recall that a graph G is chordal if it has no induced cycles of length greater than 3, see Figure 2. Bakonyi and Johnson [4] proved the following: when G is chordal, a G-partial matrix M can be completed to an EDM that is realizable in d if and only if the submatrix induced by the vertex set of each maximal clique of G is itself an EDM realizable in d. Since an n-vertex chordal graph has at most n maximal cliques and these can be listed in polynomial time [27], Laurent [33] observed that this characterization yields a straightforward polynomial-time algorithm for d-EDMC as follows. For each maximal clique of G one checks, in polynomial time, whether the corresponding principal submatrix of M (all of whose entries are specified, by definition) is an EDM realizable in d. So, considering partial matrices with chordal underlying graphs as our notion of triviality, let us address the next notion of distance from triviality.

[01111011110111111101111101111110111111011101110]
Figure 2: A partial EDM matrix whose underlying graph is chordal.

The popular measure of the distance of a graph G to a chordal graph is the fill-in of a graph, which is the minimum number of edges that should be added to G to make it chordal. Our next theorem extends the polynomial-time algorithm of Bakonyi and Johnson [4] for chordal graphs to graphs with constant fill-in.

Theorem 13.

Let M be an n×n G-partial matrix and let d. There is an algorithm that runs in d𝒪(kd) 2𝒪(k2)n𝒪(k) time, where k is the size of a minimum fill-in of G, and correctly decides whether (M,d) is a yes-instance of d-EDMC.

Laurent [33] presented an XP algorithm, that is, polynomial for every fixed k, which decides whether a G-partial matrix can be completed to an EDM realizable in some Euclidean space, where k is the minimum size of a fill-in of G. This algorithm, however, does not determine the smallest dimension d that suffices, and therefore does not solve d-EDMC. Theorem 13 can thus be viewed as a non-trivial extension of Laurent’s result, tailored specifically for embeddability into a prescribed dimension d.

We next give a brief outline of the techniques behind this algorithm. Due to the result of Bakonyi and Johnson [4], it is necessary and sufficient to decide whether a given G-partial matrix M can be extended to a G-partial matrix M satisfying the following conditions: (i) G is chordal, (ii) G is a supergraph of G, and (iii) for every maximal clique of G, the submatrix of M induced by the clique’s vertex set is an EDM realizable in d. For us, G is defined by a fill-in set X, that is, G=G+X, where X is a set of non-edges of G whose addition to G makes it chordal. Thus, the task reduces to computing M by assigning values to the entries corresponding to the edges in X, ensuring that condition (iii) is satisfied. To do so, we reduce this task to testing the truth of an existentially quantified statement over a bounded set of polynomial equations and inequalities and then finally invoke an algorithm of Basu, Pollack, and Roy [5]. We note that a similar approach was used in [6], however our case is more complex as the maximal cliques of G may share edges, requiring us to handle multiple EDMs simultaneously in this reduction.

1.2 Related work

The study of Euclidean distance matrices (EDMs) dates back to the pioneering works of Cayley [13] and Menger [34]. Foundational results were later obtained by Schoenberg [36] and by Young and Householder [41]. The subject was further developed in a series of papers by Gower, Critchley, Farebrother, and others [28, 29, 16, 24]. Schoenberg [36] also established the deep connection between EDMs and positive-semidefinite (PSD) matrices. A comprehensive treatment of the vast literature on EDMs lies beyond the scope of this article; we refer the interested reader to the monographs and surveys [10, 15, 19, 32, 18, 2].

2 Preliminaries

For every x>0, we use [x] to denote the set {1,,x}.

Distance spaces and matrices.

Let X be a set. A function ρ:X×X0 is a distance on X if: (i) ρ is symmetric, that is, for any x,yX, ρ(x,y)=ρ(y,x), and (ii) ρ(x,x)=0 for all xX. Then, (X,ρ) is called a distance space. A distance space (X,ρ) for a finite X={x1,,xn} can be equivalently defined by the distance matrix, in which the value in row i and column j is ρij2, where ρij=ρ(xi,xj) for i,j{1,,n}. Throughout the paper we do not distinguish metric spaces and the corresponding distance matrices.

A distance space (X,ρ) is isometrically embeddable into d if there is a map, called isometric embedding, φ:Xd such that ρ(x,y)=φ(x)φ(y)2 for all x,yX, where pq2=p,p+q,q2p,q for p,qd. Notice that we do not require φ to be injective, that is, several points of (X,ρ) may be mapped to the same point of d. Throughout the paper, whenever we mention an embedding, we mean an isometric embedding. Moreover, when we use the term d-embedding, we are referring to embedding into d. A d-embeddable distance space is strongly d-embeddable if it is not (d1)-embeddable. As convention, we assume that the empty set of points is d-embeddable for every d. A symmetric n×n matrix D=(dij) over 0 with dii=0 for all i{1,,n} is a Euclidean distance matrix (EDM) in d if D=D(ρ) is the distance matrix of a distance space (X,ρ) embeddable in d. Suppose that 𝒳=(X,ρ) is embeddable into d. The ordered set P=(p1,,pn) of points in d is said to be a realization of 𝒳 if there is an embedding φ:Xd such that φ(xi)=pi for all i{1,,n}.

For a d-embeddable distance space (X,ρ), a set YX is a metric basis if, given an isometric embedding φ of (Y,ρ) into d, there is a unique way to extend φ to an isometric embedding of (X,ρ). Equivalently, if a realization of (Y,ρ) is fixed then the embedding of any point of XY in a d-embedding of (X,ρ) is unique. In our paper we also use the embeddablity characterization based on the properties of Cayley-Menger matrices. Towards this, we use terminology and notation from [6]. For r+1 points x0,x1,,xr of distance space (X,ρ) the Cayley-Menger determinant CM(x0,x1,,xr) is the determinant of the matrix obtained from the distance matrix induced by these points by prepending a row and a column whose first element is zero and the other elements are one.

Proposition 14 ([10, Chapter IV]).

A distance space 𝒳=(X,ρ) with n points is strongly d-embeddable if and only if there exist d+1 points, say Xd={x0,,xd}, such that:

  1. 1.

    (1)j+1CM(x0,x1,,xj)>0 for 1jd, and

  2. 2.

    for any x,yXXd,

    CM(x0,x1,,xd,x)=CM(x0,x1,,xd,y)=CM(x0,x1,,xd,x,y)=0.

Equivalently (see, for example, [37]), 𝒳 is strongly d-embeddable if and only if there is a set of d+1 points Xd={x0,,xd} such that ({x0,,xj},ρ) is strongly j-embeddable for all j{1,,d}, and for every x,yXXd, (Xd{x}{y}) is d-embeddable.

Proposition 15 ([10, Chapter IV]).

Let (X,ρ) be a d-embeddable distance space, and let BX be a metric basis. Then an embedding of B in d is unique up to rigid transformations, and given an embedding φ of (B,ρ) into d, there is a unique way to extend φ to an embedding of (X,ρ). Equivalently, if a realization of (B,ρ) is fixed then the embedding of any point of XB in a d-embedding of (X,ρ) is unique.

Let (X,ρ) be a distance space. For a nonnegative integer r, we say that YX of size r+1 is independent if (Y,ρ) is strongly r-embeddable.

Proposition 16 ([10, Chapter IV]).

Let (X,ρ) be a strongly d-embeddable distance space. Then the following hold: (i) any single-element set is independent, (ii) if YX is independent, then any ZY is independent, and (iii) if Y,ZX are independent and |Y|>|Z| then there is a yYZ such that Z{y} is independent, (iv) the maximum size of an independent set is d+1 and any independent set Y of size d+1 is a metric basis.

Proposition 17 ([10, Chapter IV] and [1, 38]).

Given a distance space 𝒳=(X,ρ) with n points and a positive integer d, in 𝒪(n3) time, it can be decided whether 𝒳 can be embedded into d and, if such an embedding exists, then a metric basis and a realization can be constructed in this running time.

We remind that by our convention, we do not distinguish metric spaces and the corresponding distance matrices. Thus, we say that an n-tuple of points of d is a realization of an n×n distance matrix. Furthermore, we say that a subset of indices X{1,,n} is a metric basis of the distance matrix meaning that the corresponding points of the distance space compose a metric basis for it. In this spirit, if M is the distance matrix of a (strongly) d-embeddable distance space, then we say that M is a (strongly) d-embeddable EDM.

Graphs and matrices.

We consider simple finite undirected graphs and refer to [20] for the standard graph-theoretic notation. Given a graph G, we denote by V(G) and E(G) the sets of vertices and edges, respectively. Throughout the paper we use n and m for |V(G)| and |E(G)|, respectively, if the graph is clear from the context. A set of pairwise adjacent vertices K of G is called a clique and a set of pairwise non-adjacent vertices is independent. A family of k cliques 𝒞={C1,,Ck} of a graph G is en edge clique cover of G if for every edge uvE(G), there is i{1,,k} such that uv is covered by Ci, that is, u,vCi. For a vertex vV(G), we use NG(v) to denote the open neighborhood of v, that is, the set of adjacent to v vertices. The degree dG(v)=|NG(v)|, and the maximum degree of G is Δ(G)=max{dG(v)vV(G)}. For a graph G, its complement G¯ is the graph with the same set of vertices as G, and two distinct vertices u,vV(G) are adjacent to G¯ if and only if they are not adjacent in G.

Let A be an n×n matrix. The matrix obtained from A by deleting nk rows and nk columns (with 1k,kn) is called a k×k submatrix of A. A principal submatrix of A is a square submatrix obtained by deleting the same set of row and column indices; that is, if the i-th row of A is deleted, then the i-th column is also deleted. Let G be a graph with V(G)={1,,n}. An n×n matrix A=(aij) over 0 with some unspecified elements is said to be a G-partial matrix if (i) the entry aij is defined (or specified) if and only if ijE(G), (ii) aij=aji for all ijE(G), and aii=0 for all i{1,,n}. We also say that G is the underlying graph of A. Let A be a G-partial matrix and let d be a positive integer. A matrix D is said to be a d-EDM completion of A if:

  1. 1.

    D is d-embeddable, and

  2. 2.

    dij=aij for all ijE(G).

See Figure 3 for an example.

A=[011.25101.251.251.250110]
D=[011.254.25101.254.251.251.25014.254.2510]
Figure 3: Graph G, G-partial matrix A, and EDM completion D of A. The distance space 𝒳 defined by D is embeddable into 2. For example, a realization φ of 𝒳 would map the elements of 𝒳 to points p1=(0,0), p2=(1,0), p3=(0.5,1), and p4=(0.5,2).

It is convenient for us to combine graph-theoretic and matrix notation. Let A=(aij) be symmetric n×n matrix and let G be a graph with V(G)=[n]. For a set X[n], we use G[X] to denote the subgraph of G induced by X and we use A[X] to denote the principal submatrix indexed by X, that is, the submatrix of A composed by the elements aij with i,jX. We also write GX and AX to denote the graph obtained by the deletion of the vertices of X and the submatrix obtained by the deletion of the rows and columns indexed by X, respectively, that is, GX=G[V(G)X] and AX=A[V(G)X]. For a set X={x}, we write Gx and Ax instead of G{x} and A{x}, respectively.

We conclude this section with Theorem 1, which shows that for tractability of d-EDMC, it is not sufficient to require high density of the specified element in the input matrix (or, equivalently, high density of the underlying graph G).

Theorem 1. [Restated, see original statement.]

ε(0,1), d-EDMC remains strongly NP-hard even for instances (M,d) with d=2 in which the n×n matrix M contains at most εn unspecified entries.

3 Compressing 𝑮-partial matrices when 𝑮 is dense (distance from triviality I and II)

This section is devoted to proving Theorem 4, Theorem 8 and Theorem 11.

Proof of Theorem 4.

The main step of the proof is to identify an “irrelevant” vertex of G in polynomial time, that is, a vertex whose deletion does not transform a no-instance into a yes-instance. By exhaustively repeating this step of removing an irrelevant vertex we either solve the problem, or construct an equivalent instance on (d+1)𝒪(t2) rows and columns.

Let M be a G-partial matrix, where G excludes a t-block pattern. If t=1, then M is fully specified (i.e., G is complete) and so, we solve the instance (M,d) using Proposition 17. So, we assume that t>1. Let η(d,t)=(d+1)t+(t1)(d+1)t+1+1, and ρ(d,t)=(2t+η(d,t)22t1).

If n<ρ(d,t), then the desired compression is already achieved and we simply output (M,d). From now on, we assume that nρ(d,t). Since G¯ is Kt,t-free, it does not contain a clique of size 2t. By Ramsey’s classic theorem [22] G¯ must therefore contain an independent set X of size η(d,t). Moreover, such a set X can be computed in polynomial time. By definition, X induces a clique in G. Notice that because M is not fully specified, V(G)X.

We use Proposition 17 to check in polynomial time whether M[X] is d-embeddable. If not, then we report that (M,d) is a no-instance and stop. For every vV(G)X, notice that Cv={v}(NG(v)X) is a clique of G. So, for every vV(G)X we also check whether M[Cv] is d-embeddable, and report that (M,d) is a no-instance if it is not.

We next iteratively construct disjoint sets X1,,XtX of size at most d+1 as follows. Assuming that X0=, we select Xi to be a metric basis of M[Xj=0i1Xj] for i{1,,t} obtained using Proposition 17. As |Xi|d+1 for i{1,,t}, we have that |i=1tXi|(d+1)t. Moreover, since X is large enough, the sets X1,,Xt exist.

Consider Y={yV(G)X:XiNG(y) for all i{1,,t}}. That is, Y consists of all vertices outside X having a non-neighbor in each Xi in G.

Claim 18.

|Y|(t1)(d+1)t.

For every yY, we consider the clique Ky=NG(y)X. Since KyCy and we have already concluded that M[Cy] is d-embeddable, we have that M[Ky] is d-embeddable. We compute a metric basis Zy of M[Ky] using Proposition 17. Because |Y|(t1)(d+1)t by Claim 18 and |Zy|d+1 for yY, we have that |yYZy|(t1)(d+1)t+1. Because |i=1tXi|(d+1)t and |X|(d+1)t+(t1)(d+1)t+1+1, we have that there is wX((i=1tXi)(yYZy)).

Claim 19.

The instances (M,d) and (Mw,d) of d-EDMC are equivalent.

We set M:=Mw and iterate. In at most n rounds, we either solve the problem or obtain an equivalent instance (M,d), where M is a n×n submatrix of M with n<(2t+η(d,t)22t1). For the running time, note that the construction of the independent set X as well as that of X1,,Xt is done in polynomial time by Proposition 17. Then Y and the sets Zy for yY can also be constructed in polynomial time by Proposition 17. So, an irrelevant vertex can be found in polynomial time. Because the total number of rounds is at most n, the overall running time is polynomial.

As discussed, by combining Theorem 4 with Theorem 5, we obtain the following corollary.

Corollary 6. [Restated, see original statement.]

For every d,t, and n×n partial matrix M excluding a t-block pattern, d-EDMC is solvable in time 2(d+1)𝒪(t2)+n𝒪(1).

In the remaining part of the section, we show that for some other classes of dense graphs G, we can obtain a better compression for d-EDMC than the one obtained by using Theorem 4 as a black box. The proofs of these results still follow the same lines as the proof of Theorem 4. First, we consider the case when G¯ has bounded maximum degree. Since a graph of maximum degree at most Δ does not contain KΔ+1,Δ+1, in the following theorem, we consider a subclass of matrices considered in Theorem 4.

Theorem 8. [Restated, see original statement.]

There is a polynomial-time algorithm that, given an instance (M,d) of d-EDMC such that every row of M has at most Δ unspecified entries, either solves the problem, or outputs an equivalent instance (M,d), such that M is a principal n×n submatrix of M, where n(d+1)(Δ+1)2.

Finally in this section, we prove Theorem 11. Notice that Theorem 11 assumes that an edge clique cover is given. However, an edge clique cover of size at most k can be found in FPT in k time (if exists) by the results of Gramm et al. [30].

Proposition 20 ([30]).

Given a graph G and a positive integer k, it can be decided in 22𝒪(k)n𝒪(1) time whether G admits an edge clique cover of size at most k. Furthermore, an edge clique cover can be found in the same time if it exists.

Then we obtain the following corollary.

Corollary 12. [Restated, see original statement.]

For every d,k, and n×n partial matrix M such that the specified entries in M can be covered by at most k fully specified principal submatrices, d-EDMC is solvable in time 2𝒪(d2k4(logd+logk))+22𝒪(k)n𝒪(1).

4 The case of bounded fill-in (distance from triviality III)

In this section, we present our algorithm for d-EDMC for G-partial matrices when G is almost chordal, i.e., it has a small fill-in. Recall that the minimum fill-in of a graph G is the size of a smallest set of non-edges whose addition to G makes it chordal.

Theorem 13. [Restated, see original statement.]

Let M be an n×n G-partial matrix and let d. There is an algorithm that runs in d𝒪(kd) 2𝒪(k2)n𝒪(k) time, where k is the size of a minimum fill-in of G, and correctly decides whether (M,d) is a yes-instance of d-EDMC.

Towards the proof of this theorem, let us prepare as follows.

Proposition 21 ([4]).

Every G-partial matrix M where G is chordal can be completed to an EDM in d if every fully specified principal submatrix of M is d-embeddable.

Definition 22 ([5]).

Let R be a real closed field and 𝒫R[X1,,Xt] be a finite set of polynomials. A 𝒫-atom is one of P=0,P0, P0, P0, where P is a polynomial in 𝒫 and a quantifier-free 𝒫-formula is a formula constructed from 𝒫-atoms together with the logical connectives , and ¬. The R-realization of a formula F with free variables x1,,xr is a mapping ν:{x1,,xr}R so that the sentence resulting from F (denoted by F[ν]) by instantiating each free variable x with ν(x) is true.

Proposition 23 (Theorem 13.13, [5]).

Let s,. Let (X1)(Xt)F(X1,,Xt), be a sentence, where F(X1,,Xt) is a quantifier free 𝒫-formula where 𝒫R[X1,,Xt] is a set of at most s polynomials each of degree at most . There exists an algorithm to decide the truth of the sentence with complexity333The measure of complexity here is the number of arithmetic operations. Recall that we use the real RAM model. st+1𝒪(t) in D where D is the ring generated by the coefficients of the polynomials in 𝒫.

Definition 24.

Let M be a G-partial matrix where V(G)=[n] and let Z denote the set of pairs in ([n]2) such that every pair in Z indexes a pair of unspecified entries of M, that is, for every {i,j}Z, Mij and Mji are both unspecified. Define the matrix M^ as follows. If {i,j}Z, then define M^ij=Mij, otherwise define M^ij=zij where zij is an indeterminate.

We have the following adaptation of the notion of Z-augmented Cayley-Menger determinant from [6].

Definition 25.

Let M and Z be as described in Definition 24. Let I={x0,,xr}[n]. The Z-Augmented Cayley-Menger determinant indexed by I is obtained from the Cayley-Menger determinant by replacing each ρxi,xj2 with M^xi,xj.

Lemma 26.

Let M,Z and I={x0,,xr} be as described in Definition 25. Then, CMZ(x0,x1,,xr) is a multi-variate polynomial with real coefficients, over the set {zij{i,j}Z} of indeterminates where each monomial has degree at most min(|I|,2|Z|).

Lemma 27.

There is an algorithm that, given M,I,Z as described in Definition 25, runs in time |I|𝒪(|I|)n𝒪(1) and produces the polynomial representing the Z-Augmented Cayley-Menger determinant indexed by I.

Lemma 28.

Consider an n×n EDM M and Y[n]. Let B[n] be a metric basis of MY. Then, there is a metric basis of M that contains B.

Proof of Theorem 13.

Let the instance (M,d) be given, where M is G-partial and moreover, let X be a set of at most k non-edges of G such that G=G+X is a chordal graph. It is straightforward to construct G from M and once we have G, we compute X (if it exists) in time 2o(k)n𝒪(1) using the algorithm of Fomin and Villanger [26]. In the rest of the proof, we will only refer to the graph G, so we can refer to the pairs in X as edges. Let 𝒵 denote a set of 2k indeterminates, two per edge in X. Formally, for every edge uvX, 𝒵 contains the indeterminates zuv and zvu. Let C1,,Ct be the maximal cliques in G. It is well-known that tn and these cliques can be computed in polynomial time [27].

  1. 1.

    Do the following for each i[t]:

    1. (a)

      Define 𝒵i={zuvu,vV(Ci)}. That is, 𝒵i comprises those indeterminates corresponding to those edges in X that have both endpoints in V(Ci).

    2. (b)

      Define VX(Ci)={uv:uvX{u,v}V(Ci)}. That is, VX(Ci) is the set of endpoints of edges in X that are contained in Ci.

    3. (c)

      Define Bi to be an arbitrary metric basis of Mi=M[V(Ci)VX(Ci)]. Since by definition, Mi is fully specified, Bi is well-defined. If |Bi|>d+1, then stop and conclude that the input is a no-instance.

    4. (d)

      For every YVX(Ci) of size at most d+1|Bi|, do the following:

      1. i.

        Define BiY=BiY={x0,,xr}.

      2. ii.

        Use Lemma 27 to construct the following set PiY of atoms:

        1. A.

          (1)j+1CMZi(x0,x1,,xj)>0, where 1jr.

        2. B.

          CMZi(x0,x1,,xr,x)=0 for every xV(Ci)BiY.

        3. C.

          CMZi(x0,x1,,xr,x,y)=0 for every x,yV(Ci)BiY.

        4. D.

          zuv0 for each indeterminate zuvZi.

        5. E.

          zuvzvu=0 for each pair zuv,zvu of indeterminates in Zi.

      3. iii.

        Define ϕiY to be the quantifier-free formula defined as the conjunction of the atoms in PiY.

    5. (e)

      Define Ψi to be the quantifier-free formula defined as the disjunction of the formulas ϕiY taken over all YVX(Ci) of size at most d+1|Bi|.

  2. 2.

    Define the quantifier-free formula Γ=i[t]Ψi.

  3. 3.

    Run the algorithm of Proposition 23 on the sentence obtained by existentially quantifying the indeterminates in 𝒵 and prepending them to Γ. Return the same answer as that produced by this invocation.

Claim 29.

(M,d) is a yes-instance of d-EDMC if and only if this algorithm returns Yes.

Claim 30.

For each i[t] and YVX(Ci), the atoms in PiY are 𝒫iY-atoms, where 𝒫iY is a set of 𝒪(n2) polynomials each of degree at most min(d+3,2k).

Claim 31.

The algorithm runs in time d𝒪(kd)2𝒪(k2)n𝒪(k).

These three claims complete the proof of the theorem.

5 Concluding remarks and open questions

By Theorem 13, the d-EDMC problem can be solved in polynomial time for every fixed value of d and k. Moreover, for fixed values of k, our algorithm is FPT in d. It is therefore a natural question whether the problem is in FPT with respect to both d and k.

References

  • [1] Jorge Alencar, Tibérius O. Bonates, Carlile Lavor, and Leo Liberti. An algorithm for realizing euclidean distance matrices. Electron. Notes Discret. Math., 50:397–402, 2015. doi:10.1016/J.ENDM.2015.07.066.
  • [2] Abdo Y. Alfakih. Euclidean distance matrices and their applications in rigidity theory. Springer, 2018.
  • [3] A.Y. Alfakih, A. Khandani, and H. Wolkowicz. Solving euclidean distance matrix completion problems via semidefinite programming. Comput. Optim. Appl., 12:13–30, 1999. doi:10.1023/A:1008655427845.
  • [4] M. Bakonyi and C. Johnson. The euclidean distance matrix completion problem. SIAM J. Matrix Anal. Appl., 16:646–654, 1995. doi:10.1137/S0895479893249757.
  • [5] Saugata Basu, Richard Pollack, and Marie-Françoise Roy. Algorithms in Real Algebraic Geometry (Algorithms and Computation in Mathematics). Springer-Verlag, Berlin, Heidelberg, 2006.
  • [6] Matthias Bentert, Fedor V. Fomin, Petr A. Golovach, M. S. Ramanujan, and Saket Saurabh. When distances lie: Euclidean embeddings in the presence of outliers and distance violations. In Oswin Aichholzer and Haitao Wang, editors, 41st International Symposium on Computational Geometry, SoCG 2025, June 23-27, 2025, Kanazawa, Japan, volume 332 of LIPIcs, pages 15:1–15:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.SOCG.2025.15.
  • [7] Bonnie Berger, Jon M. Kleinberg, and Frank Thomson Leighton. Reconstructing a three-dimensional model with arbitrary errors. J. ACM, 46(2):212–235, 1999. doi:10.1145/301970.301972.
  • [8] P. Biswas, T.-C. Liang, K.-C. Toh, T.-C. Wang, and Y. Ye. Semidefinite programming approaches for sensor network localization with noisy distance measurements. IEEE Trans. Autom. Sci. Eng., 3:360–371, 2006. doi:10.1109/TASE.2006.877401.
  • [9] P. Biswas and Y. Ye. Semidefinite programming for ad hoc wireless sensor network localization. In 3rd International Symposium on Information Processing in Sensor Networks, pages 46–54, Berkeley, CA, 2004. ACM. doi:10.1145/984622.984630.
  • [10] L.M. Blumenthal. Theory and Applications of Distance Geometry. Chelsea, New York, 2nd edition, 1970.
  • [11] E.J. Candes and Y. Plan. Matrix completion with noise. Proc. IEEE, 98:925–936, 2010. doi:10.1109/JPROC.2009.2035722.
  • [12] Augustin-Louis Cauchy. Sur les polygones et polyèdres. Journal de l’École Polytechnique, 19:87–90, 1813.
  • [13] Arthur Cayley. On the theory of determinants. Philosophical Magazine, 19:1–16, 1841.
  • [14] G.M. Crippen. Chemical distance geometry: Current realization and future projection. J. Math. Chem., 6:307–324, 1991.
  • [15] G.M. Crippen and T.F. Havel. Distance Geometry and Molecular Conformation, volume 15 of Chemometrics Series. Research Studies Press, Taunton, 1988.
  • [16] F. Critchley. On certain linear mappings between inner-product and squared distance matrices. Linear Algebra Appl., 105:91–107, 1988.
  • [17] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
  • [18] J. Dattorro. Convex Optimization & Euclidean Distance Geometry. Meboo Publishing USA, 2008.
  • [19] Michel Deza, Monique Laurent, and Robert Weismantel. Geometry of cuts and metrics, volume 2. Springer, 1997.
  • [20] Reinhard Diestel. Graph theory, volume 173 of Graduate Texts in Mathematics. Springer-Verlag, Berlin, 3rd edition, 2005.
  • [21] L. Doherty, K.S.J. Pister, and L. El Ghaoui. Convex position estimation in wireless sensor networks. In IEEE INFOCOM, volume 3, pages 1655–1663, Anchorage, AK, 2001.
  • [22] P. Erdös and G. Szekeres. A combinatorial problem in geometry. Compositio Math., 2:463–470, 1935. URL: http://www.numdam.org/item?id=CM_1935__2__463_0.
  • [23] Haw-ren Fang and Dianne P O’Leary. Euclidean distance matrix completion problems. Optimization Methods and Software, 27(4-5):695–717, 2012. doi:10.1080/10556788.2011.643888.
  • [24] R.W. Farebrother. Three theorems with applications to euclidean distance matrices. Linear Algebra Appl., 95:11–16, 1987.
  • [25] Fedor V. Fomin, Daniel Lokshtanov, Saket Saurabh, and Meirav Zehavi. Kernelization. Theory of Parameterized Preprocessing. Cambridge University Press, 2019.
  • [26] Fedor V. Fomin and Yngve Villanger. Subexponential parameterized algorithm for minimum fill-in. SIAM J. Computing, 42(6):2197–2216, 2013. doi:10.1137/11085390X.
  • [27] Martin Charles Golumbic. Algorithmic Graph Theory and Perfect Graphs. Academic Press, New York, 1980.
  • [28] J.C. Gower. Euclidean distance geometry. Math. Sci., 7:1–14, 1982.
  • [29] J.C. Gower. Properties of euclidean and non-euclidean distance matrices. Linear Algebra Appl., 67:81–97, 1985.
  • [30] Jens Gramm, Jiong Guo, Falk Hüffner, and Rolf Niedermeier. Data reduction and exact algorithms for clique cover. ACM Journal of Experimental Algorithmics, 13, 2008. doi:10.1145/1412228.1412236.
  • [31] T.F. Havel, I.D. Kuntz, and G.M. Crippen. The theory and practice of distance geometry. Bull. Math. Biol., 45:665–720, 1983.
  • [32] M. Laurent. A tour d’horizon on positive semidefinite and euclidean distance matrix completion problems. In Semidefinite Programming and Interior-Point Approaches for Combinatorial Optimization Problems, Fields Institute Communications, pages 51–76. Amer. Math. Soc., Providence, 1998.
  • [33] Monique Laurent. Polynomial instances of the positive semidefinite and euclidean distance matrix completion problems. SIAM J. Matrix Anal. Appl., 22:874–894, 2001. doi:10.1137/S0895479899352689.
  • [34] Karl Menger. Untersuchungen über allgemeine metrik. Mathematische Annalen, 100:75–163, 1928.
  • [35] James B Saxe. Embeddability of weighted graphs in k-space is strongly np-hard. In 17th Allerton Conf. Commun. Control Comput., 1979, pages 480–489, 1979.
  • [36] Isaac J. Schoenberg. Remarks to Maurice Fréchet’s article “Sur la définition axiomatique d’une classe d’espace distanciés vectoriellement applicable sur l’espace de Hilbert”. Annals of Mathematics, 36:724–732, 1935.
  • [37] Anastasios Sidiropoulos, Dingkang Wang, and Yusu Wang. Metric embeddings with outliers. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 670–689. SIAM, 2017. doi:10.1137/1.9781611974782.43.
  • [38] Manfred J. Sippl and Harold A. Scheraga. Solution of the embedding problem and decomposition of symmetric matrices. Proc. Nat. Acad. Sci. U.S.A., 82(8):2197–2201, 1985. doi:10.1073/pnas.82.8.2197.
  • [39] K.Q. Weinberger, F. Sha, and L.K. Saul. Learning a kernel matrix for nonlinear dimensionality reduction. In 21st International Conference on Machine Learning (ICML), page 106, Banff, AB, 2004. ACM.
  • [40] Y. Yemini. Some theoretical aspects of position-location problems. In 20th Annual Symposium on Foundations of Computer Science (SFCS), pages 1–8. IEEE, 1979.
  • [41] G. Young and A. Householder. Discussion of a set of points in terms of their mutual distances. Psychometrika, 3:19–22, 1938.