Equality, greater-than, inner product and disjointness #
Every Boolean function of Alice's n bits and Bob's input has a protocol with n + 1 bits: Alice
sends her input and Bob announces the value (Protocol.ecomplexityFun_le_succ). Four classical
functions of two n-bit strings need all n + 1 bits for 0 < n
Kushilevitz and Nisan, Chapter 1:
- equality
x = y(equality,ecomplexity_equality); - greater-than
y < x, reading bit strings as binary numerals (greaterThan,ecomplexity_greaterThan); - the inner product
x ⬝ᵥ ymodulo two, the Hadamard codeBitString.hadamardCode(ecomplexity_dotProduct); - disjointness of the sets of positions where
xandyaretrue(disjointness,ecomplexity_disjointness).
Equality, greater-than and disjointness have fooling sets of 2 ^ n pairs: the diagonal pairs
(x, x) for equality and greater-than (isFoolingSet_equality, isFoolingSet_greaterThan) and
the complementary pairs (x, !x) for disjointness (isFoolingSet_disjointness). For the inner
product, a rectangle on which it is constant has at most 2 ^ n entries
(BitString.card_mul_le_two_pow_of_hadamardCode_eq, from Lindsey's lemma), while it is false on
2 ^ (n - 1) (2 ^ n + 1) pairs and true on 2 ^ (n - 1) (2 ^ n - 1) pairs; the area bound then
forces more than 2 ^ n leaves (two_pow_lt_leaves_of_run_eq_dotProduct).
Main definitions #
Cslib.Communication.equality,Cslib.Communication.greaterThan,Cslib.Communication.disjointness: equality, greater-than and disjointness.
Main results #
Cslib.Communication.ecomplexity_equality,Cslib.Communication.ecomplexity_greaterThan,Cslib.Communication.ecomplexity_dotProduct,Cslib.Communication.ecomplexity_disjointness: equality, greater-than, inner product and disjointness ofnbits needn + 1bits.
References #
Equality and greater-than #
Equality: equality x y is true exactly when x = y.
Instances For
Greater-than: greaterThan x y is true exactly when y < x.
Instances For
The diagonal pairs form a fooling set for equality with value true.
For an injective map e into a linear order, the diagonal pairs form a fooling set for
greater-than after e, with value false.
In a partial order, the diagonal pairs form a fooling set for ≤ with value true, by
antisymmetry.
Equality on a finite set needs more than log₂ of its size bits: a protocol computing
equality on a set of at least two elements sends d bits with |X| < 2 ^ d. The exact cost,
⌈log₂ |X|⌉ + 1, is ecomplexityFun_equality.
Greater-than on a finite linear order needs more than log₂ of its size bits: a protocol
computing greater-than on a linear order of at least two elements sends d bits with
|X| < 2 ^ d.
Equality of n bits needs n + 1 bits, for 0 < n. This is the case of bit strings of
ecomplexityFun_equality, the exact cost of equality on any finite set.
Greater-than of n-bit numbers needs n + 1 bits, for 0 < n: reading bit strings as
binary numerals (BitString.equivFin), deciding whether Alice's number exceeds Bob's needs
n + 1 bits.
Disjointness #
Disjointness: disjointness x y is true exactly when no position is true in both x and
y, that is, when the sets of positions where x and y are true are disjoint.
Instances For
The pairs (x, !x) form a fooling set for disjointness with value true.
Disjointness of n bits needs n + 1 bits, for 0 < n.
Inner product #
A nonzero bit string has inner product true with exactly half of all bit strings, and the
zero string with none.
The inner product needs more than 2 ^ k leaves: a protocol computing the inner product
modulo two of two k-bit strings, for 0 < k, has more than 2 ^ k leaves.