Is the variation of partition problem where instead the sum of the sets only be equal to a value $B$, they could also differ by two ( i.e., the sum of one set could be $B-1$ and the other $B+1$ ) still $NP$-complete?
Asked
Active
Viewed 305 times
1
-
What have you tried? Where did you get stuck? We discourage posts that simply state a problem out of context, and expect the community to solve it. We do not want to just do your exercise for you; we want you to gain understanding. However, as it is we do not know what your underlying problem is, so it's hard to know how to help. See http://cs.stackexchange.com/q/11209/755 to learn general techniques that are applicable for this sort of problem. – D.W. Nov 14 '15 at 06:00
1 Answers
2
Yes. To reduce the ordinary partition problem to this variant, just multiply each element by 3. Now, the case where the weights of the two partitions differ by two cannot arise so, if the instance is a yes instance, it must be because there's an equal-weight partition.

David Richerby
- 81,689
- 26
- 141
- 235