Skip to content

Smallest set reaching 1 to 40 by adding and subtracting

Question

Find a set of integers of smallest possible size such that every whole number from 11 to 4040 can be written as a signed sum of set elements, using each element at most once (with ++, −- or not at all). Show that no smaller set works.

Short answer

{1,3,9,27}\{1,3,9,27\}, four elements. Each element has three choices, so kk elements produce at most 3k3^k signed sums, symmetric about 00, giving at most (3k−1)/2(3^k-1)/2 positive values; k=3k=3 gives only 1313. Balanced ternary shows 1,3,9,271,3,9,27 reach every integer from 11 to 4040.

Adapted from Joshi, Denson & Downes, Quant Job Interview Questions and Answers, Q8.13, p.277; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question