Abstract: We investigate the computational complexity of computing the Hausdorff distance between semi-algebraic sets. Specifically, we demonstrate that the decision problem of whether the Hausdorff distance of two such sets is bounded by a given threshold is complete for the complexity class $\forall\exists_<\mathbb{R}$. This result establishes that the problem is NP-, co-NP-, $\exists\mathbb{R}$-, and $\forall\mathbb{R}$-hard, settling a long-standing question in computational geometry.
1. Introduction
The Hausdorff distance is a fundamental metric used to quantify the similarity between two sets of points. Intuitively, it represents the maximum distance one must travel from any point in one set to reach the nearest point in the other set. This metric finds extensive application in computer vision, geographic information systems (GIS), and computer-aided design (CAD) for comparing shapes, trajectories, and complex surfaces.
While efficient algorithms exist for calculating this distance between finite point sets or simple polygons, many real-world objects are more accurately modeled as semi-algebraic sets—shapes defined by systems of polynomial inequalities, such as circles, ellipses, or intricate 3D meshes. Until now, the precise computational complexity of determining the Hausdorff distance for these sets remained an open question.
2. Defining the Hausdorff Metric
The Hausdorff distance $d_H(A, B)$ between two sets $A$ and $B$ is defined as the maximum of the directed distances between them. Formally, it is the smallest value $t$ such that every point in $A$ is within distance $t$ of some point in $B$, and vice versa.
As illustrated above, the geometric relationship can vary significantly depending on whether one set is contained within another or if they overlap. The complexity arises from the need to verify this condition for every point in the continuous domain of the sets.
3. Computational Complexity and Logical Encoding
The core contribution of this work is identifying the exact complexity class of the Hausdorff distance decision problem. The authors prove it is $\forall\exists_{<}\mathbb{R}$-complete. This class is significantly more difficult than NP or the standard Existential Theory of the Reals ($\exists\mathbb{R}$).
The "aha moment" in this research is the realization that the definition of Hausdorff distance perfectly mirrors the logical structure of a $\forall\exists$ quantifier block. To check if the distance is at most $t$, one must verify the first-order logic sentence: $\forall a \in A, \exists b \in B : \|a - b\| \le t$. Because this requires checking every point in set $A$ to find some point in set $B$, the problem is inherently more complex than those requiring only the discovery of a single solution.
4. Methodology
The researchers employed a combination of logic and real algebraic geometry to map the geometric problem to the challenge of quantifier elimination.
- Hardness Reduction: To prove the problem's difficulty, they reduced a known hard problem from the Universal Existential Theory of the Reals (UETR) to the Hausdorff problem. A key innovation was a "preprocessing step" that transforms logical formulas so that their counterexamples—points where the formula fails—expand from single points into open balls. This expansion creates a measurable "gap" in distance that is computationally detectable.
- Membership Proof: To show the problem belongs to $\forall\exists_{<}\mathbb{R}$, the authors utilized the Ball Theorem and Singly Exponential Quantifier Elimination. These tools allowed them to bound variable ranges and simplify distance formulas into a standard form.
- Strictness vs. Non-Strictness: The paper distinguishes between $\forall\exists\mathbb{R}$ and $\forall\exists_{<}\mathbb{R}$ (where only strict inequalities like $<$ are permitted), showing that the "strict" version is the natural mathematical home for the Hausdorff distance.
5. Key Results and Inapproximability
The study yields several striking conclusions regarding the limits of computation for this metric:
- Completeness: The decision version of the problem is $\forall\exists_{<}\mathbb{R}$-complete, implying it is NP-hard, co-NP-hard, $\exists\mathbb{R}$-hard, and $\forall\mathbb{R}$-hard.
- Inapproximability: There is no polynomial-time algorithm capable of approximating the Hausdorff distance within even a doubly exponential factor of the input size, unless the entire complexity hierarchy collapses ($P = \forall\exists_{<}\mathbb{R}$).
- Simple Hardness: The problem remains just as difficult even when the sets are described by very simple equations, such as a conjunction of quadratic polynomial equations or a single polynomial of degree four.
6. Conclusion and Future Work
By settling the complexity of the Hausdorff distance for semi-algebraic sets, this work bridges the gap between abstract logical frameworks and concrete geometric problems. However, several questions remain. A primary theoretical mystery is whether the complexity classes $\forall\exists_{<}\mathbb{R}$ and $\forall\exists\mathbb{R}$ are truly distinct; while they collapse in the existential-only case, their relationship at higher levels of the hierarchy is unproven. Additionally, while general semi-algebraic sets are hard, future research may find more efficient, specialized algorithms for restricted geometries, such as convex sets, which are common in industrial applications.
Summary updated