Information Processing Letters 114 (2014) 437–445 Contents lists available at ScienceDirect Information Processing Letters www.elsevier.com/locate/ipl Maximum-weight planar boxes in O ( n 2 ) time (and better) ✩ Jérémy Barbay a,1 , Timothy M. Chan b , Gonzalo Navarro a,1 , Pablo Pérez-Lantero c,∗,1,2 a Department of Computer Science, University of Chile, Chile b Cheriton School of Computer Science, University of Waterloo, Waterloo, Canada c Escuela de Ingeniería Civil en Informática, Universidad de Valparaíso, Valparaiso, Chile article info abstract Article history: Received 12 November 2013 Accepted 17 March 2014 Available online 20 March 2014 Communicated by M. Yamashita Keywords: Computational geometry Maximum box Divide–summarize-and-conquer Adaptive algorithms Klee’s Measure problem Given a set P of n points in R d , where each point p of P is associated with a weight w( p) (positive or negative), the Maximum-Weight Box problem is to find an axis-aligned box B maximizing ∑ p∈B∩P w( p). We describe algorithms for this problem in two dimensions that run in the worst case in O (n 2 ) time, and much less on more specific classes of instances. In particular, these results imply similar ones for the Maximum Bichromatic Discrepancy Box problem. These improve by a factor of Θ(lg n) on the previously known worst-case complexity for these problems, O (n 2 lg n) (Cortés et al., 2009 [9]; Dobkin et al., 1996 [10]). Although the O (n 2 ) result can be deduced from new results on Klee’s Measure problem (Chan, 2013 [7]), it is a more direct and simplified (non-trivial) solution. We exploit the connection with Klee’s Measure problem to further show that (1) the Maximum-Weight Box problem can be solved in O (n d ) time for any constant d 2; (2) if the weights are integers bounded by O (1) in absolute values, or weights are +1 and −∞ (as in the Maximum Bichromatic Discrepancy Box problem), the Maximum-Weight Box problem can be solved in O ((n d / lg d n)(lg lg n) O (1) ) time; (3) it is unlikely that the Maximum-Weight Box problem can be solved in less than n d/2 time (ignoring logarithmic factors) with current knowledge about Klee’s Measure problem. 2014 Elsevier B.V. All rights reserved. 1. Introduction Consider a set P of n points in R d , such that the points are in general position (i.e., no pair of points share the same x or y coordinate). Each point p of P is assigned ✩ A previous version of this paper appeared in the Proceedings of the 25th Canadian Conference on Computational Geometry (CCCG’13). * Corresponding author. E-mail addresses: jbarbay@dcc.uchile.cl (J. Barbay), tmchan@cs.uwaterloo.ca (T.M. Chan), gnavarro@dcc.uchile.cl (G. Navarro), pablo.perez@uv.cl (P. Pérez-Lantero). 1 Partially funded by Millennium Nucleus Information and Coordination in Networks ICM/FIC P10-024F, Mideplan, Chile. 2 Partially supported by grant CONICYT, FONDECYT/Iniciación 11110069, Chile. a weight w( p) ∈ R that can be either positive or negative. For any subset B ⊆ R d let W ( B ) := ∑ p∈B∩P w( p).A box is an axis-aligned hyper-rectangle, and we say that the weight of a box B is W ( B ). We consider the Maximum-Weight Box problem, which given P and w() is to find a box B with maximum weight W ( B ). Depending on the choice of the weights w(), this geo- metric optimization problem has various practical applica- tions, such as machine learning [10] and data classification and clustering [11]. Related work In one dimension, the coordinates of the points matter only in the order they induce on their weights, and the problem reduces to the Maximum-Sum Consecutive Subsequence problem [4], which can be solved in O (n) time if the coordinates are already sorted. http://dx.doi.org/10.1016/j.ipl.2014.03.007 0020-0190/ 2014 Elsevier B.V. All rights reserved.