Skip to content

Approximating the Geometric Graph Distance: A Metric Relaxation, an Approximation Scheme, and Hardness

Vitaliy Kurlin, Sushovan Majhi, Carola Wenk

cs.CG

Abstract

The geometric graph distance (GGD) compares graphs embedded in a Euclidean space--molecules, road networks, line drawings--by matching their vertices and charging vertex displacements and changes of edge length. It is a metric on graphs without isolated vertices, and it is NP-hard to compute. We show how its approximability depends on the ratio L/sL/s of the longest edge to the smallest vertex separation. Letting every edge choose its partner relaxes the matching, and making these choices injective gives a metric computable in polynomial time. For graphs of maximum degree ΔΔ, with vertex and edge weights CVC_V and CEC_E, this metric is within a factor O(Δ(1+CE/CV)L/s)O(Δ(1+C_E/C_V)L/s) of the GGD, and at fixed CE/CVC_E/C_V the linear dependence on L/sL/s is necessary. The proof also gives an approximation within this factor for every L/sL/s, in O(Δnlog⁡n)O(Δn\log n) time for nn vertices in fixed dimension. For bounded ΔΔ, L/sL/s and CE/CVC_E/C_V, in fixed dimension, the GGD admits an efficient polynomial-time approximation scheme (EPTAS); yet already for L/s=2L/s=2 and CV≤22CEC_V\le2\sqrt2C_E the GGD is NP-hard, with integer coordinates of polynomial size, and has no fully polynomial scheme unless P = NP. When L/sL/s may grow polynomially in nn, the GGD is APX-hard, so that it admits no polynomial-time approximation scheme unless P = NP; all our hardness holds for plane graphs that are disjoint unions of paths. For L/sL/s small compared with the ratio of the vertex and edge weights, a minimum cut computes it exactly. In experiments on molecules and letter drawings, the median ratio of the exact distance to the relaxation is 1.11.1 to 1.71.7, and 1.61.6 to 2.32.3 for its metric form, which on four published benchmarks is within five points of the best of six other distances.

Create a lesson

Metadata

Categories
cs.CG, cs.CC, cs.DS
Comments
33 pages, 8 figures, 1 table. Code: https://github.com/sushovan4/ggd-approx