0

Maybe this is quite simple, but I am having some trouble how to do this reduction. I want to reduce Subset Sum to Almost Subset Sum.

Subset Sum: given a set of positive integers $A=\{a_1,a_2, \dots,a_n\}$ and an integer $M$, decide if there is a subset of $A$ with a sum equal to $M$.

Almost Subset Sum:

Input: a set of positive integers $A=\{a_1,a_2, \dots,a_n\}$, and a positive integer $M$.

Goal: decide whether there is a subset of $A$ with sum $S$ such that $|M −S| < d$ where $d = ⌊\log M ⌋$?

lox
  • 1,659
  • 1
  • 11
  • 16
red31
  • 155
  • 6

0 Answers0