Smallest subset of integers that you can use to produce 1,2,....,40

398 Views Asked by At

Find the smallest subset of integers that you can use to produce $1,2,...,40$ by only using $"+"$ or $"-"$, and each number in the subset can be used at most one time.

There is a hint that $0$ must be in the set, but I cannot see any justification as to why you can need to add or takeaway a $0$.

1

There are 1 best solutions below

0
On BEST ANSWER

Like $1,3,9,27$ and balanced ternary?

Clearly $3$ numbers produce only $3^3$ variants (either number can be $\cdot 0$, $\cdot 1$, $\cdot (-1)$) so $4$ is the minimum.