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 to 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
, four elements. Each element has three choices, so elements produce at most signed sums, symmetric about , giving at most positive values; gives only . Balanced ternary shows reach every integer from to .
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