English

Optimal Online Discrepancy Minimization in Linear Time

Data Structures and Algorithms 2026-07-05 v1

Abstract

We provide an online algorithm with the following guarantee: for any fixed sequence of vectors v1,,vTRdv_1,\dots,v_T \in \mathbf{R}^d with vi21\|v_i\|_2\le 1, the algorithm assigns each arriving vector vtv_t a random sign εt\varepsilon_t such that every prefix sum i=1tεivi\sum_{i=1}^t \varepsilon_i v_i can be written as the sum of three coupled standard Gaussian vectors. Our algorithm runs in O(dT)O(dT) time and achieves the optimal prefix discrepancy bound max1tTi=1tεivi=O(logT), \max_{1 \le t \le T}\left\| \sum_{i=1}^t \varepsilon_i v_i \right\|_\infty = O\left( \sqrt{\log T} \right), with high probability. This recovers the optimal bound of Kulkarni, Reis, and Rothvoss, whose algorithm runs in time exponential in TT and dd. The algorithm and main proof were discovered in a GPT-5.5 Pro Extended conversation prompted by the author.

Cite

@article{arxiv.2607.04388,
  title  = {Optimal Online Discrepancy Minimization in Linear Time},
  author = {Ishaq Aden-Ali},
  journal= {arXiv preprint arXiv:2607.04388},
  year   = {2026}
}

Comments

8 pages. Comments welcome!