Searcharxiv⌕ Search

arXiv subjects

Yakov Nekrich

Publications and source records attributed to Yakov Nekrich.

53 records · Page 3Linked to original sources

Space-Efficient Data-Analysis Queries on Grids

We consider various data-analysis queries on two-dimensional points. We give new space/time tradeoffs over previous work on geometric queries such as dominance and rectangle visibility, and on semigroup and group queries such as sum, average, variance, minimum and maximum. We also introduce new solutions to queries less frequently considered in the literature such as two-dimensional quantiles, majorities, successor/predecessor, mode, and various top-$k$ queries, considering static and dynamic scenarios.

cs.DS↗

Cross-Document Pattern Matching

We study a new variant of the string matching problem called cross-document string matching, which is the problem of indexing a collection of documents to support an efficient search for a pattern in a selected document, where the pattern itself is a substring of another document. Several variants of this problem are considered, and efficient linear-space solutions are proposed with query time bounds that either do not depend at all on the pattern size or depend on it in a very limited way (doubly logarithmic). As a side result, we propose an improved solution to the weighted level ancestor problem.

cs.DS↗

A Compressed Self-Index for Genomic Databases

Advances in DNA sequencing technology will soon result in databases of thousands of genomes. Within a species, individuals' genomes are almost exact copies of each other; e.g., any two human genomes are 99.9% the same. Relative Lempel-Ziv (RLZ) compression takes advantage of this property: it stores the first genome uncompressed or as an FM-index, then compresses the other genomes with a variant of LZ77 that copies phrases only from the first genome. RLZ achieves good compression and supports fast random access; in this paper we show how to support fast search as well, thus obtaining an efficient compressed self-index.

cs.DS↗

A Dynamic Stabbing-Max Data Structure with Sub-Logarithmic Query Time

In this paper we describe a dynamic data structure that answers one-dimensional stabbing-max queries in optimal $O(\log n/\log\log n)$ time. Our data structure uses linear space and supports insertions and deletions in $O(\log n)$ and $O(\log n/\log \log n)$ amortized time respectively. We also describe a $O(n(\log n/\log\log n)^{d-1})$ space data structure that answers $d$-dimensional stabbing-max queries in $O((\log n/\log\log n)^{d})$ time. Insertions and deletions are supported in $O((\log n/\log\log n)^d\log\log n)$ and $O((\log n/\log\log n)^d)$ amortized time respectively.

cs.DS↗

External Memory Orthogonal Range Reporting with Fast Updates

In this paper we describe data structures for orthogonal range reporting in external memory that support fast update operations. The query costs either match the query costs of the best previously known data structures or differ by a small multiplicative factor.

cs.DS↗

A Fast Algorithm for Three-Dimensional Layers of Maxima Problem

We show that the three-dimensional layers-of-maxima problem can be solved in $o(n\log n)$ time in the word RAM model. Our algorithm runs in $O(n(\log \log n)^3)$ deterministic time or $O(n(\log\log n)^2)$ expected time and uses O(n) space. We also describe an algorithm that uses optimal O(n) space and solves the three-dimensional layers-of-maxima problem in $O(n\log n)$ time in the pointer machine model.

cs.DS↗

Top-K Color Queries for Document Retrieval

In this paper we describe a new efficient (in fact optimal) data structure for the {\em top-$K$ color problem}. Each element of an array $A$ is assigned a color $c$ with priority $p(c)$. For a query range $[a,b]$ and a value $K$, we have to report $K$ colors with the highest priorities among all colors that occur in $A[a..b]$, sorted in reverse order by their priorities. We show that such queries can be answered in $O(K)$ time using an $O(N\log σ)$ bits data structure, where $N$ is the number of elements in the array and $σ$ is the number of colors. Thus our data structure is asymptotically optimal with respect to the worst-case query time and space. As an immediate application of our results, we obtain optimal time solutions for several document retrieval problems. The method of the paper could be also of independent interest.

cs.DS↗

Searching in Dynamic Catalogs on a Tree

In this paper we consider the following modification of the iterative search problem. We are given a tree $T$, so that a dynamic catalog $C(v)$ is associated with every tree node $v$. For any $x$ and for any node-to-root path $π$ in $T$, we must find the predecessor of $x$ in $\cup_{v\in π} C(v)$. We present a linear space dynamic data structure that supports such queries in $O(t(n)+|π|)$ time, where $t(n)$ is the time needed to search in one catalog and $|π|$ denotes the number of nodes on path $π$. We also consider the reporting variant of this problem, in which for any $x_1$, $x_2$ and for any path $π'$ all elements of $\cup_{v\in π'} (C(v)\cap [x_1,x_2])$ must be reported; here $π'$ denotes a path between an arbitrary node $v_0$ and its ancestor $v_1$. We show that such queries can be answered in $O(t(n)+|π'|+ k)$ time, where $k$ is the number of elements in the answer. To illustrate applications of our technique, we describe the first dynamic data structures for the stabbing-max problem, the horizontal point location problem, and the orthogonal line-segment intersection problem with optimal $O(\log n/\log \log n)$ query time and poly-logarithmic update time.

cs.DS↗

Dynamic Range Reporting in External Memory

In this paper we describe a dynamic external memory data structure that supports range reporting queries in three dimensions in $O(\log_B^2 N + \frac{k}{B})$ I/O operations, where $k$ is the number of points in the answer and $B$ is the block size. This is the first dynamic data structure that answers three-dimensional range reporting queries in $\log_B^{O(1)} N + O(\frac{k}{B})$ I/Os.

cs.DS↗

Range Reporting for Moving Points on a Grid

In this paper we describe a new data structure that supports orthogonal range reporting queries on a set of points that move along linear trajectories on a $U\times U$ grid. The assumption that points lie on a $U\times U$ grid enables us to significantly decrease the query time in comparison to the standard kinetic model. Our data structure answers queries in $O(\sqrt{\log U/\log \log U}+k)$ time, where $k$ denotes the number of points in the answer. The above improves over the $Ω(\log n)$ lower bound that is valid in the infinite-precision kinetic model. The methods used in this paper could be also of independent interest.

cs.DS↗

Data Structures for Approximate Range Counting

We present new data structures for approximately counting the number of points in orthogonal range. There is a deterministic linear space data structure that supports updates in O(1) time and approximates the number of elements in a 1-D range up to an additive term $k^{1/c}$ in $O(\log \log U\cdot\log \log n)$ time, where $k$ is the number of elements in the answer, $U$ is the size of the universe and $c$ is an arbitrary fixed constant. We can estimate the number of points in a two-dimensional orthogonal range up to an additive term $ k^ρ$ in $O(\log \log U+ (1/ρ)\log\log n)$ time for any $ρ>0$. We can estimate the number of points in a three-dimensional orthogonal range up to an additive term $k^ρ$ in $O(\log \log U + (\log\log n)^3+ (3^v)\log\log n)$ time for $v=\log \frac{1}ρ/\log {3/2}+2$.

cs.DS↗

Tight Bounds for Online Stable Sorting

Although many authors have considered how many ternary comparisons it takes to sort a multiset $S$ of size $n$, the best known upper and lower bounds still differ by a term linear in $n$. In this paper we restrict our attention to online stable sorting and prove upper and lower bounds that are within (o (n)) not only of each other but also of the best known upper bound for offline sorting. Specifically, we first prove that if the number of distinct elements (σ= o (n / \log n)), then ((H + 1) n + o (n)) comparisons are sufficient, where $H$ is the entropy of the distribution of the elements in $S$. We then give a simple proof that ((H + 1) n - o (n)) comparisons are necessary in the worst case.

cs.DS↗

Fast and Compact Prefix Codes

It is well-known that, given a probability distribution over $n$ characters, in the worst case it takes (Θ(n \log n)) bits to store a prefix code with minimum expected codeword length. However, in this paper we first show that, for any $0<ε<1/2$ with (1 / ε= \Oh{\polylog{n}}), it takes $\Oh{n \log \log (1 / ε)}$ bits to store a prefix code with expected codeword length within $ε$ of the minimum. We then show that, for any constant (c > 1), it takes $\Oh{n^{1 / c} \log n}$ bits to store a prefix code with expected codeword length at most $c$ times the minimum. In both cases, our data structures allow us to encode and decode any character in $\Oh{1}$ time.

cs.DS↗

Space Efficient Multi-Dimensional Range Reporting

We present a data structure that supports three-dimensional range reporting queries in $O(\log \log U + (\log \log n)^3+k)$ time and uses $O(n\log^{1+\eps} n)$ space, where $U$ is the size of the universe, $k$ is the number of points in the answer,and $\eps$ is an arbitrary constant. This result improves over the data structure of Alstrup, Brodal, and Rauhe (FOCS 2000) that uses $O(n\log^{1+\eps} n)$ space and supports queries in $O(\log n+k)$ time,the data structure of Nekrich (SoCG'07) that uses $O(n\log^{3} n)$ space and supports queries in $O(\log \log U + (\log \log n)^2 + k)$ time, and the data structure of Afshani (ESA'08) that uses $O(n\log^{3} n)$ space and also supports queries in $O(\log \log U + (\log \log n)^2 + k)$ time but relies on randomization during the preprocessing stage. Our result allows us to significantly reduce the space usage of the fastest previously known static and incremental $d$-dimensional data structures, $d\geq 3$, at a cost of increasing the query time by a negligible $O(\log \log n)$ factor.

cs.DS↗

Worst-Case Optimal Adaptive Prefix Coding

A common complaint about adaptive prefix coding is that it is much slower than static prefix coding. Karpinski and Nekrich recently took an important step towards resolving this: they gave an adaptive Shannon coding algorithm that encodes each character in (O (1)) amortized time and decodes it in (O (\log H)) amortized time, where $H$ is the empirical entropy of the input string $s$. For comparison, Gagie's adaptive Shannon coder and both Knuth's and Vitter's adaptive Huffman coders all use (Θ(H)) amortized time for each character. In this paper we give an adaptive Shannon coder that both encodes and decodes each character in (O (1)) worst-case time. As with both previous adaptive Shannon coders, we store $s$ in at most ((H + 1) |s| + o (|s|)) bits. We also show that this encoding length is worst-case optimal up to the lower order term.

cs.IT↗

Low-Memory Adaptive Prefix Coding

In this paper we study the adaptive prefix coding problem in cases where the size of the input alphabet is large. We present an online prefix coding algorithm that uses $O(σ^{1 / λ+ ε}) $ bits of space for any constants $\eps>0$, $λ>1$, and encodes the string of symbols in $O(\log \log σ)$ time per symbol \emph{in the worst case}, where $σ$ is the size of the alphabet. The upper bound on the encoding length is $λn H (s) +(λ\ln 2 + 2 + ε) n + O (σ^{1 / λ} \log^2 σ)$ bits.

cs.DS↗

Searching for Frequent Colors in Rectangles

We study a new variant of colored orthogonal range searching problem: given a query rectangle $Q$ all colors $c$, such that at least a fraction $τ$ of all points in $Q$ are of color $c$, must be reported. We describe several data structures for that problem that use pseudo-linear space and answer queries in poly-logarithmic time.

cs.DS↗