Searcharxiv⌕ Search

arXiv subjects

Thijs van der Horst

Publications and source records attributed to Thijs van der Horst.

12 recordsLinked to original sources

A Strongly-Subquadratic $(3+\varepsilon)$-Approximation for the Fréchet Distance for Paths in Metric Spaces

The Fréchet distance is a well-studied distance measure for paths in a metric space. It is mostly studied for paths in $d$-dimensional Euclidean space. Here, computing the Fréchet distance between two polylines takes time roughly quadratic in the number of vertices. Assuming the strong exponential time hypothesis (SETH), it cannot be approximated to within a factor less than $3$ in strongly-subquadratic time. Recently, it was shown that for any $\varepsilon>0$, there exists a randomized algorithm that can compute a $(7+\varepsilon)$-approximation in strongly-subquadratic expected time [Cheng, Huang, and Zhang; STOC'25]. For polylines with $n$ and $m$ vertices in a Euclidean space of constant dimension, where $n \geq m$, their algorithm takes $O(nm^{0.99} \log(n/\varepsilon))$ time in expectation. We present a deterministic approximation algorithm that significantly improves upon the approximation factor and running time. Specifically, our algorithm computes a $(3+\varepsilon)$-approximation in $O(nm^{2/3} \log n \cdot \log (\frac{1}{\varepsilon} \log n))$ time. Our algorithm nearly matches the conditional lower bound on the approximation factor implied by SETH. For polylines in $\mathbb{R}$, we present a $3$-approximation algorithm that runs in $O(nm^{2/3} \log^{5/3} n)$ time, and exactly matches the conditional lower bound. For our results, we introduce a general strongly-subquadratic time $3$-approximate decision algorithm. This algorithm makes no assumptions on the ambient metric space, and relies only on standard assumptions on the so-called free space of the input paths. Under some mild assumptions, our decision algorithm leads to a $(3+\varepsilon)$-approximation algorithm in general metric spaces. These assumptions hold automatically for polylines in any metric space $(\mathbb{R}^d, L_p)$ with $p \geq 1$.

cs.CG↗

Reconfiguration of Squares Using a Constant Number of Moves Each

Multi-robot motion planning is a hard problem. We investigate restricted variants of the problem where square robots are allowed to slide over an arbitrary curve to a new position only a constant number of times each. We show that the problem remains NP-hard in most cases, except when the squares have unit size and when the problem is unlabeled, i.e., the location of each square in the target configuration is left unspecified.

cs.CG↗

Computing the Fréchet Distance When Just One Curve is $c$-Packed: A Simple Almost-Tight Algorithm

We study approximating the continuous Fréchet distance of two curves with complexity $n$ and $m$, under the assumption that only one of the two curves is $c$-packed. Driemel, Har{-}Peled and Wenk DCG'12 studied Fréchet distance approximations under the assumption that both curves are $c$-packed. In $\mathbb{R}^d$, they prove a $(1+\varepsilon)$-approximation in $\tilde{O}(d \, c\,\frac{n+m}{\varepsilon})$ time. Bringmann and Künnemann IJCGA'17 improved this to $\tilde{O}(c\,\frac{n + m }{\sqrt{\varepsilon}})$ time, which they showed is near-tight under SETH. Recently, Gudmundsson, Mai, and Wong ISAAC'24 studied our setting where only one of the curves is $c$-packed. They provide an involved $\tilde{O}( d \cdot (c+\varepsilon^{-1})(cn\varepsilon^{-2} + c^2m\varepsilon^{-7} + \varepsilon^{-2d-1}))$-time algorithm when the $c$-packed curve has $n$ vertices and the arbitrary curve has $m$, where $d$ is the dimension in Euclidean space. In this paper, we show a simple technique to compute a $(1+\varepsilon)$-approximation in $\mathbb{R}^d$ in time $O(d \cdot c\,\frac{n+m}{\varepsilon}\log\frac{n+m}{\varepsilon})$ when one of the curves is $c$-packed. Our approach is not only simpler than previous work, but also significantly improves the dependencies on $c$, $\varepsilon$, and $d$. Moreover, it almost matches the asymptotically tight bound for when both curves are $c$-packed. Our algorithm is robust in the sense that it does not require knowledge of $c$, nor information about which of the two input curves is $c$-packed.

cs.CG↗

Fréchet Distance in Unweighted Planar Graphs

The Fréchet distance is a distance measure between trajectories in $\Bbb{R}^d$ or walks in a graph $G$. Given constant-time shortest path queries, the Discrete Fréchet distance $D_G(P, Q)$ between two walks $P$ and $Q$ can be computed in $O(|P| \cdot |Q|)$ time using a dynamic program. Driemel, van der Hoog, and Rotenberg [SoCG'22] show that for weighted planar graphs this approach is likely tight, as there can be no strongly-subquadratic algorithm to compute a $1.01$-approximation of $D_G(P, Q)$ unless the Orthogonal Vector Hypothesis (OVH) fails. Such quadratic-time conditional lower bounds are common to many Fréchet distance variants. However, they can be circumvented by assuming that the input comes from some well-behaved class: There exist $(1+\varepsilon)$-approximations, both in weighted graphs and in $\Bbb{R}^d$, that take near-linear time for $c$-packed or $κ$-straight walks in the graph. In $\Bbb{R}^d$ there also exists a near-linear time algorithm to compute the Fréchet distance whenever all input edges are long compared to the distance. We consider computing the Fréchet distance in unweighted planar graphs. We show that there exist no strongly-subquadratic $1.25$-approximations of the discrete Fréchet distance between two disjoint simple paths in an unweighted planar graph in strongly subquadratic time, unless OVH fails. This improves the previous lower bound, both in terms of generality and approximation factor. We subsequently show that adding graph structure circumvents this lower bound: If the graph is a regular tiling with unit-weighted edges, then there exists an $\tilde{O}((|P| + |Q|)^{1.5})$-time algorithm to compute $D_G(P, Q)$. Our result has natural implications in the plane, as it allows us to define a new class of well-behaved curves that facilitate $(1+\varepsilon)$-approximations of their discrete Fréchet distance in subquadratic time.

cs.CG↗

Faster, Deterministic and Space Efficient Subtrajectory Clustering

Given a trajectory $T$ and a distance $Δ$, we wish to find a set $C$ of curves of complexity at most $\ell$, such that we can cover $T$ with subcurves that each are within Fréchet distance $Δ$ to at least one curve in $C$. We call $C$ an $(\ell,Δ)$-clustering and aim to find an $(\ell,Δ)$-clustering of minimum cardinality. This problem variant was introduced by Akitaya $et$ $al.$ (2021) and shown to be NP-complete. The main focus has therefore been on bicriteria approximation algorithms, allowing for the clustering to be an $(\ell, Θ(Δ))$-clustering of roughly optimal size. We present algorithms that construct $(\ell,4Δ)$-clusterings of $\mathcal{O}(k \log n)$ size, where $k$ is the size of the optimal $(\ell, Δ)$-clustering. We use $\mathcal{O}(n^3)$ space and $\mathcal{O}(k n^3 \log^4 n)$ time. Our algorithms significantly improve upon the clustering quality (improving the approximation factor in $Δ$) and size (whenever $\ell \in Ω(\log n / \log k)$). We offer deterministic running times improving known expected bounds by a factor near-linear in $\ell$. Additionally, we match the space usage of prior work, and improve it substantially, by a factor super-linear in $n\ell$, when compared to deterministic results.

cs.CG↗

Faster Fréchet Distance Approximation through Truncated Smoothing

The Fréchet distance is a commonly used distance measure for curves. Computing the Fréchet distance between two polygonal curves of $n$ vertices takes roughly quadratic time, and conditional lower bounds suggest that approximating to within a factor $3$ cannot be done in strongly-subquadratic time, even in one dimension. Currently, the best approximation algorithms present trade-offs between approximation quality and running time. At SoCG 2021, Colombe and Fox presented an $O((n^3 / α^2) \log n)$-time $α$-approximate algorithm for curves in arbitrary dimensions, for any $α\in [\sqrt{n}, n]$. In this work, we give an $α$-approximate algorithm with a significantly faster running time of $O((n^2 / α) \log n)$, for any $α\in [1, n]$. In particular, we give the first strongly-subquadratic $n^\varepsilon$-approximation algorithm, for any constant $\varepsilon \in (0, 1/2]$. For curves in one dimension we further improve the running time to $O((n^2 / α^3) \log^2 n)$, for $α\in [1, n^{1/3}]$. Both of our algorithms rely on a linear-time simplification procedure that in one dimension reduces the complexity of the reachable free space to $O(n^2 / α)$ without making sacrifices in the asymptotic approximation factor.

cs.CG↗

The Geodesic Fréchet Distance Between Two Curves Bounding a Simple Polygon

The Fréchet distance is a popular similarity measure that is well-understood for polygonal curves in $\mathbb{R}^d$: near-quadratic time algorithms exist, and conditional lower bounds suggest that these results cannot be improved significantly, even in one dimension and when approximating with a factor less than three. We consider the special case where the curves bound a simple polygon and distances are measured via geodesics inside this simple polygon. Here the conditional lower bounds do not apply; Efrat $et$ $al.$ (2002) were able to give a near-linear time $2$-approximation algorithm. In this paper, we significantly improve upon their result: we present a $(1+\varepsilon)$-approximation algorithm, for any $\varepsilon > 0$, that runs in $\mathcal{O}(\frac{1}{\varepsilon} (n+m \log n) \log nm \log \frac{1}{\varepsilon})$ time for a simple polygon bounded by two curves with $n$ and $m$ vertices, respectively. To do so, we show how to compute the reachability of specific groups of points in the free space at once, by interpreting the free space as one between separated one-dimensional curves. We solve this one-dimensional problem in near-linear time, generalizing a result by Bringmann and Künnemann (2015). Finally, we give a linear time exact algorithm if the two curves bound a convex polygon.

cs.CG↗

Robust Bichromatic Classification using Two Lines

Given two sets $R$ and $B$ of $n$ points in the plane, we present efficient algorithms to find a two-line linear classifier that best separates the "red" points in $R$ from the "blue" points in $B$ and is robust to outliers. More precisely, we find a region $\mathcal{W}_B$ bounded by two lines, so either a halfplane, strip, wedge, or double wedge, containing (most of) the blue points $B$, and few red points. Our running times vary between optimal $O(n\log n)$ and around $O(n^3)$, depending on the type of region $\mathcal{W}_B$ and whether we wish to minimize only red outliers, only blue outliers, or both.

cs.CG↗

Simply Realising an Imprecise Polyline is NP-hard

We consider the problem of deciding, given a sequence of regions, if there is a choice of points, one for each region, such that the induced polyline is simple or weakly simple, meaning that it can touch but not cross itself. Specifically, we consider the case where each region is a translate of the same shape. We show that the problem is NP-hard when the shape is a unit-disk or unit-square. We argue that the problem is NP-complete when the shape is a vertical unit-segment.

cs.CG↗

A Subquadratic $n^ε$-approximation for the Continuous Fréchet Distance

The Fréchet distance is a commonly used similarity measure between curves. It is known how to compute the continuous Fréchet distance between two polylines with $m$ and $n$ vertices in $\mathbb{R}^d$ in $O(mn (\log \log n)^2)$ time; doing so in strongly subquadratic time is a longstanding open problem. Recent conditional lower bounds suggest that it is unlikely that a strongly subquadratic algorithm exists. Moreover, it is unlikely that we can approximate the Fréchet distance to within a factor $3$ in strongly subquadratic time, even if $d=1$. The best current results establish a tradeoff between approximation quality and running time. Specifically, Colombe and Fox (SoCG, 2021) give an $O(α)$-approximate algorithm that runs in $O((n^3 / α^2) \log n)$ time for any $α\in [\sqrt{n}, n]$, assuming $m = n$. In this paper, we improve this result with an $O(α)$-approximate algorithm that runs in $O((n + mn / α) \log^3 n)$ time for any $α\in [1, n]$, assuming $m \leq n$ and constant dimension $d$.

cs.CG↗

Chromatic $k$-Nearest Neighbor Queries

Let $P$ be a set of $n$ colored points. We develop efficient data structures that store $P$ and can answer chromatic $k$-nearest neighbor ($k$-NN) queries. Such a query consists of a query point $q$ and a number $k$, and asks for the color that appears most frequently among the $k$ points in $P$ closest to $q$. Answering such queries efficiently is the key to obtain fast $k$-NN classifiers. Our main aim is to obtain query times that are independent of $k$ while using near-linear space. We show that this is possible using a combination of two data structures. The first data structure allow us to compute a region containing exactly the $k$-nearest neighbors of a query point $q$, and the second data structure can then report the most frequent color in such a region. This leads to linear space data structures with query times of $O(n^{1 / 2} \log n)$ for points in $\mathbb{R}^1$, and with query times varying between $O(n^{2/3}\log^{2/3} n)$ and $O(n^{5/6} {\rm polylog} n)$, depending on the distance measure used, for points in $\mathbb{R}^2$. Since these query times are still fairly large we also consider approximations. If we are allowed to report a color that appears at least $(1-\varepsilon)f^*$ times, where $f^*$ is the frequency of the most frequent color, we obtain a query time of $O(\log n + \log\log_{\frac{1}{1-\varepsilon}} n)$ in $\mathbb{R}^1$ and expected query times ranging between $\tilde{O}(n^{1/2}\varepsilon^{-3/2})$ and $\tilde{O}(n^{1/2}\varepsilon^{-5/2})$ in $\mathbb{R}^2$ using near-linear space (ignoring polylogarithmic factors).

cs.CG↗