SearcharxivSearch

arXiv subjects

Peyman Afshani

Publications and source records attributed to Peyman Afshani.

At least 19 recordsLinked to original sources

The Impossibility of Simultaneous Time and I/O Optimality for The Planar Maxima and Convex Hull Problems

We prove that no deterministic output-sensitive algorithm for the planar convex hull and maxima problems can obtain both optimal time and I/O complexity, where the optimality is defined with respect to both the input and output sizes. This explains why the best previous algorithms achieved an optimal I/O bound at the cost of sub-optimal running time (Goodrich et al. [FOCS, 1993]). To the best of our knowledge, the impossibility of simultaneous optimality was only shown previously for the permutation problem by Brodal and Fagerberg [STOC, 2003]. Our results imply that no optimal deterministic output-sensitive cache-oblivious algorithm exists for either problem. In addition, we present simple deterministic algorithms that match our lower bounds and that provide a trade-off between time and I/Os. On the other hand, a simple modification of our deterministic algorithm results in a randomized algorithm that simultaneously achieves optimal (worst-case) time and optimal expected I/O bounds.

cs.DS

Compatible Triangulations of Simple Polygons

Let $P$ and $Q$ be simple polygons with $n$ vertices each. We wish to compute triangulations of $P$ and $Q$ that are combinatorially equivalent, if they exist. We consider two versions of the problem: if a triangulation of $P$ is given, we can decide in $O(n\log n + nr)$ time if $Q$ has a compatible triangulation, where $r$ is the number of reflex vertices of $Q$. If we are already given the correspondence between vertices of $P$ and $Q$ (but no triangulation), we can find compatible triangulations of $P$ and $Q$ in time $O(M(n))$, where $M(n)$ is the running time for multiplying two $n\times n$ matrices.

cs.CG

How many users have been here for a long time? Efficient solutions for counting long aggregated visits

This paper addresses the Counting Long Aggregated Visits problem, which is defined as follows. We are given $n$ users and $m$ regions, where each user spends some time visiting some regions. For a parameter $k$ and a query consisting of a subset of $r$ regions, the task is to count the number of distinct users whose aggregate time spent visiting the query regions is at least $k$. This problem is motivated by queries arising in the analysis of large-scale mobility datasets. We present several exact and approximate data structures for supporting counting long aggregated visits, as well as conditional and unconditional lower bounds. First, we describe an exact data structure that exhibits a space-time tradeoff, as well as efficient approximate solutions based on sampling and sketching techniques. We then study the problem in geometric settings where regions are points in $\mathbb{R}^d$ and queries are hyperrectangles, and derive exact data structures that achieve improved performance in these structured spaces.

cs.DS

Property Testing of Curve Similarity

We propose sublinear algorithms for probabilistic testing of the discrete and continuous Fréchet distance - a standard similarity measure for curves. We assume the algorithm is given access to the input curves via a query oracle: a query returns the set of vertices of the curve that lie within a radius $δ$ of a specified vertex of the other curve. The goal is to use a small number of queries to determine with constant probability whether the two curves are similar (i.e., their discrete Fréchet distance is at most $δ$) or they are ''$\varepsilon$-far'' (for $0 < \varepsilon < 2$) from being similar, i.e., more than an $\varepsilon$-fraction of the two curves must be ignored for them to become similar. We present two algorithms which are sublinear assuming that the curves are $t$-approximate shortest paths in the ambient metric space, for some $t\ll n$. The first algorithm uses $O(\frac{t}{\varepsilon}\log\frac{t}{\varepsilon})$ queries and is given the value of $t$ in advance. The second algorithm does not have explicit knowledge of the value of $t$ and therefore needs to gain implicit knowledge of the straightness of the input curves through its queries. We show that the discrete Fréchet distance can still be tested using roughly $O(\frac{t^3+t^2\log n}{\varepsilon})$ queries ignoring logarithmic factors in $t$. Our algorithms work in a matrix representation of the input and may be of independent interest to matrix testing. Our algorithms use a mild uniform sampling condition that constrains the edge lengths of the curves, similar to a polynomially bounded aspect ratio. Applied to testing the continuous Fréchet distance of $t$-straight curves, our algorithms can be used for $(1+\varepsilon')$-approximate testing using essentially the same bounds as stated above with an additional factor of poly$(\frac{1}{\varepsilon'})$.

cs.CG

Convexity Helps Iterated Search in 3D

Inspired by the classical fractional cascading technique, we introduce new techniques to speed up the following type of iterated search in 3D: The input is a graph $\mathbf{G}$ with bounded degree together with a set $H_v$ of 3D hyperplanes associated with every vertex of $v$ of $\mathbf{G}$. The goal is to store the input such that given a query point $q\in \mathbb{R}^3$ and a connected subgraph $\mathbf{H}\subset \mathbf{G}$, we can decide if $q$ is below or above the lower envelope of $H_v$ for every $v\in \mathbf{H}$. We show that using linear space, it is possible to answer queries in roughly $O(\log n + |\mathbf{H}|\sqrt{\log n})$ time which improves trivial bound of $O(|\mathbf{H}|\log n)$ obtained by using planar point location data structures. Our data structure can in fact answer more general queries (it combines with shallow cuttings) and it even works when $\mathbf{H}$ is given one vertex at a time. We show that this has a number of new applications and in particular, we give improved solutions to a set of natural data structure problems that up to our knowledge had not seen any improvements. We believe this is a very surprising result because obtaining similar results for the planar point location problem was known to be impossible.

cs.CG

On Range Summary Queries

We study the query version of the approximate heavy hitter and quantile problems. In the former problem, the input is a parameter $\varepsilon$ and a set $P$ of $n$ points in $\mathbb{R}^d$ where each point is assigned a color from a set $C$, and we want to build a structure s.t. given any geometric range $γ$, we can efficiently find a list of approximate heavy hitters in $γ\cap P$, i.e., colors that appear at least $\varepsilon |γ\cap P|$ times in $γ\cap P$, as well as their frequencies with an additive error of $\varepsilon |γ\cap P|$. In the latter problem, each point is assigned a weight from a totally ordered universe and the query must output a sequence $S$ of $1+1/\varepsilon$ weights s.t. the $i$-th weight in $S$ has approximate rank $i\varepsilon|γ\cap P|$, meaning, rank $i\varepsilon|γ\cap P|$ up to an additive error of $\varepsilon|γ\cap P|$. Previously, optimal results were only known in 1D [WY11] but a few sub-optimal methods were available in higher dimensions [AW17, ACH+12]. We study the problems for 3D halfspace and dominance queries. We consider the real RAM model with integer registers of size $w=Θ(\log n)$ bits. For dominance queries, we show optimal solutions for both heavy hitter and quantile problems: using linear space, we can answer both queries in time $O(\log n + 1/\varepsilon)$. Note that as the output size is $\frac{1}{\varepsilon}$, after investing the initial $O(\log n)$ searching time, our structure takes on average $O(1)$ time to find a heavy hitter or a quantile! For more general halfspace heavy hitter queries, the same optimal query time can be achieved by increasing the space by an extra $\log_w\frac{1}{\varepsilon}$ (resp. $\log\log_w\frac{1}{\varepsilon}$) factor in 3D (resp. 2D). By spending extra $\log^{O(1)}\frac{1}{\varepsilon}$ factors in time and space, we can also support quantile queries.

cs.CG

Lower Bounds for Intersection Reporting among Flat Objects

Recently, Ezra and Sharir [ES22a] showed an $O(n^{3/2+σ})$ space and $O(n^{1/2+σ})$ query time data structure for ray shooting among triangles in $\mathbb{R}^3$. This improves the upper bound given by the classical $S(n)Q(n)^4=O(n^{4+σ})$ space-time tradeoff for the first time in almost 25 years and in fact lies on the tradeoff curve of $S(n)Q(n)^3=O(n^{3+σ})$. However, it seems difficult to apply their techniques beyond this specific space and time combination. This pheonomenon appears persistently in almost all recent advances of flat object intersection searching, e.g., line-tetrahedron intersection in $\mathbb{R}^4$ [ES22b], triangle-triangle intersection in $\mathbb{R}^4$ [ES22b], or even among flat semialgebraic objects [AAEKS22]. We give a timely explanation to this phenomenon from a lower bound perspective. We prove that given a set $\mathcal{S}$ of $(d-1)$-dimensional simplicies in $\mathbb{R}^d$, any data structure that can report all intersections with small ($n^{o(1)}$) query time must use $Ω(n^{2(d-1)-o(1)})$ space. This dashes the hope of any significant improvement to the tradeoff curves for small query time and almost matches the classical upper bound. We also obtain an almost matching space lower bound of $Ω(n^{6-o(1)})$ for triangle-triangle intersection reporting in $\mathbb{R}^4$ when the query time is small. Along the way, we further develop the previous lower bound techniques by Afshani and Cheng [AC21, AC22].

cs.CG

An Optimal Lower Bound for Simplex Range Reporting

We give a simplified and improved lower bound for the simplex range reporting problem. We show that given a set $P$ of $n$ points in $\mathbb{R}^d$, any data structure that uses $S(n)$ space to answer such queries must have $Q(n)=Ω((n^2/S(n))^{(d-1)/d}+k)$ query time, where $k$ is the output size. For near-linear space data structures, i.e., $S(n)=O(n\log^{O(1)}n)$, this improves the previous lower bounds by Chazelle and Rosenberg [CR96] and Afshani [A12] but perhaps more importantly, it is the first ever tight lower bound for any variant of simplex range searching for $d\ge 3$ dimensions. We obtain our lower bound by making a simple connection to well-studied problems in incident geometry which allows us to use known constructions in the area. We observe that a small modification of a simple already existing construction can lead to our lower bound. We believe that our proof is accessible to a much wider audience, at least compared to the previous intricate probabilistic proofs based on measure arguments by Chazelle and Rosenberg [CR96] and Afshani [A12]. The lack of tight or almost-tight (up to polylogarithmic factor) lower bounds for near-linear space data structures is a major bottleneck in making progress on problems such as proving lower bounds for multilevel data structures. It is our hope that this new line of attack based on incidence geometry can lead to further progress in this area.

cs.CG

Hierarchical Categories in Colored Searching

In colored range counting (CRC), the input is a set of points where each point is assigned a ``color'' (or a ``category'') and the goal is to store them in a data structure such that the number of distinct categories inside a given query range can be counted efficiently. CRC has strong motivations as it allows data structure to deal with categorical data. However, colors (i.e., the categories) in the CRC problem do not have any internal structure, whereas this is not the case for many datasets in practice where hierarchical categories exists or where a single input belongs to multiple categories. Motivated by these, we consider variants of the problem where such structures can be represented. We define two variants of the problem called hierarchical range counting (HCC) and sub-category colored range counting (SCRC) and consider hierarchical structures that can either be a DAG or a tree. We show that the two problems on some special trees are in fact equivalent to other well-known problems in the literature. Based on these, we also give efficient data structures when the underlying hierarchy can be represented as a tree. We show a conditional lower bound for the general case when the existing hierarchy can be any DAG, through reductions from the orthogonal vectors problem.

cs.DS

On Semialgebraic Range Reporting

In the problem of semialgebraic range searching, we are to preprocess a set of points in $\mathbb{R}^D$ such that the subset of points inside a semialgebraic region described by $O(1)$ polynomial inequalities of degree $Δ$ can be found efficiently. Relatively recently, several major advances were made on this problem. Using algebraic techniques, "near-linear space" structures [AMS13,MP15] with almost optimal query time of $Q(n)=O(n^{1-1/D+o(1)})$ were obtained. For "fast query" structures (i.e., when $Q(n)=n^{o(1)}$), it was conjectured that a structure with space $S(n) = O(n^{D+o(1)})$ is possible. The conjecture was refuted recently by Afshani and Cheng [AC21]. In the plane, they proved that $S(n) = Ω(n^{Δ+1 - o(1)}/Q(n)^{(Δ+3)Δ/2})$ which shows $Ω(n^{Δ+1-o(1)})$ space is needed for $Q(n) = n^{o(1)}$. While this refutes the conjecture, it still leaves a number of unresolved issues: the lower bound only works in 2D and for fast queries, and neither the exponent of $n$ or $Q(n)$ seem to be tight even for $D=2$, as the current upper bound is $S(n) = O(n^{\boldsymbol{m}+o(1)}/Q(n)^{(\boldsymbol{m}-1)D/(D-1)})$ where $\boldsymbol{m}=\binom{D+Δ}{D}-1 = Ω(Δ^D)$ is the maximum number of parameters to define a monic degree-$Δ$ $D$-variate polynomial, for any $D,Δ=O(1)$. In this paper, we resolve two of the issues: we prove a lower bound in $D$-dimensions and show that when $Q(n)=n^{o(1)}+O(k)$, $S(n)=Ω(n^{\boldsymbol{m}-o(1)})$, which is almost tight as far as the exponent of $n$ is considered in the pointer machine model. When considering the exponent of $Q(n)$, we show that the analysis in [AC21] is tight for $D=2$, by presenting matching upper bounds for uniform random point sets. This shows either the existing upper bounds can be improved or a new fundamentally different input set is needed to get a better lower bound.

cs.CG

On Cyclic Solutions to the Min-Max Latency Multi-Robot Patrolling Problem

We consider the following surveillance problem: Given a set $P$ of $n$ sites in a metric space and a set of $k$ robots with the same maximum speed, compute a patrol schedule of minimum latency for the robots. Here a patrol schedule specifies for each robot an infinite sequence of sites to visit (in the given order) and the latency $L$ of a schedule is the maximum latency of any site, where the latency of a site $s$ is the supremum of the lengths of the time intervals between consecutive visits to $s$. When $k=1$ the problem is equivalent to the travelling salesman problem (TSP) and thus it is NP-hard. We have two main results. We consider cyclic solutions in which the set of sites must be partitioned into $\ell$ groups, for some~$\ell \leq k$, and each group is assigned a subset of the robots that move along the travelling salesman tour of the group at equal distance from each other. Our first main result is that approximating the optimal latency of the class of cyclic solutions can be reduced to approximating the optimal travelling salesman tour on some input, with only a $1+\varepsilon$ factor loss in the approximation factor and an $O\left(\left( k/\varepsilon \right)^k\right)$ factor loss in the runtime, for any $\varepsilon >0$. Our second main result shows that an optimal cyclic solution is a $2(1-1/k)$-approximation of the overall optimal solution. Note that for $k=2$ this implies that an optimal cyclic solution is optimal overall. The results have a number of consequences. For the Euclidean version of the problem, for instance, combining our results with known results on Euclidean TSP, yields a PTAS for approximating an optimal cyclic solution, and it yields a $(2(1-1/k)+\varepsilon)$-approximation of the optimal unrestricted solution. If the conjecture mentioned above is true, then our algorithm is actually a PTAS for the general problem in the Euclidean setting.

cs.CG

Locality

The program performance on modern hardware is characterized by \emph{locality of reference}, that is, it is faster to access data that is close in address space to data that has been accessed recently than data in a random location. This is due to many architectural features including caches, prefetching, virtual address translation and the physical properties of a hard disk drive; attempting to model all the components that constitute the performance of a modern machine is impossible, especially for general algorithm design purposes. What if one could prove an algorithm is asymptotically optimal on all systems that reward locality of reference, no matter how it manifests itself within reasonable limits? We show that this is possible, and that excluding some pathological cases, cache-oblivious algorithms that are asymptotically optimal in the ideal-cache model are asymptotically optimal in any reasonable setting that rewards locality of reference. This is surprising as the cache-oblivious framework envisions a particular architectural model involving blocked memory transfer into a multi-level hierarchy of caches of varying sizes, and was not designed to directly model locality-of-reference correlated performance.

cs.DS

Lower Bounds for Semialgebraic Range Searching and Stabbing Problems

In the semialgebraic range searching problem, we are to preprocess $n$ points in $\mathbb{R}^d$ s.t. for any query range from a family of constant complexity semialgebraic sets, all the points intersecting the range can be reported or counted efficiently. When the ranges are composed of simplices, the problem can be solved using $S(n)$ space and with $Q(n)$ query time with $S(n)Q^d(n) = \tilde{O}(n^d)$ and this trade-off is almost tight. Consequently, there exists low space structures that use $\tilde{O}(n)$ space with $O(n^{1-1/d})$ query time and fast query structures that use $O(n^d)$ space with $O(\log^{d} n)$ query time. However, for the general semialgebraic ranges, only low space solutions are known, but the best solutions match the same trade-off curve as the simplex queries. It has been conjectured that the same could be done for the fast query case but this open problem has stayed unresolved. Here, we disprove this conjecture. We give the first nontrivial lower bounds for semilagebraic range searching and related problems. We show that any data structure for reporting the points between two concentric circles with $Q(n)$ query time must use $S(n)=Ω(n^{3-o(1)}/Q(n)^5)$ space, meaning, for $Q(n)=O(\log^{O(1)}n)$, $Ω(n^{3-o(1)})$ space must be used. We also study the problem of reporting the points between two polynomials of form $Y=\sum_{i=0}^Δa_i X^i$ where $a_0, \cdots, a_Δ$ are given at the query time. We show $S(n)=Ω(n^{Δ+1-o(1)}/Q(n)^{Δ^2+Δ})$. So for $Q(n)=O(\log^{O(1)}n)$, we must use $Ω(n^{Δ+1-o(1)})$ space. For the dual semialgebraic stabbing problems, we show that in linear space, any data structure that solves 2D ring stabbing must use $Ω(n^{2/3})$ query time. This almost matches the linearization upper bound. For general semialgebraic slab stabbing problems, again, we show an almost tight lower bounds.

cs.CG

2D Fractional Cascading on Axis-aligned Planar Subdivisions

Fractional cascading is one of the influential techniques in data structures, as it provides a general framework for solving the important iterative search problem. In the problem, the input is a graph $G$ with constant degree and a set of values for every vertex of $G$. The goal is to preprocess $G$ such that when given a query value $q$, and a connected subgraph $π$ of $G$, we can find the predecessor of $q$ in all the sets associated with the vertices of $π$. The fundamental result of fractional cascading is that there exists a data structure that uses linear space and it can answer queries in $O(\log n + |π|)$ time [Chazelle and Guibas, 1986]. While this technique has received plenty of attention in the past decades, an almost quadratic space lower bound for "2D fractional cascading" [Chazelle and Liu, 2001] has convinced the researchers that fractional cascading is fundamentally a 1D technique. In 2D fractional cascading, the input includes a planar subdivision for every vertex of $G$ and the query is a point $q$ and a subgraph $π$ and the goal is to locate the cell containing $q$ in all the subdivisions associated with the vertices of $π$. In this paper, we show that it is possible to circumvent the lower bound of Chazelle and Liu for axis-aligned planar subdivisions. We present a number of upper and lower bounds which reveal that in 2D, the problem has a much richer structure. When $G$ is a tree and $π$ is a path, then queries can be answered in $O(\log{n}+|π|+\min\{|π|\sqrt{\log{n}},α(n)\sqrt{|π|}\log{n}\})$ time using linear space where $α$ is an inverse Ackermann function; surprisingly, we show both branches of this bound are tight, up to the inverse Ackermann factor. When $G$ is a general graph or when $π$ is a general subgraph, then the query bound becomes $O(\log n + |π|\sqrt{\log n})$ and this bound is once again tight in both cases.

cs.CG

A Lower Bound for Dynamic Fractional Cascading

We investigate the limits of one of the fundamental ideas in data structures: fractional cascading. This is an important data structure technique to speed up repeated searches for the same key in multiple lists and it has numerous applications. Specifically, the input is a "catalog" graph, $G$, of constant degree together with a list of values assigned to every vertex of $G$. The goal is to preprocess the input such that given a connected subgraph $H$ of $G$ and a single query value $q$, one can find the predecessor of $q$ in every list that belongs to $\scat$. The classical result by Chazelle and Guibas shows that in a pointer machine, this can be done in the optimal time of $Ø(\log n + |\scat|)$ where $n$ is the total number of values. However, if insertion and deletion of values are allowed, then the query time slows down to $Ø(\log n + |\scat| \log\log n)$. If only insertions (or deletions) are allowed, then once again, an optimal query time can be obtained but by using amortization at update time. We prove a lower bound of $Ω( \log n \sqrt{\log\log n})$ on the worst-case query time of dynamic fractional cascading, when queries are paths of length $O(\log n)$. The lower bound applies both to fully dynamic data structures with amortized polylogarithmic update time and incremental data structures with polylogarithmic worst-case update time. As a side, this also roves that amortization is crucial for obtaining an optimal incremental data structure. This is the first non-trivial pointer machine lower bound for a dynamic data structure that breaks the $Ω(\log n)$ barrier. In order to obtain this result, we develop a number of new ideas and techniques that hopefully can be useful to obtain additional dynamic lower bounds in the pointer machine model.

cs.DS

Approximation Algorithms for Multi-Robot Patrol-Scheduling with Min-Max Latency

We consider the problem of finding patrol schedules for $k$ robots to visit a given set of $n$ sites in a metric space. Each robot has the same maximum speed and the goal is to minimize the weighted maximum latency of any site, where the latency of a site is defined as the maximum time duration between consecutive visits of that site. The problem is NP-hard, as it has the traveling salesman problem as a special case (when $k=1$ and all sites have the same weight). We present a polynomial-time algorithm with an approximation factor of $O(k^2 \log \frac{w_{\max}}{w_{\min}})$ to the optimal solution, where $w_{\max}$ and $w_{\min}$ are the maximum and minimum weight of the sites respectively. Further, we consider the special case where the sites are in 1D. When all sites have the same weight, we present a polynomial-time algorithm to solve the problem exactly. If the sites may have different weights, we present a $12$-approximate solution, which runs in polynomial time when the number of robots, $k$, is a constant.

cs.DS

Fragile Complexity of Comparison-Based Algorithms

We initiate a study of algorithms with a focus on the computational complexity of individual elements, and introduce the fragile complexity of comparison-based algorithms as the maximal number of comparisons any individual element takes part in. We give a number of upper and lower bounds on the fragile complexity for fundamental problems, including Minimum, Selection, Sorting and Heap Construction. The results include both deterministic and randomized upper and lower bounds, and demonstrate a separation between the two settings for a number of problems. The depth of a comparator network is a straight-forward upper bound on the worst case fragile complexity of the corresponding fragile algorithm. We prove that fragile complexity is a different and strictly easier property than the depth of comparator networks, in the sense that for some problems a fragile complexity equal to the best network depth can be achieved with less total work and that with randomization, even a lower fragile complexity is possible.

cs.DS

A New Lower Bound for Semigroup Orthogonal Range Searching

We report the first improvement in the space-time trade-off of lower bounds for the orthogonal range searching problem in the semigroup model, since Chazelle's result from 1990. This is one of the very fundamental problems in range searching with a long history. Previously, Andrew Yao's influential result had shown that the problem is already non-trivial in one dimension~\cite{Yao-1Dlb}: using $m$ units of space, the query time $Q(n)$ must be $Ω( α(m,n) + \frac{n}{m-n+1})$ where $α(\cdot,\cdot)$ is the inverse Ackermann's function, a very slowly growing function. In $d$ dimensions, Bernard Chazelle~\cite{Chazelle.LB.II} proved that the query time must be $Q(n) = Ω( (\log_βn)^{d-1})$ where $β= 2m/n$. Chazelle's lower bound is known to be tight for when space consumption is `high' i.e., $m = Ω(n \log^{d+\varepsilon}n)$. We have two main results. The first is a lower bound that shows Chazelle's lower bound was not tight for `low space': we prove that we must have $m (n) = Ω(n (\log n \log\log n)^{d-1})$. Our lower bound does not close the gap to the existing data structures, however, our second result is that our analysis is tight. Thus, we believe the gap is in fact natural since lower bounds are proven for idempotent semigroups while the data structures are built for general semigroups and thus they cannot assume (and use) the properties of an idempotent semigroup. As a result, we believe to close the gap one must study lower bounds for non-idempotent semigroups or building data structures for idempotent semigroups. We develope significantly new ideas for both of our results that could be useful in pursuing either of these directions.

cs.DS