Finding Intersections of Bichromatic Segments Defined by Points Amr Elmasry * Kazuhisa Makino † Abstract Consider a set of n points in ℜ 2 , each colored either red or blue. A line segment defined by two red points is a red segment, and that defined by two blue points is a blue segment. A bichromatic intersection is an intersec- tion between a red segment and a blue segment. We give an O(n 2 + k) algorithm that reports k bichromatic intersections defined by the n points. Extending our al- gorithm to points on spherical curves, we can report in O(n 2 + k) time the k simplices, defined by n points in ℜ 3 , containing a specified point in their interior. 1 Introduction Geometric intersection problems are among the funda- mental problems of computational geometry. One of these intersection problems is the problem of report- ing all pairwise line-segment intersections. Using a plane-sweep algorithm, Bentley and Ottmann showed how to report k intersecting pairs of n line segments in O((n + k) log n) time and O(n) space [4]. Later, Bala- ban gave an optimal algorithm for the problem running in O(n log n + k) time and O(n) space [2]. A variation of the general line-segment intersection problem is the bichromatic line-segment intersection re- porting; Given a set of red segments and another of blue segments, the bichromatic intersections problem is the problem of reporting the intersections between red segments and blue segments. The case where there are no possible monochromatic intersections (intersec- tions between segments having the same color) is a special case of the general line-segments intersections problem, and hence inherits the same O(n log n + k) bound. Mairson and Stolfi [9] gave a simpler algorithm for such special case than that of Balaban. The prob- lem becomes more difficult when monochromatic inter- sections exist. In such case, Agarwal [1] and Chazelle [6] showed how to report k bichromatic intersections in O(n 4/3 log O(1) n + k) time. A special case of the latter problem is when the union of each of the red and the blue segments is connected as a point set. In such case, * Department of Computer Engineering and Informatics, Beirut Arab University, Lebanon (On sabbatical from Alexandria University of Egypt); elmasry@alexeng.edu.eg † Department of Mathematical Informatics, Graduate School of Information and Technology, University of Tokyo, Tokyo, Japan; makino@mist.i.u-tokyo.ac.jp Basch et al. gave an O((n + k) log O(1) n) time algorithm for reporting k such bichromatic intersections [3]. Consider a set of n points, each colored either red or blue. Our problem is to find intersections between line segments joining two red points and those joining two blue points. Note that the number of such blue and red line segments is Θ(n 2 ), and the number of the bichro- matic intersections k is O(n 4 ). If we consider all the possible Θ(n 2 ) red and blue line segments connecting the n-point set, our intersection problem is even a spe- cial case of that of Basch et al. [3]. Applying their algo- rithm on these segments, we get an O((n 2 +k) log O(1) n) algorithm for such problem. In this paper, we introduce a simpler algorithm and get rid of the poly-logarithmic factor achieving the O(n 2 + k) bound. Consider a set of n points and a point p in ℜ d . A d-dimensional simplex that contains p is a minimal subset of points whose convex hull contains p. By Carath´ eodory theorem (see [10]), the cardinality of any such set is at most d + 1 (under the general position assumption, this would be exactly d + 1). It is a long- standing open problem to find an algorithm, for report- ing all such k simplices, whose running time is polyno- mial in n, d, and k (see [5, 11]). For the case d = 2, an algorithm for reporting all such simplices in O(n + k) time is introduced in [8]. In this paper, we give an O(n 2 + k) algorithm for the case d = 3. 2 The bichromatic-intersections algorithm A main result of the geometric duality is that the angu- lar order of a given set of n points can be produced with respect to each of these n points, all in O(n 2 ) time and storage [7]. We use this result, and assume that throughout the algorithm such angular orders are known and stored by a preprocessing phase. We use a divide-and-conquer approach to solve our problem. The set of n points is divided into two sets of almost equal sizes (⌈n/2⌉ and ⌊n/2⌋) via a horizon- tal line. This can be done by finding the median of the points with respect to their Y -coordinates. Two cate- gories of line segments are defined: A crossing segment is a segment whose endpoints are each on a different side of the dividing horizontal line. A non-crossing segment is a segment whose two endpoints are on the same side of the dividing horizontal line. Three types of intersec- tions are thereby possible depending on the type of the