-
Sublinear Average-Case Shortest Paths in Weighted Unit-Disk Graphs
Authors:
Adam Karczmarz,
Jakub Pawlewicz,
Piotr Sankowski
Abstract:
We consider the problem of computing shortest paths in weighted unit-disk graphs in constant dimension $d$. Although the single-source and all-pairs variants of this problem are well-studied in the plane case, no non-trivial exact distance oracles for unit-disk graphs have been known to date, even for $d=2$.
The classical result of Sedgewick and Vitter [Algorithmica '86] shows that for weighted…
▽ More
We consider the problem of computing shortest paths in weighted unit-disk graphs in constant dimension $d$. Although the single-source and all-pairs variants of this problem are well-studied in the plane case, no non-trivial exact distance oracles for unit-disk graphs have been known to date, even for $d=2$.
The classical result of Sedgewick and Vitter [Algorithmica '86] shows that for weighted unit-disk graphs in the plane the $A^*$ search has average-case performance superior to that of a standard shortest path algorithm, e.g., Dijkstra's algorithm. Specifically, if the $n$ corresponding points of a weighted unit-disk graph $G$ are picked from a unit square uniformly at random, and the connectivity radius is $r\in (0,1)$, $A^*$ finds a shortest path in $G$ in $O(n)$ expected time when $r=Ω(\sqrt{\log n/n})$, even though $G$ has $Θ((nr)^2)$ edges in expectation. In other words, the work done by the algorithm is in expectation proportional to the number of vertices and not the number of edges.
In this paper, we break this natural barrier and show even stronger sublinear time results. We propose a new heuristic approach to computing point-to-point exact shortest paths in unit-disk graphs. We analyze the average-case behavior of our heuristic using the same random graph model as used by Sedgewick and Vitter and prove it superior to $A^*$. Specifically, we show that, if we are able to report the set of all $k$ points of $G$ from an arbitrary rectangular region of the plane in $O(k + t(n))$ time, then a shortest path between arbitrary two points of such a random graph on the plane can be found in $O(1/r^2 + t(n))$ expected time. In particular, the state-of-the-art range reporting data structures imply a sublinear expected bound for all $r=Ω(\sqrt{\log n/n})$ and $O(\sqrt{n})$ expected bound for $r=Ω(n^{-1/4})$ after only near-linear preprocessing of the point set.
△ Less
Submitted 17 March, 2021;
originally announced March 2021.
-
A Faster Exponential Time Algorithm for Bin Packing With a Constant Number of Bins via Additive Combinatorics
Authors:
Jesper Nederlof,
Jakub Pawlewicz,
Céline M. F. Swennenhuis,
Karol Węgrzycki
Abstract:
In the Bin Packing problem one is given $n$ items with weights $w_1,\ldots,w_n$ and $m$ bins with capacities $c_1,\ldots,c_m$. The goal is to find a partition of the items into sets $S_1,\ldots,S_m$ such that $w(S_j) \leq c_j$ for every bin $j$, where $w(X)$ denotes $\sum_{i \in X}w_i$. Björklund, Husfeldt and Koivisto (SICOMP 2009) presented an $\mathcal{O}^\star(2^n)$ time algorithm for Bin Pack…
▽ More
In the Bin Packing problem one is given $n$ items with weights $w_1,\ldots,w_n$ and $m$ bins with capacities $c_1,\ldots,c_m$. The goal is to find a partition of the items into sets $S_1,\ldots,S_m$ such that $w(S_j) \leq c_j$ for every bin $j$, where $w(X)$ denotes $\sum_{i \in X}w_i$. Björklund, Husfeldt and Koivisto (SICOMP 2009) presented an $\mathcal{O}^\star(2^n)$ time algorithm for Bin Packing. In this paper, we show that for every $m \in \mathbf{N}$ there exists a constant $σ_m >0$ such that an instance of Bin Packing with $m$ bins can be solved in $\mathcal{O}(2^{(1-σ_m)n})$ randomized time. Before our work, such improved algorithms were not known even for $m$ equals $4$. A key step in our approach is the following new result in Littlewood-Offord theory on the additive combinatorics of subset sums: For every $δ>0$ there exists an $\varepsilon >0$ such that if $|\{ X\subseteq \{1,\ldots,n \} : w(X)=v \}| \geq 2^{(1-\varepsilon)n}$ for some $v$ then $|\{ w(X): X \subseteq \{1,\ldots,n\} \}|\leq 2^{δn}$.
△ Less
Submitted 8 September, 2023; v1 submitted 16 July, 2020;
originally announced July 2020.
-
Equal-Subset-Sum Faster Than the Meet-in-the-Middle
Authors:
Marcin Mucha,
Jesper Nederlof,
Jakub Pawlewicz,
Karol Węgrzycki
Abstract:
In the Equal-Subset-Sum problem, we are given a set $S$ of $n$ integers and the problem is to decide if there exist two disjoint nonempty subsets $A,B \subseteq S$, whose elements sum up to the same value. The problem is NP-complete. The state-of-the-art algorithm runs in $O^{*}(3^{n/2}) \le O^{*}(1.7321^n)$ time and is based on the meet-in-the-middle technique. In this paper, we improve upon this…
▽ More
In the Equal-Subset-Sum problem, we are given a set $S$ of $n$ integers and the problem is to decide if there exist two disjoint nonempty subsets $A,B \subseteq S$, whose elements sum up to the same value. The problem is NP-complete. The state-of-the-art algorithm runs in $O^{*}(3^{n/2}) \le O^{*}(1.7321^n)$ time and is based on the meet-in-the-middle technique. In this paper, we improve upon this algorithm and give $O^{*}(1.7088^n)$ worst case Monte Carlo algorithm. This answers the open problem from Woeginger's inspirational survey.
Additionally, we analyse the polynomial space algorithm for Equal-Subset-Sum. A naive polynomial space algorithm for Equal-Subset-Sum runs in $O^{*}(3^n)$ time. With read-only access to the exponentially many random bits, we show a randomized algorithm running in $O^{*}(2.6817^n)$ time and polynomial space.
△ Less
Submitted 3 July, 2019; v1 submitted 7 May, 2019;
originally announced May 2019.
-
Counting Square-Free Numbers
Authors:
Jakub Pawlewicz
Abstract:
The main topic of this contribution is the problem of counting square-free numbers not exceeding $n$. Before this work we were able to do it in time (Comparing to the Big-O notation, Soft-O ($\softO$) ignores logarithmic factors) $\softO(\sqrt{n})$. Here, the algorithm with time complexity $\softO(n^{2/5})$ and with memory complexity $\softO(n^{1/5})$ is presented. Additionally, a parallel version…
▽ More
The main topic of this contribution is the problem of counting square-free numbers not exceeding $n$. Before this work we were able to do it in time (Comparing to the Big-O notation, Soft-O ($\softO$) ignores logarithmic factors) $\softO(\sqrt{n})$. Here, the algorithm with time complexity $\softO(n^{2/5})$ and with memory complexity $\softO(n^{1/5})$ is presented. Additionally, a parallel version is shown, which achieves full scalability.
As of now the highest computed value was for $n=10^{17}$. Using our implementation we were able to calculate the value for $n=10^{36}$ on a cluster.
△ Less
Submitted 25 July, 2011;
originally announced July 2011.