State grid (2^N cells)Coverage vs. tests
Tested state Untested state Live coverage (sim) Theory: n(1−(1−1/n)^t)

Coupon Collector: Feature Flag Coverage Lab

Every boolean feature flag an app carries multiplies the number of distinct configurations a user could actually be running by two, so N flags produce a state space of n = 2^N combinations. Testing those combinations by picking one at random each time is mathematically identical to the classical coupon collector's problem, and it has an exact closed-form prediction: after t independent random tests, the expected number of distinct states covered is n·(1 − (1 − 1/n)^t), and the expected number of tests needed to cover every single state is n·H_n (n times the n-th harmonic number). This simulator runs the random test process live — lighting up cells in a 2^N state grid as they get hit — while a second panel plots that live coverage curve directly against the closed-form prediction, so you can see the theory and the Monte-Carlo simulation agree in real time. Drag the flag count up and watch the curve's characteristic decelerating shape: the first half of the state space fills quickly, but the last handful of "dark corner" combinations take disproportionately many additional tests to ever get exercised — the precise reason real flag-management platforms push teams toward targeted pairwise testing instead of hoping random test runs eventually find every corner.