31 research outputs found
Algorithms for the Problems of Length-Constrained Heaviest Segments
We present algorithms for length-constrained maximum sum segment and maximum
density segment problems, in particular, and the problem of finding
length-constrained heaviest segments, in general, for a sequence of real
numbers. Given a sequence of n real numbers and two real parameters L and U (L
<= U), the maximum sum segment problem is to find a consecutive subsequence,
called a segment, of length at least L and at most U such that the sum of the
numbers in the subsequence is maximum. The maximum density segment problem is
to find a segment of length at least L and at most U such that the density of
the numbers in the subsequence is the maximum. For the first problem with
non-uniform width there is an algorithm with time and space complexities in
O(n). We present an algorithm with time complexity in O(n) and space complexity
in O(U). For the second problem with non-uniform width there is a combinatorial
solution with time complexity in O(n) and space complexity in O(U). We present
a simple geometric algorithm with the same time and space complexities.
We extend our algorithms to respectively solve the length-constrained k
maximum sum segments problem in O(n+k) time and O(max{U, k}) space, and the
length-constrained maximum density segments problem in O(n min{k, U-L})
time and O(U+k) space. We present extensions of our algorithms to find all the
length-constrained segments having user specified sum and density in O(n+m) and
O(nlog (U-L)+m) times respectively, where m is the number of output.
Previously, there was no known algorithm with non-trivial result for these
problems. We indicate the extensions of our algorithms to higher dimensions.
All the algorithms can be extended in a straight forward way to solve the
problems with non-uniform width and non-uniform weight.Comment: 21 pages, 12 figure
Computing Minimum Complexity 1D Curve Simplifications under the Fréchet Distance
We consider the problem of simplifying curves under the Fréchet distance. Let P be a curve and ε ≥ 0 be a distance threshold. An ε-simplification is a curve within Fréchet distance ε of P . We consider ε-simplifications of minimum complexity (i.e. minimum number of vertices). Parameterized by ε, we define a continuous family of minimum complexity ε-simplifications P ε of a curve P inone dimension. We present a data structure that after linear preprocessing time can report the ε-simplification in linear output-sensitive time. Moreover, for k ≥ 1, we show how this data structure can be used to report a simplification P ε with at most k vertices that is closest to P in O(k) time
A Sidetrack-Based Algorithm for Finding the k Shortest Simple Paths in a Directed Graph
We present an algorithm for the k shortest simple path problem on weighted
directed graphs (kSSP) that is based on Eppstein's algorithm for a similar
problem in which paths are allowed to contain cycles. In contrast to most other
algorithms for kSSP, ours is not based on Yen's algorithm and does not solve
replacement path problems. Its worst-case running time is on par with
state-of-the-art algorithms for kSSP. Using our algorithm, one may find O(m)
simple paths with a single shortest path tree computation and O(n + m)
additional time per path in well-behaved cases, where n is the number of nodes
and m is the number of edges. Our computational results show that on random
graphs and large road networks, these well-behaved cases are quite common and
our algorithm is faster than existing algorithms by an order of magnitude.
Further, the running time is far better predictable due to very small
dispersion
A Dynamic I/O-Efficient Structure for One-Dimensional Top-k Range Reporting
We present a structure in external memory for "top-k range reporting", which
uses linear space, answers a query in O(lg_B n + k/B) I/Os, and supports an
update in O(lg_B n) amortized I/Os, where n is the input size, and B is the
block size. This improves the state of the art which incurs O(lg^2_B n)
amortized I/Os per update.Comment: In PODS'1
Encoding Two-Dimensional Range Top-k Queries
We consider various encodings that support range top-k queries on a two-dimensional array containing elements from a total order. For an m x n array, we first propose an almost optimal encoding for answering one-sided top-k queries, whose query range is restricted to [1 ... m][1 .. a], for 1 <= a <= n. Next, we propose an encoding for the general top-k queries that takes m^2 * lg(binom((k+1)n)(n)) + m * lg(m) + o(n) bits. This generalizes the one-dimensional top-k encoding of Gawrychowski and Nicholson [ICALP, 2015]. Finally, for a 2 x n array, we obtain a 2 lg(binom(3n)(n)) + 3n + o(n)-bit encoding for answering top-2 queries
External Memory Three-Sided Range Reporting and Top-k Queries with Sublogarithmic Updates
An external memory data structure is presented for maintaining a dynamic set of N two-dimensional points under the insertion and deletion of points, and supporting unsorted 3-sided range reporting queries and top-k queries, where top-k queries report the k points with highest y-value within a given x-range. For any constant 0 < epsilon <= 1/2, a data structure is constructed that supports updates in amortized O(1/(epsilon * B^{1-epsilon}) * log_B(N)) IOs and queries in amortized O(1/epsilon * log_B(N+K/B)) IOs, where B is the external memory block size, and K is the size of the output to the query (for top-k queries K is the minimum of k and the number of points in the query interval). The data structure uses linear space. The update bound is a significant factor B^{1-epsilon} improvement over the previous best update bounds for these two query problems, while staying within the same query and space bounds