Adjacent-pair block functions: sensitivity versus block sensitivity #
[AB07], Chapter 11 Exercise 2 (web draft 2007-01-08, printed page 218 / PDF page 234),
partitions n input bits into ⌊√n⌋ contiguous blocks of about √n bits each and accepts
when some block has exactly two adjacent true bits and all its other bits are false. Its
sensitivity is Θ(√n) while its block sensitivity, certificate complexity and decision-tree
complexity are Θ(n).
The formal function adjacentPairSqrt n uses k = Nat.sqrt n blocks with sizes
n / k + [i < n % k] (sqrtBlockSizes), laid out consecutively, so every length is covered and
not just squares. Adjacency is linear within a block, with overlapping choices allowed: 0110
in a four-bit block is accepted. Small lengths follow the same definition: for n = 0 there are
no blocks and the function is constantly false, and for 1 ≤ n ≤ 3 there is one block of n
bits. The quantitative bounds below are stated for n ≥ 4, where every block has at least two
bits. Measures are CSLib's native sensitivity, blockSensitivity, certificateComplexity
and DecisionTree.complexity.
Main definitions #
Cslib.BitString.adjacentPairSqrt: the exercise function onnbits.
Main results #
Cslib.BitString.sqrt_le_sensitivity_adjacentPairSqrt,Cslib.BitString.sensitivity_adjacentPairSqrt_le:⌊√n⌋ ≤ s(f_n) ≤ 3⌊√n⌋.Cslib.BitString.card_le_three_mul_blockSensitivity_adjacentPairSqrt:n ≤ 3 bs(f_n).Cslib.BitString.adjacentPairSqrt_measures: the full chain⌊√n⌋ ≤ s ≤ 3⌊√n⌋,n ≤ 3 bs,bs ≤ C ≤ D ≤ n.
The bounds give s(f_n) = Θ(√n) and bs(f_n) = C(f_n) = D(f_n) = Θ(n). No exact formulas
for these measures (for instance D(f_n) = n) are claimed.
On the empty input length there are no blocks and the function rejects.
Sensitivity lower bound: ⌊√n⌋ ≤ s(f_n) for n ≥ 4.
Sensitivity upper bound: s(f_n) ≤ 3⌊√n⌋ for every n.
Block-sensitivity lower bound: n ≤ 3 bs(f_n) for n ≥ 4.
Arora–Barak Chapter 11 Exercise 2. For n ≥ 4, with k = Nat.sqrt n,
k ≤ s(f_n) ≤ 3k, n ≤ 3 bs(f_n) and bs(f_n) ≤ C(f_n) ≤ D(f_n) ≤ n. Hence
s(f_n) = Θ(√n) while bs(f_n), C(f_n) and D(f_n) are Θ(n).