Short answer Your problem is exactly the weighted correlation clustering objective on a (not necessarily complete) graph: you want to find a partition of the vertices so as to maximize agreements, where an agreement is “put endpoints together” on a negative-weight edge and “put endpoints apart” on a positive-weight edge. Formally, if we let A be the total weight of agreements A = sum_{e=(u,v), w(e)>0} w(e)·[u and v in different parts] + sum_{e=(u,v), w(e)<0} |w(e)|·[u and v in the same part], then your objective (minimize the sum of weights of monochromatic edges) is exactly sum_{e=(u,v)} w(e)·[u and v in the same part] = (sum_{w(e)>0} w(e)) − A, so minimizing your objective is equivalent to maximizing A.
For planar graphs, maximizing agreements (i.e., correlation clustering) is NP-hard (even with unit weights), but admits a PTAS (polynomial-time approximation scheme).
Details and consequences
Equivalence to correlation clustering.
Complexity on planar graphs.
Special/easy cases.
What this gives you
If you need pointers to concrete algorithmic frameworks for the PTAS (Baker-style decomposition and DP for pairwise potentials/Potts-like models) or to implementable exact solvers on bounded-treewidth decompositions, I can outline them.
Was this answer helpful?
version: gpt-5-2025-08-07
Status: UQ Validated
Validated: 7 months ago
Status: Needs Human Verification
Loading model reviews...
Loading reviews...