Skip to main content
1 of 4
Max Alekseyev
  • 34.5k
  • 5
  • 74
  • 154

I've verified the statement for all $k\leq 25$ with the following greedy algorithm combined with (multiple) initial random shufflings.

Greedy algorithm. Given an ordered list with $k$ values of $x$'s, we start with $s=0$, and at each of $k$ steps we extract and add to $s$ the first element $v$ from the list such that $-1<s+v<1$. The algorithm succeeds if we are able to extract all $k$ elements from the list, and fails otherwise (when at some step a suitable element does not exist).

From Fedor's observation it follows that for a fixed $k$, we can restrict our attention to values $x_1 = \frac{m}{2^k-1}$ for $m\equiv 2\pmod4$ in the interval $[2,2^k-2]$ and the sequences of $x_i$ emerging from them. For each such sequence, we try the greedy algorithm on its various random shufflings until one succeeds.

It's worth to note that for each $k$ the maximum of numbers of random shufflings (for different values of $m$) used in my computation was about $2^{k/2}$, while their average was bounded by $k\log(k)^2$ or alike.

PS. The order of nonincreasing absolute values suggested by Alex Ravsky above works well for a noticeable fraction of sequences and can be used before going into random orders, although this fraction decreases as $k$ grows.

Max Alekseyev
  • 34.5k
  • 5
  • 74
  • 154