The positive integer
cannot be expressed as the sum of more than positive integer, so if compresses , then must contain the integer . We want to be a list of positive integers of
length four, and is the smallest
positive integer, so we can assume that where , , and are integers with .
The largest sum in must be
the sum of the three largest items in , which is , and since , we have .
Suppose that and , then implies that , but then , which does not satisfy since, for example, is not in . Therefore, and are not both .
Suppose that and . Then implies , so , but then does not contain so . Therefore, we cannot have and .
Suppose that and . Then , so . It can be verified that
, so this gives
one possible list .
Suppose and . Then as well since , but if where and , then does not contain which means .
So far, we have shown that is the only list of the form
we seek with and .
We will now similarly examine the possibilities when .
If and , then , so . It can be checked that in this case.
If and , then and . It can be checked that in this case.
If and , then implies that , but we are assuming that , so this is impossible.
Therefore, the only possibilities with are and .
If , then has and as well, but this would prevent
from being in , so cannot compress in this case.
Therefore, the only lists of length four that compress are , , and .
To see why no shorter list can compress , we use the general observation
that if is a list of length , then there are at most integers in . This is because for each sum
computed for , each of the
items in is either included in the sum or it is
not. This gives possible ways
of computing a sum of some of the items in . However, this count includes the sum
of none of the items in (all are
excluded from the sum) and the sum of all of the items in . Both of these sums are excluded from
, so there are ways to compute a sum to go in
. We note that there could be
multiple ways to express the same integer in as a sum of items in , which is why we can only say there are
at most integers in
– in practice, there could be
fewer than .
If , then , and so if is a list of length at most three, then
has at most integers. Therefore, , which has nine integers, cannot be
compressed by a list of length less than four.
At the end of the solution to part (a), we argued that if is a list of length , then there are at most integers in . Since and , we need to achieve . Therefore, a list that
compresses must have length
at least seven. Now, we will provide a list of minimal length (seven)
that compresses .
Consider .
Note that is in and that the sum of all items in
is . Since has sums of some but not all of the
items in , the integers in are at most . Rather than computing all of the
sums, we will explain why in a way that will give some insight for part (c).
We first consider the sums that are achievable without using the
integer . The other integers in
are , , , , , and . The sums that can be obtained by
adding some or all of these integers are exactly the integers from through . To get an idea of how this
works, read about "binary expansions" or "binary representations" of
integers. As an example, to represent as a sum of powers of , first, find the largest power of that is no larger than , which is . Then compute to get . Now find the largest power of
that is no larger than , which is . Subtract to get or . Now substitute to get . Repeating this process, find
the largest power of that is no
larger than , which is . Subtracting, so , but what remains, , is a power of , so we get .
The integers from through
are all in . To write the integers from through as a sum of integers in , notice that , and so if , then . To write such as a sum of integers from , compute , write as a sum of the integers from other than , then include in the sum. For example, to see that
is in , compute , then use that to get that .
The only thing left to check is that none of the sums described above
require using all seven items in .
To see why this is not a concern, recall that the sum of all items in
is , so if we express an integer that
that is no larger than as a sum
of items from , then it cannot
possibly use every item in .
The result of part (b) generalizes as follows. For every positive
integer , the minimum length of a
list that compresses is . Notice that
when , since is strictly between and , we have , which
agrees with the result from part (b).
We will prove that is the minimum length of a list that
compresses and, in the
process, prove that is always
compressible.
To see that is the minimum length of a list that
compresses in general, we
will show that a list of length less than cannot possibly
compress , and then we will
construct a list of length exactly that does compress .
Suppose has length . Since
and are both
integers, this implies . For every integer , it is true that , so we conclude that .
From , we get
or . As argued earlier, a list
of length has the property that there are at most
distinct integers in . Since , we cannot have when is a list of length since
contains integers.
We have shown that if
compresses , then it must have
length at least . We will now produce a list of length that compresses
. This requires explaining how
to produce the list, then showing that the list has the correct
length.
Suppose is a positive integer.
Define to be the largest
non-negative integer with the property that and define . The list consisting of the powers of from through together with will compress and have length exactly . Notice that it
is possible for to be equal to
one of the powers of from through . In this situation, the list
will include two copies of that
power of .
Before verifying that the list described above does what is required,
we will work through a couple of examples.
When , we observe that
and are the powers of that are no larger than , and so . Thus, and , so the list is . Indeed .
When , we get , so and , so the list is
, which is
exactly the list from part (b).
We will now show that list has
length . The
integer is the largest
non-negative integer with the property that , and contains , , and so on up to , along with the integer . This gives a total of items in . Therefore, it suffices to show that
with chosen as described above,
we have .
The function is
increasing, meaning that if and
are positive real numbers with
, then . Using this fact
along with the fact that , we get that . As well, is the largest non-negative integer
with the property that ,
which means .
Suppose .
Then . From above,
we also have , so
we conclude that . The quantities
and are consecutive integers,
so the integer cannot lie
strictly between them. Therefore, it is impossible for , which means we must
have .
Combining this inequality with , we have , and so we conclude that .
It remains to show that
compresses . As discussed
earlier, since list contains the
items , , and so on up to , as well as at least one other
item, , contains all of the integers from
through . This is because these
integers can be expressed using the sum of some or all of the powers of
from through . These are exactly the integers
that can be expressed without using .
If we do use , then we can
express every integer from
through as a sum of items
in . Since is the sum of all items in , it is excluded from and so we have that contains all of the integers from
to , and nothing larger. By
definition, , so .
We have shown that is the
list consisting of the integers that are in or . To see that is exactly , we need to show that . There might be overlap
corresponding to multiple ways to express some integers in in , but this is allowed.
Suppose . Since these
quantities are integers, we must have . By definition, , and so we get that , which can be
rearranged to get . Therefore, we have , but was chosen to be the largest integer
with , so it is not
possible that .
Therefore, our assumption that must be wrong, so we conclude
that , as
desired.
Fix a positive integer . We will show that for every integer , is not compressible.
To see this, suppose is a list
that compresses . Since
, there are at least three
items in . If has only two items, then has at most two integers since the
allowable sums are just the two "singleton sums". Therefore, also contains at least three items.
Note that since is the smallest
integer in , must also be the smallest integer in
. (If is in , then the "singleton sum" must also be in , so all integers in must be at least . Also, since there is nothing smaller
than in , the only way to produce in is by the "singleton sum" .)
Since , is also in . If is the sum of at least two items in
, then they must all be smaller
than , but the only integer in
that is smaller than is . This would mean must be in , but this is impossible since and is the smallest element in . Therefore, we must also have in , and so both and are in .
Now recall that has at least
three items, so there is at least one element other than and , and so is in . Since , we must then have , which can be rearranged
to get , which is
impossible since .
Therefore, it is not possible to compress when . This means that there are only
finitely many for which is compressible since all such
must be at most .
As mentioned in the hint, the answer is . This means is not compressible, but is compressible for all . We will include a sketch of the
proof here.
One can check that the lists , , , , and compress the lists
, , , , and , respectively.
Now suppose a list compresses
and suppose is the list with a added to it. It can be shown that compresses the list . Since is compressible, this shows that
is compressible. Since is compressible, is compressible. Since we have
five consecutive values of for
which is compressible ( through ), this reasoning can be used to show
that is compressible for all
. Note that the lists to
compress given by this
inductive process will not, in general, be as short as possible.
Now suppose a list compresses
. It can be argued using
reasoning similar to that from earlier parts that must be in ,
is the smallest integer in , and
that the integers , , , and also appear in . Since the smallest integer in is , the largest sum in is less than the sum of all items in . Therefore, the sum of all items in
must be . We already have , , , , and in which have a sum of , and so the remaining items
in have a sum of .
Next, note that using only the five items , , , , and , a sum of is impossible. The list cannot contain the integer itself since we already determined
that the remaining items in have
a sum of . It also cannot include
the integers , , , or since is the smallest integer in . Therefore, the in must come from the sum of two s, which means must include a second .
We now have that contains (at
least) the items , , , , , and , which have a total of . Since the sum of all items in is , there must be an additional item in
that is no larger than . This is impossible, so we
conclude that is not
compressible.