We study the optimization version of the equal cardinality set partition problem (where the absolute difference between the equal sized partitions' sums are minimized). While this problem is NP-hard and requires exponential complexity to solve in general, we have formulated a weaker version of this NP-hard problem, where the goal is to find a locally optimal solution. The local optimality considered in our work is under any swap between the opposing partitions' element pairs. To this end, we designed an algorithm which can produce such a locally optimal solution in $O(N^2)$ time and $O(N)$ space. Our approach does not require positive or integer inputs and works equally well under arbitrary input precisions. Thus, it is widely applicable in different problem scenarios.
翻译:我们研究平等基点设定分区问题的优化版本(即将相等大小分区的绝对差值最小化 ) 。 虽然这个问题是NP硬的,需要指数复杂性才能解决,但我们对这个NP硬问题提出了较弱的版本,目的是找到一个当地最佳解决办法。我们工作中考虑的地方最佳性是在对立分区的元素对子之间的任何交换中。为此,我们设计了一种算法,可以以$O(N2)美元的时间和$O(N)美元的空间产生这种本地最佳解决办法。我们的方法不需要正或整数投入,在任意输入精确度下同样有效。因此,它广泛适用于不同的问题情景。