Missing-value search by deficient value intervals

ID: missing-value-search-by-deficient-value-intervals

Suppose a candidate integer interval contains possible values and an active array segment contains exactly all occurrences from that interval, with entries. The pigeonhole principle guarantees a missing value. Split the value interval into widths and use array partitioning to obtain occurrence counts . If , retain the left side. Otherwise , so retain the right side. This works with duplicate entries because it needs only the inequality between occurrences and possible values.
Balancing the value widths gives , while the active scan length remains less than . The total work is bounded by a geometric series and logarithmic loop overhead, hence time complexity. On reaching width one, the retained occurrence count is zero, proving that the sole candidate is absent globally. This is a binary search over deficient value intervals, with local in-place array partitioning, rather than repeated full-array scans.

New to topics? Read the docs here!