English

Optimal $k$-Secretary with Logarithmic Memory

Data Structures and Algorithms 2026-05-11 v2

Abstract

We study memory-bounded algorithms for the kk-secretary problem. The algorithm of Kleinberg (SODA 2005) achieves an optimal competitive ratio of 1O(1/k)1 - O(1/\sqrt{k}), yet a straightforward implementation requires Ω(k)\Omega(k) memory. Our main result is a kk-secretary algorithm that matches the optimal competitive ratio using O(logk)O(\log k) words of memory. We prove this result by establishing a general reduction from kk-secretary to (random-order) quantile estimation, the problem of finding the kk-th largest element in a stream. We show that a quantile estimation algorithm with an O(kα)O(k^{\alpha}) expected error (in terms of the rank) gives a (1O(1/k1α))(1 - O(1/k^{1-\alpha}))-competitive kk-secretary algorithm with O(1)O(1) extra words. We then introduce a new quantile estimation algorithm that achieves an O(k)O(\sqrt{k}) expected error bound using O(logk)O(\log k) memory. Of independent interest, we give a different algorithm that uses O(k)O(\sqrt{k}) words and finds the kk-th largest element exactly with high probability, generalizing a result of Munro and Paterson (1980).

Keywords

Cite

@article{arxiv.2502.09834,
  title  = {Optimal $k$-Secretary with Logarithmic Memory},
  author = {Mingda Qiao and Wei Zhang},
  journal= {arXiv preprint arXiv:2502.09834},
  year   = {2026}
}

Comments

To appear at ICALP 2026

R2 v1 2026-06-28T21:43:56.150Z