We study memory-bounded algorithms for the $k$-secretary problem. The algorithm of Kleinberg (SODA 2005) achieves an optimal competitive ratio of $1 - O(1/\sqrt{k})$, yet a straightforward implementation requires $Ω(k)$ memory. Our main result is a $k$-secretary algorithm that matches the optimal competitive ratio using $O(\log k)$ words of memory. We prove this result by establishing a general reduction from $k$-secretary to (random-order) quantile estimation, the problem of finding the $k$-th largest element in a stream. We show that a quantile estimation algorithm with an $O(k^α)$ expected error (in terms of the rank) gives a $(1 - O(1/k^{1-α}))$-competitive $k$-secretary algorithm with $O(1)$ extra words. We then introduce a new quantile estimation algorithm that achieves an $O(\sqrt{k})$ expected error bound using $O(\log k)$ memory. Of independent interest, we give a different algorithm that uses $O(\sqrt{k})$ words and finds the $k$-th largest element exactly with high probability, generalizing a result of Munro and Paterson (1980).
翻译:我们研究 $k$-秘书问题的内存受限算法。Kleinberg(SODA 2005)提出的算法达到了 $1 - O(1/\sqrt{k})$ 的最优竞争比,但其直接实现需要 $Ω(k)$ 的内存量。我们的主要结果是一个 $k$-秘书算法,该算法通过使用 $O(\log k)$ 个词(words)的内存即可匹配最优竞争比。我们通过建立一个从 $k$-秘书问题到(随机顺序)分位数估计(即寻找流中第 $k$ 大元素的问题)的通用归约来证明这一结果。我们证明,一个期望误差(按秩排序)为 $O(k^α)$ 的分位数估计算法,可借助 $O(1)$ 个额外词得到一个 $(1 - O(1/k^{1-α}))$-竞争的 $k$-秘书算法。随后,我们引入一种新的分位数估计算法,该算法在 $O(\log k)$ 内存下可实现 $O(\sqrt{k})$ 的期望误差界。值得一提的是,我们还给出了一种不同的算法,该算法使用 $O(\sqrt{k})$ 个词,并高概率精确找出第 $k$ 大元素,从而推广了 Munro 和 Paterson(1980)的结果。