Abstract: Given a stream of rectangles over a discrete space, we consider the problem of computing the total number of distinct points covered by the rectangles. This is the discrete version of the two-dimensional Klee's measure problem for streaming inputs. Given 0<ϵ,δ<1<math><mn is="true">0</mn><mo is="true"><</mo><mi is="true">ϵ</mi><mo is="true">,</mo><mi is="true">δ</mi><mo is="true"><</mo><mn is="true">1</mn></math>, we provide (ϵ,δ)<math><mo stretchy="false" is="true">(</mo><mi is="true">ϵ</mi><mo is="true">,</mo><mi is="true">δ</mi><mo stretchy="false" is="true">)</mo></math>-approximations for bounded side length rectangles and for bounded aspect ratio rectangles. For the case of arbitrary rectangles, we provide an O(logU)<math><mi mathvariant="script" is="true">O</mi><mo stretchy="false" is="true">(</mo><msqrt is="true"><mrow is="true"><mi mathvariant="normal" is="true">log</mi><mo is="true"></mo><mi is="true">U</mi></mrow></msqrt><mo stretchy="false" is="true">)</mo></math>-approximation, where U is the total number of discrete points in the two-dimensional space. The time to process each rectangle and the total required space are polylogarithmic in U. The time to answer a query for the total area is constant. We construct efficient transformation techniques that project rectangle areas to one-dimensional ranges and then use a streaming algorithm for the one-dimensional Klee's measure problem to obtain these approximations. The projections are deterministic, and to our knowledge, these are the first approaches of this kind that provide efficiency and accuracy trade-offs in the streaming model.
Loading