SCN NDNSUBSN umPy umerical ython Numpy Cheat Sheet 5.

Subset Sum • There is a subset of X that includes x and whose sum is T. • There is a subset of X that excludes x and whose sum is T. In the first case, there must be a subset of X \{x} that sums to T x; in the second case, there must be a subset of X \{x} that sums to T. So we can solve SS(X,T)by reducing it to two simpler instances: SS(X\{x}, ................
................