The set of numbers { x 1 , x 2 , . . . , x n } consists of integers from 1 to 4 5 inclusive, such that all their finite subsets have distinct sums (for example, x 1 + x 3 = x 2 + x 5 + x 6 ). What is the largest possible value of n ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
{The largest possible value of n is 7 . Our proof consists of two parts: (i) n ≥ 8 is impossible; (ii) n = 7 is possible.
(i) Consider the following 2 n numbers: x = ϵ 1 x 1 + ϵ 2 x 2 + ⋯ + ϵ n x n , where ϵ i = − 1 or 1 . Suppose s is the sum of x 2 over all possible x 's. Then, on one hand,
s = 2 n ( x 1 2 + ⋯ + x n 2 ) + α ,
where α is the sum of "cross terms": i = j ∑ ( ( + x i ) ( + x j ) + ( + x i ) ( − x j ) + ( − x i ) ( + x j ) + ( − x i ) ( − x j ) ) which is equal to 0 . Therefore s = 2 n ( x 1 2 + ⋯ + x n 2 ) . On the other hand, it is evident that all numbers in the form of x have the same parity and not equal to 0 , so s is at least 1 2 + ( − 1 ) 2 + 3 2 + ( − 3 ) 2 + ⋯ + ( 2 n − 1 ) 2 + ( − 2 n + 1 ) 2 = 2 ( 1 2 + 3 2 + ⋯ + ( 2 n − 1 ) 2 ) = 2 ( 1 + 2 + ⋯ + ( 2 n − 1 ) ) 2 = 3 2 ( 2 n − 1 ) ( 2 n − 1 ) ( 2 n + 1 ) = 3 2 n ( 4 n − 1 ) .
(Note that we used the formula 1 2 + 3 2 + 5 2 + . . . + ( 2 N − 1 ) 2 = 3 N ( 2 N − 1 ) ( 2 N + 1 ) , which can be proved by induction easily.)
So n ⋅ x n 2 ≥ x 1 2 + ⋯ + x n 2 ≥ ( 4 n − 1 ) / 3 . Thus x n ≥ 3 n 4 n − 1 .
However, if n ≥ 8 , x 8 ≥ ( 4 8 − 1 ) / 2 4 > 5 2 , which contradicts with x 8 ≤ 4 5 .
(ii) For n = 7 , consider the set B = { 2 0 , 3 1 , 3 7 , 4 0 , 4 2 , 4 3 , 4 4 } . Suppose it does not satisfy the property stated in the problem. Then there are two different subsets whose sums are equal:
α 1 + ⋯ + α p = β 1 + ⋯ + β q ,
where α i , β j ∈ B . Also, one can eliminate the same terms from both sides (if any), and thus it can be assumed that p + q ≤ 7 . Observe that ∑ B = 2 0 + 3 1 + ⋯ + 4 4 = 2 5 7 , which is an odd number, so it is not possible to have all 7 numbers in the equation, i.e. p + q ≤ 6 . Furthermore, at least one odd number is not in the p + q numbers selected, and 3 1 is the smallest odd number in the set B , therefore the value of both sides of the equation is no greater than ( 2 5 7 − 3 1 ) / 2 = 1 1 3 . However, 2 0 + 3 1 + 3 7 + 4 0 = 1 2 8 > 1 1 3 , so we have p , q ≤ 3 .
Given that the smallest 3-element sum, 2 0 + 3 1 + 3 7 = 8 8 , is greater than the largest 2-element sum, 4 3 + 4 4 = 8 7 , and the smallest 2-element sum, 2 0 + 3 1 = 5 1 , is greater than the largest element 4 4 , we can conclude that p = q is not possible. So we assume p = q . Subtracting each element from 4 4 , we see that the equation
y 1 + ⋯ + y p = z 1 + ⋯ + z p
holds for p = 2 or 3 , and y i , z j are distinct elements in the set { 0 , 1 , 2 , 4 , 7 , 1 3 , 2 4 } . We then argue as follows:
Note that 4 + 7 + 1 3 = 2 4 . If 2 4 appears in this equation, say the left hand side, then the right hand side is at least 2 4 and hence must contain 4 , 7 , 1 3 . But then p = 3 , and the left hand side will be at least 2 4 + 0 + 1 = 2 5 , a contradiction. So 2 4 does not appear in the equation.
Similarly, if 1 3 appears in one side of the equation, the other side should contain 2 , 4 , 7 since 2 + 4 + 7 = 1 3 , so p = 3 and the left hand side is more than 1 3 , again a contradiction.
Same case for 7 because 7 = 1 + 2 + 4 .
Therefore 7 , 1 3 , 2 4 do not appear in both sides of the equation. Now 4 > 1 + 2 + 0 , 2 > 1 + 0 , 1 > 0 suggest that actually 4 , 2 , 1 are also not in the equation. We deduce that there are no more than one element which appear in the equation, an absurdity. (Q.E.D.)
Direct experimentation shows that such a set does exist for n = 7 , for example: { 4 5 , 4 4 , 4 3 , 4 1 , 3 8 , 3 2 , 2 0 } . (In finding this solution, I found it helpful first to keep in mind that if two subsets have the same sum, then WLOG they are disjoint; and second to think in terms of the set T = { y 1 , . . . y 7 } , where y j = 4 5 − x j . The given solution corresponds to T = { 0 , 1 , 2 , 4 , 7 , 1 3 , 2 5 } . It is easy to show that no two subsets of T have both the same sum and the same number of elements. This leaves the case where a subset of T has sum ≥ 4 5 , but that case is also easily dealt with.)
To complete the proof, we need to show that the sums cannot all be distinct if n = 8 . (Clearly if it isn't possible for n = 8 , then it isn't possible for n > 8 either.)
For n = 8 , the number of subsets (including the empty set) is 2 8 = 2 5 6 , and the largest possible sum is 3 8 + . . . + 4 5 = 3 3 2 .
However, most of the sums will be substantially less that 3 3 2 . In fact, the number of subsets with five or fewer elements is 2 8 − ( 8 8 ) − ( 7 8 ) − ( 6 8 ) = 2 5 6 − 1 − 8 − 2 8 = 2 1 9 , and the sum of each of those subsets is a nonnegative integer less than or equal to 4 1 + 4 2 + 4 3 + 4 4 + 4 5 = 2 1 5 , so the sums cannot all be distinct.
We will show that the answer is n = 7 . To do this, we must show that these two statements are true:
~~~~
Part 1 : Assume for the sake of contradiction that there exists a set { x 1 , x 2 , … , x 8 } satisfying the conditions of the problem.
Let us consider the set of numbers S = { e 1 x 1 + e 2 x 2 + ⋯ + e 8 x 8 ∣ e 1 , … e 8 ∈ { + 1 , − 1 } } , or, in other words, the numbers which can be written in the form ± x 1 ± x 2 ± ⋯ ± x 8 with a suitable choice of signs.
First, note that every element of S has the same parity, i.e. either every element is even or every element is odd, because all elements are congruent to x 1 + x 2 + ⋯ + x 8 ( m o d 2 ) .
Secondly, note that no two elements of S are equal. For example, if x 1 − x 2 + x 3 − x 4 − x 5 − x 6 + x 7 − x 8 = − x 1 + x 2 − x 3 − x 4 + x 5 + x 6 + x 7 − x 8 then by moving all terms to one side of the equation we get 2 ( x 1 − x 2 + x 3 − x 5 − x 6 ) = 0 , or in other words x 1 + x 3 = x 2 + x 5 + x 6 , contradicting the fact that no two subsets of { x 1 , … , x 8 } have the same sum of elements.
Hence S contains 2 8 distinct numbers of the same parity.
We will now evaluate the sum σ = ∑ a ∈ S a 2 in two different ways.
Step 1 : Clearly ( e 1 x 1 + e 2 x 2 + ⋯ + e 8 x 8 ) 2 , when expanded, only contains terms of the form x i 2 and x i x j . So to determine σ , we only have to determine the coefficients of x i 2 and x i x j in that sum.
Therefore σ = 2 8 ( x 1 2 + x 2 2 + ⋯ + x 8 2 ) < 2 8 ⋅ 8 ⋅ 4 5 2 .
Step 2 : Now that we have an upper bound for σ , let us find a lower bound. In fact, we shall find the minimum value of s = ∑ i = 1 2 8 y i 2 , where y 1 > y 2 > ⋯ > y 2 8 and all the y i are integers with the same parity. (The minimum value of s exists because s is always a nonnegative integer.)
If all the y i are even and there does not exist k such that y k = 0 then replacing y 1 by 0 will decrease s . Similarly, if all the y i are odd and there does not exist k such that y k = 1 then replacing y 1 by 1 will decrease s . Hence we may assume that there exists k such that y k ∈ { 0 , 1 } .
If there exists i ∈ { 2 , 3 , … , k } such that y i − 1 > y i + 2 then replacing y i − 1 by y i − 1 − 2 will decrease s , since y i − 1 ≥ 2 . Similarly, if there exists i ∈ { k , … , 2 8 − 1 } such that y i > y i + 1 + 2 then replacing y i + 1 by y i + 1 + 2 will decrease s , since y i + 1 ≤ − 2 . Hence we may assume that y i − y i + 1 = 2 for all i = 1 , 2 , … , 2 8 − 1 .
Also, if y 1 > − y 2 8 + 2 then replacing y 1 by y 2 8 − 2 decreases s . Similarly if y 1 < − y 2 8 − 2 then replacing y 2 8 by y 1 + 2 decreases s . Hence we may assume ∣ y 1 − y 2 8 ∣ ≤ 1 .
Combining all of the above, we see that the minimum value of s is achieved when { y 1 , … , y 2 8 } is one of the following:
In the first two cases, s = 2 ⋅ 2 2 ⋅ ( 1 2 + 2 2 + ⋯ + 1 2 7 2 ) + 2 5 6 2 = 8 ⋅ 6 1 2 7 ⋅ 1 2 8 ⋅ 2 5 5 + 2 5 6 2 = 3 2 5 4 ⋅ 2 5 5 ⋅ 2 5 6 + 2 5 6 2 = 3 2 5 7 ⋅ 2 5 5 ⋅ 2 5 6 + 2 5 6 2 − 2 5 5 ⋅ 2 5 6 = 3 2 5 5 ⋅ 2 5 6 ⋅ 2 5 7 + 2 5 6
In the last case, s = 2 ( 1 2 + 3 2 + ⋯ + 2 5 5 2 ) = 2 ( ( 1 2 + 2 2 + 3 2 + ⋯ + 2 5 5 2 ) − 2 2 ( 1 2 + 2 2 + ⋯ + 1 2 7 2 ) ) = 2 ( 6 2 5 5 ⋅ 2 5 6 ⋅ 5 1 1 − 4 6 1 2 7 ⋅ 1 2 8 ⋅ 2 5 5 ) = 3 2 5 5 ⋅ 2 5 6 ⋅ 2 5 7
Hence the minimum value of s is 3 2 5 5 ⋅ 2 5 6 ⋅ 2 5 7 , and thus σ ≥ 3 2 5 5 ⋅ 2 5 6 ⋅ 2 5 7 .
Putting everything together we have 2 8 ⋅ 8 ⋅ 4 5 2 > σ ≥ 3 2 5 5 ⋅ 2 5 6 ⋅ 2 5 7 , which implies 8 ⋅ 4 5 2 = 1 6 2 0 0 > 2 1 8 4 5 = 3 2 5 5 ⋅ 2 5 7 , contradiction.
Note: using the above method we can prove the following: for any set of positive integers { x 1 , … , x n } such that no two distinct subsets have equal sum of elements, we have x 1 2 + x 2 2 + ⋯ + x n 2 ≥ 1 2 + 2 2 + 4 2 + ⋯ + ( 2 n − 1 ) 2 .
~~~~
Part 2 : We now show that there exists a set { x 1 , x 2 , … , x 7 } satisfying the conditions of the problem. To do this, let us look at the set X = { 2 0 , 3 1 , 3 7 , 4 0 , 4 2 , 4 3 , 4 4 } . From this point on let ς ( S ) denote the sum of elements of a set S .
Assume there exist two distinct subsets of X , call them A and B , such that ς ( A ) = ς ( B ) . By removing elements that are in both A and B , we can assume that A and B are disjoint, which implies ∣ A ∣ + ∣ B ∣ ≤ 7 . We may also assume that ∣ A ∣ ≤ ∣ B ∣ , which implies ∣ A ∣ ≤ 3 .
Case 1 : ∣ A ∣ = 3 .
If ∣ B ∣ = 4 then A and B together contain each element of X exactly once. But 2 5 7 = ς ( X ) = ς ( A ) + ς ( B ) = 2 ς ( A ) , contradiction.
If ∣ B ∣ ≤ 2 then ς ( B ) ≤ 4 3 + 4 4 = 8 7 , but ς ( A ) ≥ 2 0 + 3 1 + 3 7 = 8 8 , contradiction.
If ∣ B ∣ = 3 then there is exactly one element of X which is not in either A or B . Note that this element must be equal to ς ( X ) − ς ( A ) − ς ( B ) = 2 5 7 − 2 ς ( A ) , so it is either 31, 37 or 43. It is easy to check in each of these three cases that no solutions to A , B can be found.
Case 2 : ∣ A ∣ = 2 .
If ∣ B ∣ ≥ 3 then again we have ς ( A ) ≤ 8 7 < 8 8 ≤ ς ( B ) , contradiction.
If ∣ B ∣ = 1 then ς ( A ) ≥ 2 0 + 3 1 > 4 4 ≥ ς ( B ) , contradiction.
Hence ∣ B ∣ = 2 . Write A = { a 1 , a 2 } , B = { b 1 , b 2 } . Then a 1 + a 2 = b 1 + b 2 , or a 1 − b 1 = b 2 − a 2 . But it is easily checked that no two pairwise differences of elements of X are equal, so a 1 = b 1 , a 2 = b 2 and thus A = B , contradiction.
Case 3 : ∣ A ∣ = 1 .
If ∣ B ∣ ≥ 2 then again we have ς ( A ) ≤ 4 4 < 5 1 ≤ ς ( B ) , contradiction.
If ∣ B ∣ = 1 then clearly A = B , contradiction.
Hence X does not contain two distinct subsets with the same sum of elements.
Therefore the maximum value of n in the question is n = 7 .
The solution for the above question can be given by Erdo's conjecture and later can be verified by Conway-Guy's sequence of sets which has distinct subset sums.
Before calculating the solution lets define a set which has distinct subset sums-
A set
S
of positive integers has distinct subset sums if the set
{
∑
x
ϵ
X
x
:
X
⊂
S
}
has
2
∣
S
∣
distinct elements i.e all the subsets of S including null set.
Let
f
(
n
)
be a function denoting the maximum value or the highest positive integer in
S
for,
∣
s
∣
=
n
.
Now Erdo’s conjecture. He states that
f
(
n
)
≥
c
2
n
, where
n
is the number of integers in set
S
and c is a constant and presently the value of
c
=
.
2
2
0
0
2
.
Coming to the question. Taking the given set 1 t o 4 5 . The maximum value is 4 5 . Thus assuming that 4 5 the maximum value of Set S with n elements,
.i.e f ( n ) = 4 5 ≥ 0 . 2 2 0 0 2 ( 2 n ) ⇒ lo g 2 [ 4 5 / 0 . 2 2 0 0 2 ] ≥ n Thus, n ≤ 7 . 6 7 6 . Since n ϵ N , n ≤ 7 . And they have asked the largest possible value of n .
∴ n = 7
Now coming to the verification part using Conway-Guy's sequence. Its is a sequence of sets which has distinct subset sums. And the sequence goes in such a way that the number elements in preceding and succeeding sets of the sequence differ by 1 . And in general the Sequence is given by
S i = { j = k ∑ i d ( j ) : k = 1 , 2 , 3 , … , i }
{ d ( j ) } : 1 , 1 , 2 , 3 , 6 , 1 1 , 2 0 , 4 0 , 7 7 , 1 4 8 , 2 8 5 , … . ,
So, the Conway-guy’s sequence goes like this, S 1 = { 1 } , S 2 = { 2 , 1 } , S 3 = { 4 , 3 , 2 } , S 4 = { 7 , 6 , 5 , 3 } , S 5 = { 1 3 , 1 2 , 1 1 , 9 , 6 } , S 6 = { 2 4 , 2 3 , 2 2 , 2 0 , 1 7 , 1 1 } , S 7 = { 4 4 , 4 3 , 4 2 , 4 0 , 3 7 , 3 1 , 2 0 } , S 8 = { 8 4 , 8 3 , 8 2 , 8 0 , 7 7 , 7 1 , 6 0 , 4 0 } …
Here we can see that the 7 t h set of the sequence has f ( 7 ) = 4 4 but we had assumed it as 45. And in the 8 t h set f ( 8 = 8 4 ) which is not included in the set 1 t o 4 5 given in the question. Hence, the largest set having distinct sums of subset and having element between 1 t o 4 5 is S 7 with 7 elements. Hence, verified.
n = 7
The answer is 7 .
First, we note that the following numbers satisfy the condition of the problem: 4 5 , 4 4 , 4 3 , 4 1 , 3 8 , 3 2 , 2 1 To check this, it is easier to look at 4 5 − x i : 0 , 1 , 2 , 4 , 7 , 1 3 , 2 4 First, one can check that if two subsets (which can be considered disjoint) have equal sums, they must have the same number of elements. Then one can check that the subset with the biggest 4 5 − x i will have strictly smaller sum than any other subset with the same number of elements.
Now suppose that n ≥ 8 . We may as well assume that n = 8 and order the numbers: x 1 < . . . < x 8 . Consider the sums of x i that contain at least three terms. Their number is 2 8 − ( 1 + 8 + 2 8 ⋅ 7 ) = 2 1 9 . The difference between the biggest and the smallest such sum is no bigger than x 4 + x 5 + x 6 + x 7 + x 8 , which is no bigger than 4 1 + 4 2 + 4 3 + 4 4 + 4 5 = 2 1 5 . Because 2 1 6 < 2 1 9 , by the Dirichlet Box Principle two of these sums must be the same.
If n = 9 then there are 2 9 = 5 1 2 subsets and thus 5 1 2 subset sums. The possible sums range from 1 to 3 7 + 3 8 + ⋯ + 4 5 = 3 6 9 . By the Pigeonhole principle, two of the subset sums must be the same, which is a contradiction. We can clearly extend this result to all n ≥ 9 , so we conclude that n ≤ 8 .
For n = 8 we utilize the following program to produce the set of 8 positive integers that satisfies the given conditions.
====
void guess(int k, int xk)
{
x[k] = xk;
FOR(i = -MAX .. MAX)
free[k][i] = free[k+1][i-xk] && free[k+1][i] && free[k+1][i+xk];
free[k][pk] = free[k][-pk] = false;
FOR(i = pk-1 .. 1) if(free[k][i]) guess(k-1,i);
}
====
The program produces the sets, {39,59,70,77,78,79,81,84} {20,40,71,77,80,82,83,84} {40,60,71,77,80,82,83,84}
Since no element of the set can exceed 4 5 we conclude that n = 8 .
Finally, we provide a construction for n = 7 : {20,31,37,40,42,43,44}. Therefore, 7 is our answer.
if n=7 there is a solution (25,33,38,41,43,44,45) if n=8 we will prove that it cannot be Let there is a set x 1 , x 2 , . . . . , x 8 we can see there are 2 8 − 1 distict sum let x 1 + x 2 + . . . . + x 8 = a so a ≤ 2 8 5
proof: let x 1 ≥ x 2 ≥ . . . . ≥ x 8 because we will find the maximum value of a, so we maximize x 1 = 4 5 and x 2 = 4 4 , then x 3 = 4 3 (there is still no same sum) if x 4 = 4 2 there is a same sum ( x 1 + x 4 = x 2 + x 3 ) so x 4 = 4 1 with the same way for x 5 , x 6 , x 7 , x 8 we can find the set (45,44,43,41,38,33,25,16) is maybe the solution for n=8 which have greatest value of a
we can see that from 2 8 − 1 distict sum there are 127 pairs where the sum is a example: ( x 1 a n d x 2 + x 3 + . . . + x 8 so we can differ 2 8 − 1 distict sum into 2 groups ( the group of 127 smallest sum where ≤ 2 a , and 128 greatest sum(including a))
because a ≤ 2 8 5 so 2 a ≤ 1 4 2
note again that there are 8 sum smaller than 45 ( x 1 , x 2 , . . . . , x 8 ) minimally so there are 1 4 2 − 4 5 = 9 7 number for 1 2 7 − 8 = 1 1 9 sums which is impossible using pigeon hole principle so there is no solution for n=8
SO, the greatest value of n=7
Always choosing the maximal value for each element of the set does not guarantee a maximal sum of the elements in the set. Taking one that is not largest might let you take larger ones later on. Also, maybe there is a smaller set that can have lots of small subsets, so you can't exclude the numbers less than 45.
Let a pair of number be denoted by {a,b}, with a ≥ b . Note that if any two distinct pair of numbers have the same difference, then we can take a 1 + b 2 as set 1, and a 2 + b 1 as set 2, and they will have the same sum. </p>
Also, if two sets share a common element d , we can remove d from both sets and whether the sets have a distinct sum is not affected. </p>
Thus, by eliminating all possible answers after starting from having 1 in our set, we get the set is {1,2,4,8,13,21,31,45} . Hence, n is 7 </p>
When faced with a sum of subset that do not equal to each other, the first thing that came into my mind is the power of 2s. So I tried answering 6 for the set { 1 , 2 , 4 , 8 , 1 6 , 3 2 } . Since it is wrong, the answer usually is not far from it, and so I answered 7 and got it correct.
Problem Loading...
Note Loading...
Set Loading...
Note that S = {20, 31, 37, 40, 42, 43, 44} works. To see this, we first note that if there exists two subsets of S whose sums of elements are equal, then we can remove the overlapping elements from each subset and still obtain two subsets of S with the same sum. So S does not fulfil the criteria in the question if and only if there exists two disjoint subsets of S with the same sum. Let the size of two disjoint subsets of S be a and b, where a ≥ b . Consider all possible (a,b). Note that since the sum of all elements in S is odd but the total sum of the two equal subsets is even, then a + b cannot be 7. The individual cases are analysed below:
(1,1): Clearly, there is no such pair of subsets.
(2,1): The minimum sum of two-element subsets is 51, which exceed 44. So there is no such pair of subsets.
(2,2): Clearly, the two subsets will have to be {c,d} and {e,f} where c < e < f < d. A simple exhaustive search shows that no such pair of subsets exists.
(3,1): The minimum sum of three-element subsets is 88, which exceed 44. So there is no such pair of subsets.
(3,2): The minimum sum of three-element subsets is 88, which exceed 44+43=87. So there is no such pair of subsets.
(3,3): The sum of the elements in S is 257. So the element that is left out of these two disjoint sets must be odd. A simple exhaustive search (where we leave out each of the 3 odd terms in turn) shows that no such pair of subsets exists.
(4,1): The minimum sum of four-element subsets is 128, which exceed 44. So there is no such pair of subsets.
(4,2): The minimum sum of four-element subsets is 128, which exceed 44+43=87. So there is no such pair of subsets.
(5,1): The minimum sum of five-element subsets is 170, which exceed 44. So there is no such pair of subsets.
Thus, this set with n = 7 has the property that all its subsets have distinct sums.
We now try to show that n ≤ 7 . The maximum possible sum of any subset is 1 + 2 + ... + 45 = 45(23) = 1035. So there are altogether at most 1035 possible distinct subset sums. For any set with at least 11 terms, the number of non-empty subsets is at least 2 1 1 − 1 = 2 0 4 7 > 1 0 3 5 , so by the pigeonhole principle, there must exist at least a pair of subsets with the same sum. Thus n ≤ 1 0 . When n = 10, the maximum subset sum is 36 + 37 + ... + 45 = 405. But there are 2 1 0 − 1 = 1 0 2 3 non-empty subsets, so there must exist at least a pair of subsets with the same sum. When n = 9, the maximum subset sum is 37 + 38 + ... + 45 = 369. But there are 2 9 − 1 = 5 1 1 non-empty subsets, so there must exist at least a pair of subsets with the same sum. When n = 8, the number of subsets with 1, 2, 3, 4 or 5 terms is ( 1 8 ) + ( 2 8 ) + ( 3 8 ) + ( 4 8 ) + ( 5 8 ) = 2 1 8 . But the maximum subset sum for these subsets is 41 + 42 + 43 + 44 + 45 = 215. So there must exist at least a pair of subsets (among the 218) with the same sum.
Therefore, we have n ≤ 7 . Since we have already shown that there exists a set with n = 7 with distinct subset sums, then the largest possible value of n is 7.