Given a list of n positive integers (n even), divide the list into two sublists such that the difference between the sums of the integers in the two sublists is minimized. Would this be a NP-complete problem or a NP-hard problem?
Asked
Active
Viewed 98 times
1 Answers
0
TL;DR - it's np hard.
this is the optimization version of the partition problem. the partition problem is deciding if a given list of positive integers can be divided into 2 subsets so that the sums of the subsets are equal. the optimization version asks for the minimized difference (like you asked).
the partition problem is np-complete but the optimization is np hard.
you can read more on these problems in wiki: https://en.wikipedia.org/wiki/Partition_problem

Imbar M.
- 1,074
- 1
- 10
- 19