English

Online Pen Testing

Data Structures and Algorithms 2022-11-23 v2 Computer Science and Game Theory

Abstract

We study a "pen testing" problem, in which we are given nn pens with unknown amounts of ink X1,X2,,XnX_1, X_2, \ldots, X_n, and we want to choose a pen with the maximum amount of remaining ink in it. The challenge is that we cannot access each XiX_i directly; we only get to write with the ii-th pen until either a certain amount of ink is used, or the pen runs out of ink. In both cases, this testing reduces the remaining ink in the pen and thus the utility of selecting it. Despite this significant lack of information, we show that it is possible to approximately maximize our utility up to an O(logn)O(\log n) factor. Formally, we consider two different setups: the "prophet" setting, in which each XiX_i is independently drawn from some distribution Di\mathcal{D}_i, and the "secretary" setting, in which (Xi)i=1n(X_i)_{i=1}^n is a random permutation of arbitrary a1,a2,,ana_1, a_2, \ldots, a_n. We derive the optimal competitive ratios in both settings up to constant factors. Our algorithms are surprisingly robust: (1) In the prophet setting, we only require one sample from each Di\mathcal{D}_i, rather than a full description of the distribution; (2) In the secretary setting, the algorithm also succeeds under an arbitrary permutation, if an estimate of the maximum aia_i is given. Our techniques include a non-trivial online sampling scheme from a sequence with an unknown length, as well as the construction of a hard, non-uniform distribution over permutations. Both might be of independent interest. We also highlight some immediate open problems and discuss several directions for future research.

Cite

@article{arxiv.2210.00655,
  title  = {Online Pen Testing},
  author = {Mingda Qiao and Gregory Valiant},
  journal= {arXiv preprint arXiv:2210.00655},
  year   = {2022}
}

Comments

To appear at ITCS 2023; v2 added discussion on a closely related work of Awerbuch, Azar, Fiat, and Leighton (1996)

R2 v1 2026-06-28T02:34:17.329Z