Skip to content

Metric Planarity Testing is Hard

Anubhav Dhar, Debajyoti Kar, Sándor Kisfaludi-Bak, Hung Le, Bartłomiej Lewandowski, Karol Węgrzycki

cs.DSarXiv:2610.15682

Abstract

A key milestone in algorithmic graph theory is Hopcroft and Tarjan's 1974 linear-time algorithm for graph planarity testing. At a workshop in 2002, Linial and Rabinovich asked for either a polynomial-time algorithm or an NP-hardness proof for metric planarity testing: given a metric space (X,dX), determine whether there exists an edge-weighted planar graph G=(V,E,w) with X⊂eq V that realizes the distances in X, meaning that dG(x,y)=dX(x,y) for every x,y∈ X. This question arose in the context of research on metric embeddings and their applications in computer science since the mid-1990s. Over the past few decades, polynomial-time algorithms have been developed for several special cases. In this work, we show that metric planarity testing is NP-hard, in sharp contrast to graph planarity testing. Our reduction yields a stronger result: under the Exponential Time Hypothesis (ETH), no 2o(n)-time algorithm for metric planarity testing exists, where n is the number of points in the metric. To complement our ETH lower bound, we give two algorithmic results: (i) an algorithm for computing a metric planar embedding in 2O(n2) time and (ii) a (1+ε)-approximation algorithm in 2O(n) time for any fixed ε∈(0,1). The second algorithm produces a planar graph that preserves the input metric up to a factor of (1+ε).

Create a lesson