I have several arrays of numbers (each element of the array can only take the value 0 or 1), like this
v1: 1; 0; 0; one; one;
v2: 0; one; 0; 0; one;
v3: 1; one; 0; one; 0;
v4: 1; 0; 0; one; 0;
v5: 1; one; 0; one; one;
v6: 1; one; 0; one; one;
I want to find such subsets that when summing arrays, the resulting array has separate elements that are multiples of 2. For example, v1 + v2 + v3 gives a resulting array of 2, 2, 0, 2, 2. The resulting array can have any value that is a multiple of 2.
Another example:
v1: 1, 1, 1, 0, 1, 0
v2: 0, 0, 1, 0, 0, 0
v3: 1, 0, 0, 0, 0, 0
v4: 0, 0, 0, 1, 0, 0
v5: 1, 1, 0, 0, 1, 0
v6: 0, 0, 1, 1, 0, 0
v7: 1, 0, 1, 1, 0, 0
In this example, the answers v1 + v2 + v5 and v3 + v6 + v7 are suitable.
I have a solution for brute force, but I wanted to check if there is a more efficient method. Is this equivalent to the task of summing a subset?