The even case can be handled in the same way as Solution 1. For the odd case, we prove by induction on n.
Firstly, for n=3, we may assume without loss of generality a1⩾a2⩾a3⩾0 and b1=a1−1 (if b1=1−a1, we may replace each bk by −bk).
- Case 1. b2=a2−1 and b3=a3−1, in which case we take (x1,x2,x3)=(1,−1,1).
Let c=a1−a2+a3 so that 0⩽c⩽1. Then ∣b1−b2+b3∣=∣a1−a2+a3−1∣=1−c and hence ∣c∣+∣b1−b2+b3∣=1.
- Case 2. b2=1−a2 and b3=1−a3, in which case we take (x1,x2,x3)=(1,−1,1).
Let c=a1−a2+a3 so that 0⩽c⩽1. Since a3⩽a2 and a1⩽1, we have
c−1⩽b1−b2+b3=a1+a2−a3−1⩽1−c.
This gives ∣b1−b2+b3∣⩽1−c and hence ∣c∣+∣b1−b2+b3∣⩽1.
- Case 3. b2=a2−1 and b3=1−a3, in which case we take (x1,x2,x3)=(−1,1,1).
Let c=−a1+a2+a3. If c⩾0, then a3⩽1 and a2⩽a1 imply
c−1⩽−b1+b2+b3=−a1+a2−a3+1⩽1−c
If c<0, then a1⩽a2+1 and a3⩾0 imply
−c−1⩽−b1+b2+b3=−a1+a2−a3+1⩽1+c.
In both cases, we get ∣−b1+b2+b3∣⩽1−∣c∣ and hence ∣c∣+∣−b1+b2+b3∣⩽1.
- Case 4. b2=1−a2 and b3=a3−1, in which case we take (x1,x2,x3)=(−1,1,1).
Let c=−a1+a2+a3. If c⩾0, then a2⩽1 and a3⩽a1 imply
c−1⩽−b1+b2+b3=−a1−a2+a3+1⩽1−c.
If c<0, then a1⩽a3+1 and a2⩾0 imply
−c−1⩽−b1+b2+b3=−a1−a2+a3+1⩽1+c.
In both cases, we get ∣−b1+b2+b3∣⩽1−∣c∣ and hence ∣c∣+∣−b1+b2+b3∣⩽1.
We have found x1,x2,x3 satisfying (1) in each case for n=3.
Now, let n⩾5 be odd and suppose the result holds for any smaller odd cases. Again we may assume ak⩾0 for each 1⩽k⩽n. By the Pigeonhole Principle, there are at least three indices k for which bk=ak−1 or bk=1−ak. Without loss of generality, suppose bk=ak−1 for k=1,2,3. Again by the Pigeonhole Principle, as a1,a2,a3 lies between 0 and 1, the difference of two of them is at most 21. By changing indices if necessary, we may assume 0⩽d=a1−a2⩽21.
By the inductive hypothesis, we can choose x3,x4,…,xn such that a′=∑k=3nxkak and b′=∑k=3nxkbk satisfy ∣a′∣+∣b′∣⩽1. We may further assume a′⩾0.
- Case 1. b′⩾0, in which case we take (x1,x2)=(−1,1).
We have ∣−a1+a2+a′∣+∣−(a1−1)+(a2−1)+b′∣=∣−d+a′∣+∣−d+b′∣⩽max{a′+b′−2d,a′−b′,b′−a′,2d−a′−b′}⩽1 since 0⩽a′,b′,a′+b′⩽1 and 0⩽d⩽21.
- Case 2. 0>b′⩾−a′, in which case we take (x1,x2)=(−1,1).
We have ∣−a1+a2+a′∣+∣−(a1−1)+(a2−1)+b′∣=∣−d+a′∣+∣−d+b′∣. If −d+a′⩾0, this equals a′−b′=∣a′∣+∣b′∣⩽1. If −d+a′<0, this equals 2d−a′−b′⩽2d⩽1.
- Case 3. b′<−a′, in which case we take (x1,x2)=(1,−1).
We have ∣a1−a2+a′∣+∣(a1−1)−(a2−1)+b′∣=∣d+a′∣+∣d+b′∣. If d+b′⩾0, this equals 2d+a′+b′<2d⩽1. If d+b′<0, this equals a′−b′=∣a′∣+∣b′∣⩽1.
Therefore, we have found x1,x2,…,xn satisfying (1) in each case. By induction, the property holds for all odd integers n⩾3.