English

The online monotone array completion problem

Data Structures and Algorithms 2026-06-30 v1 Probability

Abstract

Consider the following online filling game. An array of length nn is initially empty. At each time step one observes an independent sample from Unif[0,1]\mathrm{Unif}[0,1] and must either discard it or place it irrevocably into an empty position of the array, while preserving the constraint that the occupied entries are non-decreasing from left to right. Among all possible strategies, what is the optimal expected time required to fill the array? Let vnv_n denote this optimal expected completion time. Our main result determines vnv_n up to lower-order terms: vn=(12+o(1))nlogn. v_n=\left(\frac12+o(1)\right)n\log n. More precisely, no strategy, even if randomized and adaptive, can have expected completion time below (12o(1))nlogn\left(\frac12-o(1)\right)n\log n, while we provide an explicit deterministic strategy whose expected completion time is at most (12+o(1))nlogn\left(\frac12+o(1)\right)n\log n. For comparison, the natural coupon-collector strategy, which partitions [0,1][0,1] into nn equal intervals and reserves one array position for each interval, has expected completion time (1+o(1))nlogn(1+o(1))n\log n. We also consider a with-replacement version of the game, in which previously placed entries may be overwritten. For this variant, we give a deterministic strategy with expected completion time O(nlogn)O(n\sqrt{\log n}), thereby establishing a separation between the two models.

Cite

@article{arxiv.2606.32015,
  title  = {The online monotone array completion problem},
  author = {Vishesh Jain and Dylan King and Clayton Mizgerd},
  journal= {arXiv preprint arXiv:2606.32015},
  year   = {2026}
}