73,500 research outputs found

    The Space Complexity of 2-Dimensional Approximate Range Counting

    Full text link
    We study the problem of 22-dimensional orthogonal range counting with additive error. Given a set PP of nn points drawn from an n×nn\times n grid and an error parameter \eps, the goal is to build a data structure, such that for any orthogonal range RR, it can return the number of points in PRP\cap R with additive error \eps n. A well-known solution for this problem is the {\em \eps-approximation}, which is a subset APA\subseteq P that can estimate the number of points in PRP\cap R with the number of points in ARA\cap R. It is known that an \eps-approximation of size O(\frac{1}{\eps} \log^{2.5} \frac{1}{\eps}) exists for any PP with respect to orthogonal ranges, and the best lower bound is \Omega(\frac{1}{\eps} \log \frac{1}{\eps}). The \eps-approximation is a rather restricted data structure, as we are not allowed to store any information other than the coordinates of the points in PP. In this paper, we explore what can be achieved without any restriction on the data structure. We first describe a simple data structure that uses O(\frac{1}{\eps}(\log^2\frac{1} {\eps} + \log n) ) bits and answers queries with error \eps n. We then prove a lower bound that any data structure that answers queries with error \eps n must use \Omega(\frac{1}{\eps}(\log^2\frac{1} {\eps} + \log n) ) bits. Our lower bound is information-theoretic: We show that there is a collection of 2Ω(nlogn)2^{\Omega(n\log n)} point sets with large {\em union combinatorial discrepancy}, and thus are hard to distinguish unless we use Ω(nlogn)\Omega(n\log n) bits.Comment: 19 pages, 5 figure

    Planar Visibility: Testing and Counting

    Full text link
    In this paper we consider query versions of visibility testing and visibility counting. Let SS be a set of nn disjoint line segments in R2\R^2 and let ss be an element of SS. Visibility testing is to preprocess SS so that we can quickly determine if ss is visible from a query point qq. Visibility counting involves preprocessing SS so that one can quickly estimate the number of segments in SS visible from a query point qq. We present several data structures for the two query problems. The structures build upon a result by O'Rourke and Suri (1984) who showed that the subset, VS(s)V_S(s), of R2\R^2 that is weakly visible from a segment ss can be represented as the union of a set, CS(s)C_S(s), of O(n2)O(n^2) triangles, even though the complexity of VS(s)V_S(s) can be Ω(n4)\Omega(n^4). We define a variant of their covering, give efficient output-sensitive algorithms for computing it, and prove additional properties needed to obtain approximation bounds. Some of our bounds rely on a new combinatorial result that relates the number of segments of SS visible from a point pp to the number of triangles in sSCS(s)\bigcup_{s\in S} C_S(s) that contain pp.Comment: 22 page

    Linear-Space Data Structures for Range Mode Query in Arrays

    Full text link
    A mode of a multiset SS is an element aSa \in S of maximum multiplicity; that is, aa occurs at least as frequently as any other element in SS. Given a list A[1:n]A[1:n] of nn items, we consider the problem of constructing a data structure that efficiently answers range mode queries on AA. Each query consists of an input pair of indices (i,j)(i, j) for which a mode of A[i:j]A[i:j] must be returned. We present an O(n22ϵ)O(n^{2-2\epsilon})-space static data structure that supports range mode queries in O(nϵ)O(n^\epsilon) time in the worst case, for any fixed ϵ[0,1/2]\epsilon \in [0,1/2]. When ϵ=1/2\epsilon = 1/2, this corresponds to the first linear-space data structure to guarantee O(n)O(\sqrt{n}) query time. We then describe three additional linear-space data structures that provide O(k)O(k), O(m)O(m), and O(ji)O(|j-i|) query time, respectively, where kk denotes the number of distinct elements in AA and mm denotes the frequency of the mode of AA. Finally, we examine generalizing our data structures to higher dimensions.Comment: 13 pages, 2 figure

    Approximate Set Union Via Approximate Randomization

    Get PDF
    We develop an randomized approximation algorithm for the size of set union problem \arrowvert A_1\cup A_2\cup...\cup A_m\arrowvert, which given a list of sets A1,...,AmA_1,...,A_m with approximate set size mim_i for AiA_i with mi((1βL)Ai,(1+βR)Ai)m_i\in \left((1-\beta_L)|A_i|, (1+\beta_R)|A_i|\right), and biased random generators with Prob(x=\randomElm(A_i))\in \left[{1-\alpha_L\over |A_i|},{1+\alpha_R\over |A_i|}\right] for each input set AiA_i and element xAi,x\in A_i, where i=1,2,...,mi=1, 2, ..., m. The approximation ratio for \arrowvert A_1\cup A_2\cup...\cup A_m\arrowvert is in the range [(1ϵ)(1αL)(1βL),(1+ϵ)(1+αR)(1+βR)][(1-\epsilon)(1-\alpha_L)(1-\beta_L), (1+\epsilon)(1+\alpha_R)(1+\beta_R)] for any ϵ(0,1)\epsilon\in (0,1), where αL,αR,βL,βR(0,1)\alpha_L, \alpha_R, \beta_L,\beta_R\in (0,1). The complexity of the algorithm is measured by both time complexity, and round complexity. The algorithm is allowed to make multiple membership queries and get random elements from the input sets in one round. Our algorithm makes adaptive accesses to input sets with multiple rounds. Our algorithm gives an approximation scheme with O(\setCount\cdot(\log \setCount)^{O(1)}) running time and O(logm)O(\log m) rounds, where mm is the number of sets. Our algorithm can handle input sets that can generate random elements with bias, and its approximation ratio depends on the bias. Our algorithm gives a flexible tradeoff with time complexity O\left(\setCount^{1+\xi}\right) and round complexity O(1ξ)O\left({1\over \xi}\right) for any ξ(0,1)\xi\in(0,1)

    Upper and lower bounds for dynamic data structures on strings

    Get PDF
    We consider a range of simply stated dynamic data structure problems on strings. An update changes one symbol in the input and a query asks us to compute some function of the pattern of length mm and a substring of a longer text. We give both conditional and unconditional lower bounds for variants of exact matching with wildcards, inner product, and Hamming distance computation via a sequence of reductions. As an example, we show that there does not exist an O(m1/2ε)O(m^{1/2-\varepsilon}) time algorithm for a large range of these problems unless the online Boolean matrix-vector multiplication conjecture is false. We also provide nearly matching upper bounds for most of the problems we consider.Comment: Accepted at STACS'1
    corecore