-
Degree of Convexity and Expected Distances in Polygons
Authors:
Mikkel Abrahamsen,
Viktor Fredslund-Hansen
Abstract:
We present an algorithm for computing the so-called Beer-index of a polygon $P$ in $O(n^2)$ time, where $n$ is the number of corners. The polygon $P$ may have holes. The Beer-index is the probability that two points chosen independently and uniformly at random in $P$ can see each other. Given a finite set $M$ of $m$ points in a simple polygon $P$, we also show how the number of pairs in $M$ that s…
▽ More
We present an algorithm for computing the so-called Beer-index of a polygon $P$ in $O(n^2)$ time, where $n$ is the number of corners. The polygon $P$ may have holes. The Beer-index is the probability that two points chosen independently and uniformly at random in $P$ can see each other. Given a finite set $M$ of $m$ points in a simple polygon $P$, we also show how the number of pairs in $M$ that see each other can be computed in $O(n\log n+m^{4/3}\log^αm\log n)$ time, where $α<1.78$ is a constant.
We likewise study the problem of computing the expected geodesic distance between two points chosen independently and uniformly at random in a simple polygon $P$. We show how the expected $L_1$-distance can be computed in optimal $O(n)$ time by a conceptually very simple algorithm. We then describe an algorithm that outputs a closed-form expression for the expected $L_2$-distance in $O(n^2)$ time.
△ Less
Submitted 29 October, 2022; v1 submitted 15 August, 2022;
originally announced August 2022.
-
Near-Optimal Distance Oracles for Vertex-Labeled Planar Graphs
Authors:
Jacob Evald,
Viktor Fredslund-Hansen,
Christian Wulff-Nilsen
Abstract:
Given an undirected $n$-vertex planar graph $G=(V,E,ω)$ with non-negative edge weight function $ω:E\rightarrow \mathbb R$ and given an assigned label to each vertex, a vertex-labeled distance oracle is a data structure which for any query consisting of a vertex $u$ and a label $λ$ reports the shortest path distance from $u$ to the nearest vertex with label $λ$. We show that if there is a distance…
▽ More
Given an undirected $n$-vertex planar graph $G=(V,E,ω)$ with non-negative edge weight function $ω:E\rightarrow \mathbb R$ and given an assigned label to each vertex, a vertex-labeled distance oracle is a data structure which for any query consisting of a vertex $u$ and a label $λ$ reports the shortest path distance from $u$ to the nearest vertex with label $λ$. We show that if there is a distance oracle for undirected $n$-vertex planar graphs with non-negative edge weights using $s(n)$ space and with query time $q(n)$, then there is a vertex-labeled distance oracle with $\tilde{O}(s(n))$ space and $\tilde{O}(q(n))$ query time. Using the state-of-the-art distance oracle of Long and Pettie, our construction produces a vertex-labeled distance oracle using $n^{1+o(1)}$ space and query time $\tilde O(1)$ at one extreme, $\tilde O(n)$ space and $n^{o(1)}$ query time at the other extreme, as well as such oracles for the full tradeoff between space and query time obtained in their paper. This is the first non-trivial exact vertex-labeled distance oracle for planar graphs and, to our knowledge, for any interesting graph class other than trees.
△ Less
Submitted 30 September, 2021;
originally announced October 2021.
-
Decremental APSP in Directed Graphs Versus an Adaptive Adversary
Authors:
Jacob Evald,
Viktor Fredslund-Hansen,
Maximilian Probst Gutenberg,
Christian Wulff-Nilsen
Abstract:
Given a directed graph $G = (V,E)$, undergoing an online sequence of edge deletions with $m$ edges in the initial version of $G$ and $n = |V|$, we consider the problem of maintaining all-pairs shortest paths (APSP) in $G$.
Whilst this problem has been studied in a long line of research [ACM'81, FOCS'99, FOCS'01, STOC'02, STOC'03, SWAT'04, STOC'13] and the problem of $(1+ε)$-approximate, weighted…
▽ More
Given a directed graph $G = (V,E)$, undergoing an online sequence of edge deletions with $m$ edges in the initial version of $G$ and $n = |V|$, we consider the problem of maintaining all-pairs shortest paths (APSP) in $G$.
Whilst this problem has been studied in a long line of research [ACM'81, FOCS'99, FOCS'01, STOC'02, STOC'03, SWAT'04, STOC'13] and the problem of $(1+ε)$-approximate, weighted APSP was solved to near-optimal update time $\tilde{O}(mn)$ by Bernstein [STOC'13], the problem has mainly been studied in the context of oblivious adversaries, which assumes that the adversary fixes the update sequence before the algorithm is started.
In this paper, we make significant progress on the problem in the setting where the adversary is adaptive, i.e. can base the update sequence on the output of the data structure queries. We present three new data structures that fit different settings:
We first present a deterministic data structure that maintains exact distances with total update time $\tilde{O}(n^3)$.
We also present a deterministic data structure that maintains $(1+ε)$-approximate distance estimates with total update time $\tilde O(\sqrt{m} n^2/ε)$ which for sparse graphs is $\tilde O(n^{2+1/2}/ε)$.
Finally, we present a randomized $(1+ε)$-approximate data structure which works against an adaptive adversary; its total update time is $\tilde O(m^{2/3}n^{5/3} + n^{8/3}/(m^{1/3}ε^2))$ which for sparse graphs is $\tilde O(n^{2+1/3})$.
Our exact data structure matches the total update time of the best randomized data structure by Baswana et al. [STOC'02] and maintains the distance matrix in near-optimal time. Our approximate data structures improve upon the best data structures against an adaptive adversary which have $\tilde{O}(mn^2)$ total update time [JACM'81, STOC'03].
△ Less
Submitted 2 October, 2020;
originally announced October 2020.
-
Truly Subquadratic Exact Distance Oracles with Constant Query Time for Planar Graphs
Authors:
Viktor Fredslund-Hansen,
Shay Mozes,
Christian Wulff-Nilsen
Abstract:
Given an undirected, unweighted planar graph $G$ with $n$ vertices, we present a truly subquadratic size distance oracle for reporting exact shortest-path distances between any pair of vertices of $G$ in constant time. For any $\varepsilon > 0$, our distance oracle takes up $O(n^{5/3+\varepsilon})$ space and is capable of answering shortest-path distance queries exactly for any pair of vertices of…
▽ More
Given an undirected, unweighted planar graph $G$ with $n$ vertices, we present a truly subquadratic size distance oracle for reporting exact shortest-path distances between any pair of vertices of $G$ in constant time. For any $\varepsilon > 0$, our distance oracle takes up $O(n^{5/3+\varepsilon})$ space and is capable of answering shortest-path distance queries exactly for any pair of vertices of $G$ in worst-case time $O(\log (1/\varepsilon))$. Previously no truly sub-quadratic size distance oracles with constant query time for answering exact all-pairs shortest paths distance queries existed.
△ Less
Submitted 30 September, 2020;
originally announced September 2020.