Online Pen Testing

Mingda Qiao, Gregory Valiant

Abstract

This paper introduces the "Online Pen Testing" problem, a novel framework for decision-making where the act of evaluating an option (e.g., testing a pen's ink) inherently reduces its remaining value. This destructive cost creates a fundamental tension between gathering information and preserving utility. The authors analyze this problem across various settings, including Prophet and Secretary models, and prove that a logarithmic competitive ratio of $O(\log n)$ is achievable even with minimal information. By developing novel techniques such as "bucketing by tails" and a "bit sampling game," the research establishes tight asymptotic bounds for most variants of the problem, quantifying the fundamental cost of destructive testing.

Introduction

In classical "optimal stopping" problems, such as the Secretary Problem, a decision-maker observes the value of an option and must immediately decide whether to accept it or move on. A core assumption in these models is that observation is "free."

In the real world, however, information often comes at a cost. The authors use the analogy of choosing a whiteboard pen: to see if it works, you must write with it. If you write for only five seconds, you cannot tell if it has ten seconds or twenty minutes of ink left. If you write for ten minutes to be sure, you might exhaust the very ink you intended to use. This "pen testing" problem models scenarios where obtaining information is destructive, such as testing the service life of a fragile spare part or evaluating a startup's growth potential while "watching from the sidelines," which effectively reduces eventual return on investment. The challenge is to find the optimal balance between testing enough to identify quality and preserving enough value to be useful.

Methodology

The authors analyze the problem under two standard frameworks:

  1. The Prophet Setting: Each pen's ink level is drawn independently from a known (or partially known) distribution.
  2. The Secretary Setting: The ink levels are fixed values, but they arrive in either a random or an adversarial order.

Key Techniques

  • Single-Threshold Algorithms: For i.i.d. distributions, the authors show that picking a single threshold $\theta$, testing every pen at that level, and accepting the first one that passes is surprisingly effective.
  • Bucketing by Tails: For the general Prophet case where distributions differ, they group distributions based on their "tails" (the probability of having high ink levels) and use randomized thresholds to select the best group.
  • The Bit Sampling Game: To handle the Secretary setting with an adversarial order, the authors developed a novel "bit sampling" abstraction. By tracking the "drift" between observed 0s and 1s in a sequence, they designed a strategy that wins with constant probability.
  • Single-Sample Prophet Inequality: The algorithm does not require a full description of the distributions; a single sample from each is sufficient to maintain the $O(\log n)$ guarantee.

Key Insights and Ideas

  • The Logarithmic Penalty: Unlike the standard Secretary Problem (where one can get within $1/e \approx 37\%$ of the best value), the destructive nature of testing imposes a fundamental logarithmic barrier. Generally, one cannot do better than an $O(\log n)$ factor away from the optimum.
  • Information vs. Utility: Testing provides a single bit of information (Pass/Fail) at a linear cost. This paper quantifies exactly how much that bit is worth in terms of utility loss.
  • The "Gap" Phenomenon: In the random-order secretary case with full information, a "gap" (an interval with no values) almost always exists among the top values. Exploiting this gap allows for a slightly improved competitive ratio of $\Theta(\frac{\log n}{\log \log n})$.
  • Robustness of Simple Strategies: Even when the arrival order is adversarial and the maximum value is only roughly estimated, a randomized threshold strategy remains robust.

Results

The paper establishes the optimal competitive ratios (up to constant factors) for almost all variants of the problem. The authors proved that the $\Omega(\log n)$ lower bound is "tight"—it represents the fundamental cost of destructive testing.

Table of competitive ratios for various Online Pen Testing settings.

As shown in the results, the competitive ratio remains logarithmic across most scenarios, except for the trivial case of an arbitrary order with no information, where the ratio scales linearly with $n$.

Discussion and Future Work

While the paper pins down the asymptotic behavior ($\Theta(\log n)$), it does not identify the exact optimal constants. Future research could explore:

  • Multiple Selection: Extending the model to picking $k$ pens or satisfying complex combinatorial constraints (e.g., Matroid Secretary problems).
  • Smoothed Feedback: Formulating a model where feedback is not binary (Pass/Fail) but "smoothed" (e.g., observing the ink starting to fade).
  • General Cost Functions: Exploring cases where the cost of testing is non-linear or varies between items.

Summary updated

BibTeX
@inproceedings{qiao2023online,
  author = {Mingda Qiao and Gregory Valiant},
  title = {{Online Pen Testing}},
  booktitle = {ITCS},
  year = {2023},
  doi = {10.4230/lipics.itcs.2023.91},
}
Figure