1

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?

advocateofnone
  • 3,179
  • 1
  • 27
  • 44
Daniel D.
  • 47
  • 2

1 Answers1

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
  • 82,470
  • 26
  • 145
  • 239