背包问题或者动态规划求解
Consider the partition problem: given a set S of n positive integers, partition it into two disjoint subsets S1 and S2 such that the discrepancyE(S) = |sum(S1) - sum(S2)|
is minimized, where sum(Si) is the sum of Si's elements. Design an exhaustive search algorithm for this problem.
就是求2组数各自和的最小差的绝对值