Documentation

CslibFrontier.Computability.QueryComplexity.AdjacentPair

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 #

Main results #

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.

The function of [AB07], Chapter 11 Exercise 2, on n bits: accept when one of the Nat.sqrt n balanced contiguous blocks contains exactly two adjacent true bits and no other true bit.

@[simp]

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).