Maximum-Weight Two Boxes Symmetric Difference Problem
Let $P$ be a set of $n$ weighted points in the plane. We study optimization with axis-aligned rectangles under objectives determined by the incidence pattern of each point with the selected rectangles. As a central case, we consider two possibly overlapping rectangles maximizing the total weight of the points in their symmetric difference. We give a direct algorithm based on a generalized Maximum Consecutive Subsequence tree running in $O(n^4\log n)$ time and $O(n)$ space, and improve the running time to $O(n^4)$ via a reduction to Weighted Depth in $\mathbb{R}^8$. The resulting parameter-space instance has the signed coefficient pattern $(w,w,-2w)$ induced by symmetric difference. When the two factor boxes are allowed to be arbitrary and the associated weights may be signed, this coefficient structure is linearly equivalent, up to an additive constant, to general Weighted Depth. More generally, for any fixed $k$ and fixed Boolean incidence objective $h:\{0,1\}^k\to\mathbb{R}$, a Möbius expansion over the Boolean lattice yields an $O(n^{2k})$-time algorithm through Weighted Depth in $\mathbb{R}^{4k}$. This strictly extends depth-based objectives by allowing the value of a point to depend on which rectangles cover it. Symmetric difference, union, intersection, exact-depth and threshold coverage, and overlap rewards or penalties are all special cases.