# Zero joint subsums of integers

Fix integers $x_1,y_1,\ldots,x_{10},y_{10}\in [-2,2]$ such that $$\sum x_i=\sum y_i=0\,.$$

Then, does it necessarily exist a nonempty proper subset $J$ of $\{1,\ldots,10\}$ such that $$\sum_{j \in J} x_j=\sum_{j \in J} y_j=0\,?$$

• Have you investigated the situation with 10 replaced by smaller values? Commented Jun 8, 2017 at 23:15
• For $\{1,\dots,9\}$ this is not true.
– san
Commented Jun 9, 2017 at 5:37
• @san Do you have a reference for that? A list of counterexamples? Thanks! Commented Jun 9, 2017 at 6:18
• I can give you a counterexample for $9$: the vector of all $x$ is $(-2,1,1,0,0,0,0,0,0)$ and the vector of all $y$ is $(2,2,2,-1,-1,-1,-1,-1,-1)$. Commented Jun 9, 2017 at 11:41
• @ikbuzsak You don't have to check all pairs, you can assume that for example the $x_i$ are ordered, so you have to check $55\times 856945$ pairs.
– san
Commented Jun 9, 2017 at 18:11

I found thousands of counter examples by using a java code which I'm gonna give at the end (I hope that the code is true because it was just brute force) one counter-ex:

## [2, 2, -2, -1, -2, -1, -1, 2, -1, 2]

which can be seen easily (I chose this one as easiest) Because two sequence have 4 common 2's, and for each -1 of second sequence there is -2 in the first sequence with corresponding indices

So, I think you see what I see :)

some other counter examples:

[-2, 2, 0, -1, 0, 2, -2, 0, -1, 2]

## [2, -1, 1, -2, 1, -1, 2, 1, -2, -1]

//////////////

[2, -2, -2, 1, -2, -2, 2, -1, 2, 2]

## [-2, 1, 1, -2, 1, 1, 2, -2, 2, -2]

And here is the code with a lot brute force:

It is a bit messy but you can arrange the indentation if you want to run the code

import java.util.; import java.io.;

public class numbers {

public static void main(String[] args) {
ArrayList<int[]> myList = new ArrayList<int[]>() ;
Random gen= new Random();
while (myList.size()<90045){
int[] arr = new int[10];
boolean itsdone = false ;
for (int i=0; i<10 ; i++){
arr[i]=gen.nextInt(5)-2;
}
while (myList.contains(arr) || (summ(arr)!=0) ){
for (int i=0; i<10 ; i++){
arr[i]=gen.nextInt(5)-2;
}
}
if (!myList.contains(arr) && summ(arr)==0 )
System.out.println(myList.size());
}
for (int i=0 ; i<myList.size();i++){
for (int j=i; j<myList.size();j++)
compareArr(myList.get(i),myList.get(j));
}


} public static int summ(int[] arr) {

    int summ=0;
for (int i=0; i<arr.length ; i++)
summ+=arr[i];
return summ;

}


public static boolean compareArr(int[] arr1,int[] arr2){ for (int i=0; i<10 ; i++){ if (arr1[i]==0 && arr2[i]==0) return true; for (int j=i+1; j<10 ; j++){ if ((arr1[i]+arr1[j]==0) && (arr2[i]+arr2[j])==0) return true; for (int k=j+1; k<10 ; k++){ if ((arr1[i]+arr1[j]+arr1[k]==0) && (arr2[i]+arr2[j]+arr2[k])==0) return true; for (int t=k+1; t<10 ; t++){ if ((arr1[i]+arr1[j]+arr1[k]+arr1[t]==0) && (arr2[i]+arr2[j]+arr2[k]+arr2[t])==0) return true; for (int m=t+1; m<10 ; m++){ if ((arr1[i]+arr1[j]+arr1[k]+arr1[t]+arr1[m]==0) && (arr2[i]+arr2[j]+arr2[k]+arr2[t]+arr2[m])==0) return true; for (int n=m+1; n<10 ; n++){ if ((arr1[i]+arr1[j]+arr1[k]+arr1[t]+arr1[m]+arr1[n]==0) && (arr2[i]+arr2[j]+arr2[k]+arr2[t]+arr2[m]+arr2[n])==0) return true; for (int a=n+1; a<10 ; a++){ if ((arr1[i]+arr1[j]+arr1[k]+arr1[t]+arr1[m]+arr1[n]+arr1[a]==0) && (arr2[i]+arr2[j]+arr2[k]+arr2[t]+arr2[m]+arr2[n]+arr2[a])==0) return true; for (int b=a+1; b<10 ; b++){ if ((arr1[i]+arr1[j]+arr1[k]+arr1[t]+arr1[m]+arr1[n]+arr1[a]+arr1[b]==0) && (arr2[i]+arr2[j]+arr2[k]+arr2[t]+arr2[m]+arr2[n]+arr2[a]+arr2[b])==0) return true; for (int c=b+1; c<10 ; c++){ if ((arr1[i]+arr1[j]+arr1[k]+arr1[t]+arr1[m]+arr1[n]+arr1[a]+arr1[b]+arr1[c]==0) && (arr2[i]+arr2[j]+arr2[k]+arr2[t]+arr2[m]+arr2[n]+arr2[a]+arr2[b]+arr2[c])==0) return true;

                }   */
}
}
}
}
}
}
}
}
}
System.out.println(Arrays.toString(arr1));
System.out.println(Arrays.toString(arr2));
System.out.println("--------------");
return false;

}
}


(Added by PL) Countexamples for $x_1,y_1,\ldots,x_{11},y_{11}$ (see comments below):

[0, -2, -2, -2, -2, 1, 2, 1, 1, 2, 1] [-2, -1, -1, -1, -1, 2, -1, 2, 2, -1, 2]

[0, 1, -2, -2, 0, 2, -2, -2, 1, 2, 2] [1, -2, -1, -1, 1, 2, -1, -1, -2, 2, 2]

[1, -1, -2, -1, -2, 2, -1, 2, 1, -1, 2] [0, 2, -1, 2, -1, -2, 2, -2, 0, 2, -2]

Countexamples for $x_1,y_1,\ldots,x_{12},y_{12}$:

[2, 2, 2, 2, -1, -2, -1, 2, -2, -2, 0, -2] [-1, -1, -1, -1, -2, 2, -2, -1, 2, 2, 1, 2] [-2, -1, 2, -2, -1, 2, -1, 2, -1, -1, 1, 2] [1, -2, 2, 1, -2, 2, -2, 2, -2, -2, 0, 2]

Countexamples for $x_1,y_1,\ldots,x_{13},y_{13}$:

[-2, -2, 2, 2, -1, 2, -1, -1, -1, 2, -1, 2, -1] [1, 1, 2, 2, -2, 2, -2, -2, -2, 2, -2, 2, -2]

• That was quite unexpected. Could you try it with 11? It is just curiosity, at this point :) Commented Jun 10, 2017 at 11:54
• [0, -2, -2, -2, -2, 1, 2, 1, 1, 2, 1] [-2, -1, -1, -1, -1, 2, -1, 2, 2, -1, 2] -------------- [0, 1, -2, -2, 0, 2, -2, -2, 1, 2, 2] [1, -2, -1, -1, 1, 2, -1, -1, -2, 2, 2] ------------- [1, -1, -2, -1, -2, 2, -1, 2, 1, -1, 2] [0, 2, -1, 2, -1, -2, 2, -2, 0, 2, -2] Commented Jun 10, 2017 at 11:59
• These are some of counter-ex Commented Jun 10, 2017 at 11:59
• Merdanov, great. Can you find the largest number you can substitute? Commented Jun 10, 2017 at 12:01
• It's very hard to write for me such a code right now. My code has no tricky algorithm but just brute force .But there are thousands of counte-exs from the cases n=10,11 which makes me feel if there is such a number satisfying this question, it's more than 500 Commented Jun 10, 2017 at 12:06