Papers
Topics
Authors
Recent
Search
2000 character limit reached

The online monotone array completion problem

Published 30 Jun 2026 in cs.DS and math.PR | (2606.32015v1)

Abstract: Consider the following online filling game. An array of length $n$ is initially empty. At each time step one observes an independent sample from $\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 $v_n$ denote this optimal expected completion time. Our main result determines $v_n$ up to lower-order terms: [ 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 $\left(\frac12-o(1)\right)n\log n$, while we provide an explicit deterministic strategy whose expected completion time is at most $\left(\frac12+o(1)\right)n\log n$. For comparison, the natural coupon-collector strategy, which partitions $[0,1]$ into $n$ equal intervals and reserves one array position for each interval, has expected completion time $(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(n\sqrt{\log n})$, thereby establishing a separation between the two models.

Summary

  • The paper establishes that the optimal expected completion time is (1/2 + o(1)) n log n, halving the constant compared to naive strategies.
  • A deterministic block-based strategy is developed that uses gap potential methods to tightly bound performance under global monotonicity constraints.
  • For the with-replacement variant, a patience sorting approach yields O(n√(log n)) expected samples, highlighting a phase transition in complexity.

The Online Monotone Array Completion Problem: Theory and Algorithms

Problem Formulation

The online monotone array completion problem addresses a sequential allocation game wherein an array of length nn is filled, one position at a time, with i.i.d. samples from Unif[0,1]\mathrm{Unif}[0,1]. Each sample can either be irrevocably placed into an empty coordinate or discarded, under the constraint that filled entries must be non-decreasing from left to right. The objective is to minimize the expected total number of samples required to fill the array. The minimal expected completion time is denoted vnv_n.

A with-replacement variant also exists, where entries can be overwritten as long as monotonicity is preserved. The problem is distinct from classical online selection of monotone subsequences since spatial freedom (placement anywhere in the array) fundamentally changes the combinatorial structure and obstruction mechanism.

Main Results

The paper makes several strong claims regarding vnv_n:

  • The optimal expected completion time is vn=(12+o(1))nlognv_n = (\frac{1}{2} + o(1)) n \log n.
  • No randomized, adaptive strategy can achieve expected completion time below (12o(1))nlogn(\frac{1}{2} - o(1)) n \log n.
  • An explicit deterministic strategy achieves completion within (12+o(1))nlogn(\frac{1}{2} + o(1)) n \log n.
  • The "coupon-collector" strategy, which partitions [0,1][0,1] into nn intervals and reserves one position for each, has expected completion time (1+o(1))nlogn(1 + o(1)) n \log n—suboptimal by a factor of two in the leading constant.
  • In the with-replacement model, the expected completion time improves to Unif[0,1]\mathrm{Unif}[0,1]0 under a deterministic strategy, demonstrating a provable separation between the two variants.

These results settle the leading order and constant for Unif[0,1]\mathrm{Unif}[0,1]1, with a sharp separation from the naive coupon-collector approach. The upper–lower bounds are complemented by polynomial tail bounds for completion times.

Proof Outline

Lower Bound: Potential Analysis

The lower bound leverages a potential function Unif[0,1]\mathrm{Unif}[0,1]2 defined over the maximal contiguous blocks of empty positions. Each block is penalized by its capacity minus the available value interval, modulated by a parameter Unif[0,1]\mathrm{Unif}[0,1]3. Conditional on the current configuration, accepted samples trigger one of three block updates:

  • Interior move: Splits a block but cannot improve Unif[0,1]\mathrm{Unif}[0,1]4.
  • Edge move: Fills the block’s boundary, reducing Unif[0,1]\mathrm{Unif}[0,1]5 by at most Unif[0,1]\mathrm{Unif}[0,1]6.
  • Singleton completion: Fills a block of capacity Unif[0,1]\mathrm{Unif}[0,1]7, reducing Unif[0,1]\mathrm{Unif}[0,1]8 by at most Unif[0,1]\mathrm{Unif}[0,1]9.

Samples that can effect a non-zero decrement of vnv_n0 occupy sets of small measure. A crucial technical lemma shows that the expected positive decrement per step is at most vnv_n1, regardless of the strategy. Translating this into progress on a logarithmic scale via vnv_n2, the strategy needs vnv_n3 steps, optimized to yield the vnv_n4 lower bound.

Upper Bound: Block-based Algorithms

The optimal upper bound is achieved via a block-wise generalization of coupon-collector. The array is divided into blocks of size vnv_n5; each block is assigned a value interval and filled only from the ends of the interval, mimicking edge moves. An invariant ensures the acceptance probability of each unfinished block is at least vnv_n6. The array is completed when all blocks are filled, reducing the expected completion time to vnv_n7. The high-probability tail is also polynomial.

For fixed vnv_n8, the leading constant is vnv_n9, asymptotically approaching vnv_n0 for large block size, as verified in the analysis.

With-Replacement Variant

Here, progress is decoupled from the shrinking acceptance intervals. The strategy again divides the array, but now employs patience sorting within blocks—with each sample continually improving the local configuration until all slots are filled. After vnv_n1 local samples, the block is full if the longest increasing subsequence (LIS) among these samples is of length vnv_n2. Tail bounds from the theory of LIS in random permutations are applied to guarantee polynomial failure probability. By appropriate choice of vnv_n3, the completion time becomes vnv_n4.

Implications and Theoretical Significance

The paper's characterization of vnv_n5 up to leading constant addresses a fundamental question in sequential allocation under monotonicity constraints. The optimality proof—robust against adaptive randomness—clarifies the necessity of logarithmic growth and reveals a subtle improvement over the coupon-collector heuristic. The separation between the replacement and non-replacement models elucidates the combinatorial obstruction in monotone array filling: without replacement, completion slows as value intervals shrink, but with replacement, patience sorting allows more rapid convergence.

From a theoretical perspective, these results bridge online selection, combinatorial probability, and adaptive algorithms. They also contribute tail estimates and potential function techniques relevant to other online combinatorial optimization problems. Practically, the strategies illuminate how to design online allocation algorithms with monotone constraints for real-time systems, database completion, and streaming computations.

Connections to Prior Work

The analysis generalizes classical online monotone subsequence selection, initiated by Samuels and Steele (1981), but departs due to the freedom of spatial placement. The connection to online sorting and translational packing of convex polygons highlights broader algorithmic contexts where online placement and monotonicity interact with randomness. The block-based algorithmic paradigm introduced here may influence future work in high-dimensional online sorting and selection.

Open Problems and Future Directions

For the with-replacement variant, tight lower/upper bounds are not yet established; further improvements beyond vnv_n6 and tighter lower bounds remain open. Extensions to arrays under other order constraints (e.g., partial orderings, multidimensional monotonicity) offer promising directions. Adaptation to non-uniform distributions, dependent observations, and randomized array geometries are potential future avenues.

Methodologically, richer potential functions and block-decomposition arguments may generalize to other online selection and dynamic allocation frameworks, presenting new avenues for algorithmic probability and theoretical computer science.

Conclusion

The online monotone array completion problem is rigorously solved up to leading constant for both without-replacement and with-replacement settings. The results provide sharp expected and tail bounds, establish separation between models, and offer block-wise deterministic strategies, advancing both the theory and practical understanding of online allocation under monotonicity constraints (2606.32015). The analysis connects to classical problems while opening doors to new combinatorial and probabilistic optimization directions.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.