Problemcore
Distance geometry problem
Also called graph realization problem, molecular distance geometry problem.
Find points in d dimensions whose distances match given values on the edges of a graph. It is strongly NP-hard in every dimension and is the core of distance constraint solving.
The distance geometry problem asks for points that fit a list of distances. Some pairs of points come with a required distance, and the task is to place all points in the line, the plane or space so that every listed pair is exactly that far apart. A CAD sketch with only distance constraints, a molecule with distances from NMR, and a sensor network with ranges between nodes are all this problem. It is hard in general, already on a line, but it is easy when every distance is given, and practical when the points can be placed one at a time.
In plain words
You have a set of pins and a set of strings, and each string has a fixed length and ties two pins together. You want to put the pins on a table so that every string is pulled tight. Sometimes there is no way to do it, sometimes there is exactly one way, and sometimes there are many. Finding a way, or proving that none exists, can take a very long time once there are many strings. If you know the distance between every pair of pins, though, there is a quick and direct method.
Definition
Input. A graph with vertices, a length for each edge , and a dimension . In complexity statements the lengths are integers.
Output. A realization: a map with
or the answer that none exists. The decision version asks only whether a realization exists. Points of different vertices may coincide. A realization is never unique, since every rigid motion of maps it to another, so "unique" always means unique up to congruence.
The triple is a system of quadratic equations in unknowns. In the language of rigidity, a realization is a bar-and-joint framework with the given bar lengths.
Variants
- Complete graph (Euclidean distance matrix). All distances are given. This case is solved in polynomial time; see Known algorithms.
- Matrix completion form. Some entries of the squared distance matrix are given and the rest must be filled so that the result is a Euclidean distance matrix of rank at most , in the sense of the Cayley-Menger determinant conditions.
- Molecular distance geometry problem. , with distances from bond lengths, bond angles and NMR measurements, often given as intervals instead of exact values.
- Sensor network localization. or , where some vertices, the anchors, have known positions and the rest must be located from measured ranges.
- Discretizable instances. There is an order of the vertices such that each vertex after the first has edges to at least earlier ones, which form a simplex in general position. Then each new vertex has at most two positions, and a search tree of depth finds all realizations.
- Uniqueness. Given a realization, decide whether it is the only one up to congruence. For generic instances this is the global rigidity of the graph.
- Approximate version. Minimize , which is zero exactly at realizations. Measured data are noisy, so this is the form solved in practice.
Examples
- A triangle. Three vertices with all three edges have a realization in the plane exactly when the lengths satisfy the triangle inequality. The lengths have no realization in any dimension, and the Cayley-Menger determinant of the squared lengths is , the sign that shows it.
- A cycle on a line. The cycle on vertices with lengths along the edges has the realization on a line: the steps sum to 0. The lengths on a triangle have none, since no choice of signs makes . The proof below turns this into the reduction from partition.
- Trilateration. Anchors at , and and a point with squared distances , and to them. Subtracting the first equation from the other two gives the linear equations and , so , the only solution.
- Finitely many realizations. The 4-cycle in the plane with the diagonal , lengths , and , is two triangles on the common side . Each triangle can lie on either side of , so up to congruence there are two realizations: the rectangle, with , and the folded shape with . This is the generic situation for a rigid graph that is not globally rigid.
- Infinitely many realizations. The 4-cycle with four sides of length 1 in the plane has a one-parameter family of realizations, the rhombi. Its graph is not rigid.
- All distances given. The four corners of a rectangle with all six distances. The Gram matrix built from the squared distances has rank 2, and its factorization returns the corners up to congruence.
Known algorithms
- Complete graphs: Gram matrix factorization. Fix vertex and form . A realization in exists exactly when is positive semidefinite of rank at most , by Schoenberg's theorem, and the factorization gives the points. With an eigenvalue decomposition or an variant of Cholesky decomposition this costs arithmetic operations. Classical multidimensional scaling is the same method with a centred Gram matrix, and on noisy data it keeps the largest eigenvalues.
- Trilateration and constructive solving. If the vertices can be ordered so that each new vertex has placed neighbours in general position, every new point solves a linear system, and the realization is unique and found in time. With only placed neighbours each step has two solutions, as with a circle-circle intersection in the plane. This is constructive constraint solving, and the choice among the branches is the root identification problem.
- Branch and prune. For discretizable instances, a depth-first search places the vertices in order, tries both positions of each, and prunes a branch as soon as an extra distance fails. It lists all realizations, in exponential time in the worst case, and works well on protein backbones.
- Semidefinite relaxation. Replace the Gram matrix of the unknown points by a matrix variable whose entries satisfy the linear equations , and drop the rank condition. This is a semidefinite program. When the instance has a unique realization in all dimensions at once, which is universal rigidity, the relaxation returns it, as shown by So and Ye for sensor networks.
- Local and global optimization. Minimize the approximate form above with gradient descent, Levenberg-Marquardt or a Newton method, usually from a starting point given by a relaxation. The function is not convex, so global optimization methods or many restarts are needed for a guarantee.
- Exact algebraic methods. Small systems are solved as polynomial systems, by Gröbner bases or homotopy continuation, which return all complex solutions and filter the real ones.
Bounds
Theorem (Saxe 1979). The distance geometry problem with integer lengths is NP-complete for , and strongly NP-hard for every fixed . It stays NP-hard when every length is 1 or 2. Deciding whether an instance with a given realization has a second realization not congruent to it is also NP-hard for every .
The full proofs reduce from 3-SAT with gadgets of lengths 1 and 2. The weaker statement for has a short proof.
Proof that the line case is NP-complete. Membership. On a line, for every edge. Fix a spanning forest. A realization is determined, up to translation of each component, by one sign per tree edge, and every position is an integer sum of lengths. So the signs are a certificate of polynomial size, and checking all edges takes linear time. Hardness. Reduce from the partition problem: given positive integers , decide whether they split into two parts with equal sums. Build the cycle with , indices modulo . A realization gives signs , and going once around the cycle gives , so the indices with form a partition. Conversely, a partition gives signs with , and the partial sums are a realization. The reduction takes linear time.
This reduction alone gives only weak hardness, since partition is solved in pseudo-polynomial time by the subset sum table, and so is the cycle on a line. Saxe's 3-SAT reduction uses only lengths 1 and 2, which is why the hardness is strong: it holds even when the lengths are written in unary.
Upper bounds. For the problem is in NP. For a realization may need irrational coordinates, as in an equilateral triangle, so a list of coordinates is not an obvious certificate, and membership in NP is open. The problem is a system of polynomial equations over the reals, so it lies in the existential theory of the reals and can be decided in polynomial space. Schaefer (2013) showed that in the plane it is complete for that class, also when every length is 1.
What is measured and what is proved. The hardness results are worst-case theorems. The good behaviour of branch and prune on protein data, and of semidefinite relaxations on random sensor networks, is measured on families of instances, not proved for all inputs.
Reductions
- From partition and 3-SAT. The reductions above. The cycle construction is the simplest, and Saxe's 3-SAT gadgets give strong hardness in every dimension.
- To rigidity. For generic lengths, the number of realizations is finite exactly when the graph is rigid, which the rigidity matrix decides by a rank, and unique exactly when the graph is globally rigid. These properties depend on the graph only, but they say nothing about whether a given instance has any realization.
- To matrix completion. Realizability is the completion of a partial squared distance matrix to a Euclidean distance matrix of rank at most , that is, a positive semidefinite Gram matrix of rank at most . Dropping the rank bound gives a semidefinite feasibility problem.
- To polynomial systems. Every instance is a system of quadratic equations, and every algebraic method for real polynomial systems applies, with the cost of such methods.
Applications
- Distance constraints in CAD. A 2D sketch or a 3D assembly with only point-to-point distance constraints is an instance with or . Constraint solvers use decomposition into rigid clusters, as in DR-plans, to break it into small instances that are solved by construction.
- Protein structure. NMR experiments give distance intervals between nearby hydrogen atoms, and bond lengths and angles give exact distances. The structure is a realization in .
- Sensor networks and robot formations. Nodes measure distances to their neighbours, and anchors know their positions. Localization is the anchored version with or , and distance-based formation control keeps a team of robots at the distances of a target realization.
- Data visualization. Multidimensional scaling places items in the plane so that their distances approximate given dissimilarities, an approximate version on the complete graph.
References
- James B. Saxe, Embeddability of weighted graphs in k-space is strongly NP-hard, Proceedings of the 17th Allerton Conference on Communication, Control and Computing, 480 to 489, 1979, NP-completeness on a line, strong NP-hardness in every dimension k, hardness with edge weights 1 and 2, and hardness of deciding whether a second embedding exists
- Leo Liberti, Carlile Lavor, Nelson Maculan and Antonio Mucherino, Euclidean distance geometry and applications, SIAM Review 56(1), 3 to 69, 2014, the definition of the problem and its variants, complexity, the case of complete graphs, discretizable instances and branch and prune, semidefinite and global optimization methods, and applications to molecules and sensor networks
- Marcus Schaefer, Realizability of graphs and linkages, in Thirty Essays on Geometric Graph Theory, Springer, 461 to 482, 2013, realizability of linkages in the plane is complete for the existential theory of the reals, also with unit lengths
- I. J. Schoenberg, Remarks to Maurice Fréchet's article "Sur la définition axiomatique d'une classe d'espaces distanciés vectoriellement applicable sur l'espace de Hilbert", Annals of Mathematics 36(3), 724 to 732, 1935, the complete graph case, solved by the positive semidefinite Gram matrix
- Meera Sitharam, Audrey St. John and Jessica Sidman (editors), Handbook of Geometric Constraint Systems Principles, CRC Press, 2018, the chapters on distance constraint systems and their realization
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag Q3DH81 Edit this page History Report an error Markdown