Ask Question
18 July, 15:11

Given a set of weights {1,3,9,27}, show that you can construct any number between 1 and 40. In other words, using the set above and the addition and subtraction operations, construct any integer between 1 and 40 without re-using elements. For example, 4 = 1+1+1+1 is not acceptable.

For example,

8 = 9 - 1

10 = 1 + 9

+3
Answers (1)
  1. 18 July, 16:12
    0
    Yes

    Explanation:

    One way to prove it is by trying out all the possible combinations and see if the resulting set of numbers contains all the numbers from 1 to 40. You could code a program to do it omitting unnecessary calculations like those involving - 27.

    Proof that it is possible:

    1 = 1

    2 = 3-1

    3 = 3

    4 = 3+1

    5 = 9-3-1

    6 = 9-3

    7 = 9-3+1

    8 = 9-1

    9 = 9

    10 = 9+1

    11 = 9+3-1

    12 = 9+3

    13 = 9+3+1

    14 = 27-9-3-1

    15 = 27-9-3

    16 = 27-9-3+1

    17 = 27-9-1

    18 = 27-9

    19 = 27-9+1

    20 = 27-9+3-1

    21 = 27-9+3

    22 = 27-9+3+1

    23 = 27-3-1

    24 = 27-3

    25 = 27-3+1

    26 = 27-1

    27 = 27

    28 = 27+1

    29 = 27+3-1

    30 = 27+3

    31 = 27+3+1

    32 = 27+9-3-1

    33 = 27+9-3

    34 = 27+9-3+1

    35 = 27+9-1

    36 = 27+9

    37 = 27+9+1

    38 = 27+9+3-1

    39 = 27+9+3

    40 = 27+9+3+1
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Given a set of weights {1,3,9,27}, show that you can construct any number between 1 and 40. In other words, using the set above and the ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers