Testing strict majority by sampling #
The probe-bound step of [Goldreich2007DraftR5, Exercise 10.9, p. 498] samples independently with replacement from a power-of-two range, treating out-of-range positions as zeros. The test compares the observed fraction of ones to a threshold between the minimum member density and the maximum density allowed by the farness promise. A nonmember can reach strict majority by changing just enough zeros to ones, so being far implies a gap in density even when the input length is odd.
The proof uses Hoeffding concentration and the existing local-test decision-tree semantics.
Each probe uses a block of Nat.log 2 n + 1 fair bits. The decision-tree model
does not certify running time in the direct-access model of Definition 10.10.
Main definitions #
Cslib.BitString.majorityTester: the local test with a rational tolerance.Cslib.BitString.majoritySampleAccepts: the natural number comparison used after sampling.
Main results #
Cslib.BitString.majorityTester_spec: completeness, soundness and worst-case probe cost.Cslib.BitString.majorityTester_passes_iff_sampleAccepts: a pointwise bridge from binary addresses and a sampled count to the local test's verdict.Cslib.BitString.exists_majorityTester_probeBound: a fixed probe count works at every length for each positive real distance.
Sample one binary address per probe. For an out-of-range address the query uses index zero and its answer is discarded. Accept when the resulting fraction of ones is at least the minimum padded member density minus one quarter of the tolerance.
For each fixed seed, counting ones returned at its binary addresses (with out-of-range addresses answered by zero) and applying the natural comparison gives the same verdict as the local test.
With 16 ≤ k δ², every seed probes at most k positions. The test accepts members
with probability at least 2/3 and accepts inputs at relative Hamming distance at least
δ from every member with probability at most 1/3.
The probe-bound step for strict majority gives one budget at all lengths for every positive
real distance. Probabilities are
over the uniform seed of k blocks of Nat.log 2 n + 1 fair bits. At length zero the tree
rejects without querying.