Let $P$ be a set of $n$ points in the plane, where each element of $P$ is assigned a weight $ω(p)$, positive or negative. In this paper, we present an algorithm that runs in $O(n^4\log n)$ time and $O(n)$ space to find two possibly overlapping axis-aligned rectangles $A$ and $B$ so as to maximize the total weight of the points contained in the symmetric difference of $A$ and $B$. The same optimization framework can easily be adapted to solve related problems such as to maximize the total weight in the symmetric difference of $k \geq 3$ boxes and/or in the union of $k \geq 2$ boxes.
翻译:设 $P$ 为平面上的 $n$ 个点集,其中每个元素 $p \in P$ 被赋予一个正或负的权重 $w(p)$。本文提出一种时间复杂度为 $O(n^4 \log n)$、空间复杂度为 $O(n)$ 的算法,用于寻找两个可能相交的轴对齐矩形 $A$ 和 $B$,使得 $A$ 与 $B$ 对称差中所含点的总权重最大化。该优化框架可轻易推广至求解相关问题,例如最大化 $k \geq 3$ 个矩形对称差及/或 $k \geq 2$ 个矩形并集的总权重。