Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

BOB

To find x1 , x2 , … , x10 such that ∑ xi


= 1000 and that for any arbitrary integer x, it
is true that a1 x1 + a2 x2 + a3 x3 + ⋯ + a10 x10 = x, where ai ∈ {0, 1}.

Let the numbers be arranged from a1 , a2 , … , a10 . Then write a 10-digit number
where the le most digit is a1 , the second to the le a2 , and so on.

This creates a binary number of the form 1001010001 or similar.

This implies that a1 = 1, a2 = 2, a3 = 4, … , a9 = 128, and a10 = 489.

That is,

Bag Number Amount

1 1

2 2

3 4

4 8

5 16

6 32

7 64

8 128

9 256

10 489

All that remains is to prove that these numbers can represent any integer from 1 to
1000, which can be done by strong induc on on 1.

MalayTheDynamo
In simpler language:

You either give a bag, or you don’t. So you give all bags with their value mul plied either
by 0 or 1. So assume all bags are kept in a row, and for any arbitrary number take the
sequence of 1s and 0s and make a number out of them. This number is binary. Which
means that the values, in the first nine bags at least, must be powers of 2. So I get the
coins for the first nine bags as 20 , 21 , 22 , 23 , … , 28 , and 489 coins le over, which can
be put in the tenth bag.

You might also like