colored intersection searching via sparse rectangular matrix multiplication
In a Batched Colored Intersection Searching Problem ( CI ), one is given a set of n geometric objects (of a certain class). Each object is colored by one of c colors, and the goal is to report all pairs of colors ( c 1 , c 2 ) such that there are two objects, one colored c 1 and one colored c 2 , that intersect each other. We also consider the bipartite version of the problem, where we are interested in intersections between objects of one class with objects of another class (e.g., points and halfspaces).In a Sparse Rectangular Matrix Multiplication Problem ( SRMM ), one is given an n 1  n 2 matrix A and an n 2  n 3 matrix B , each containing at most m non-zero entries, and the goal is to compute their product AB .In this paper we present a technique for solving CI problems over a wide range of classes of geometric objects. The basic idea is first to use some decomposition method, such as geometric cuttings, to represent the intersection graph of the objects as a union of bi-cliques. Then, in each of these bi-cliques, contract all vertices of the same color. Finally, use an algorithm for sparse matrix multiplication (adapted from Yuster and Zwick [20]) to compute the union of the bi-cliques. We apply the technique to segments in R 1 , to segments in R 2 , to points and halfplanes in R 2 , and, more generally, to points and halfspaces in R d , for any fixed d . However, the technique extends to colored intersection searching in any class (or pair of classes) of geometric objects of constant descriptive complexity.In particular, using our technique we obtain an algorithm that reports all the pairs of intersecting colors for n points and n halfplanes in R 2 , that are colored by c colors, in O ( n 4/3 c 0.46 ) time when n ? c 1.44 , and in O ( n 1.04 c 0.9 + c 2 ) time when n ? c 1.44 .The algorithms that we give for CI use the algorithm for SRMM as a black box, which means that any improved algorithm for SRMM immediately leads to an improved algorithm for all colored intersection problems that our method applies to. We also show that the complexity of computing all intersecting colors in a set of segments on the real line is identical , up to a polylogarithmic multiplicative factor, to the complexity of SRMM with the appropriate parameters.
colored intersection searching matrix multiplication generalized intersection searching range searching