TCSLib

81 Communication Complexity — Func Equality

81.1 Overview

This module establishes the exact deterministic communication complexity of the equality function on \(n\)-bit strings and provides a public-coin upper bound via universal hashing. The two headline results are: the deterministic complexity equals \(0\) when \(n = 0\) and \(n + 1\) otherwise; and the public-coin complexity is at most \(\lceil \log _2(\lceil \varepsilon ^{-1} \rceil + 1)\rceil + 1\) for any error tolerance \(\varepsilon \gt 0\).

81.2 Declarations

Definition 81.1 Equality function on \(n\)-bit strings

For a natural number \(n\), CommunicationComplexity.Functions.Equality.equality is the Boolean function \(\mathrm{equality}_n : \mathrm{BoolInput}\, n \times \mathrm{BoolInput}\, n \to \mathrm{Bool}\) that returns true if and only if Alice’s input \(x\) equals Bob’s input \(y\).

Definition 81.2 Hash space for the equality protocol

\(\mathrm{HashSpace}(n, k)\) is the type of all hash functions from \(n\)-bit strings into \(\mathrm{Fin}(2^k)\); it serves as the public-randomness space for the hashing-based equality protocol.

Theorem 81.3 Deterministic complexity upper bound for equality

For every \(n \in \mathbb {N}\),

\[ D(\mathrm{equality}_n) \; \le \; n + 1. \]

This follows from the naive protocol in which Alice transmits her entire \(n\)-bit input and Bob sends back the single comparison bit.

Theorem 81.4 Deterministic complexity of equality at \(n = 0\)

When \(n = 0\) both inputs are the unique empty string, so the equality function is constantly true and requires zero communication:

\[ D(\mathrm{equality}_0) = 0. \]

For every \(n \ge 1\),

\[ n + 1 \; \le \; D(\mathrm{equality}_n). \]

The key argument is that any monochromatic rectangle that contains a diagonal pair \((x, x)\) must equal the singleton \(\{ (x,x)\} \), so any valid partition of the input matrix into monochromatic rectangles contains at least \(2^n + 1\) pieces, requiring \(n + 1\) bits to index.

Theorem 81.6 Exact deterministic complexity of equality

The deterministic communication complexity of the equality function on \(n\)-bit strings is

\[ D(\mathrm{equality}_n) \; =\; \begin{cases} 0 & \text{if } n = 0, \\ n + 1 & \text{otherwise.} \end{cases} \]

\(\mathrm{equalityHashProtocol}(n, k)\) is the standard public-coin protocol for equality in which, given a shared random hash \(h \in \mathrm{HashSpace}(n, k)\), Alice sends \(h(x) \in \mathrm{Fin}(2^k)\) and Bob replies with \(\mathtt{decide}(h(y) = h(x))\).

Theorem 81.8 Run semantics of the equality hashing protocol

For all \(x, y : \mathrm{BoolInput}\, n\) and \(h : \mathrm{HashSpace}(n,k)\),

\[ (\mathrm{equalityHashProtocol}\, n\, k).\mathrm{rrun}\, x\, y\, h \; =\; \mathtt{decide}(h(x) = h(y)). \]
Theorem 81.9 Complexity of the equality hashing protocol

The worst-case communication cost of \(\mathrm{equalityHashProtocol}(n, k)\) is exactly \(k + 1\) bits.

If \(\varepsilon \gt 0\) and \(1/2^k \lt \varepsilon \), then the public-coin communication complexity of \(\mathrm{equality}_n\) with error at most \(\varepsilon \) satisfies

\[ R_\varepsilon (\mathrm{equality}_n) \; \le \; k + 1. \]

The error bound follows from the collision probability of the random hash family.

Theorem 81.11 Public-coin upper bound for equality via \(\varepsilon \)

For every \(n \in \mathbb {N}\) and every \(\varepsilon \gt 0\),

\[ R_\varepsilon (\mathrm{equality}_n) \; \le \; \left\lfloor \log _2\! \left(\lceil \varepsilon ^{-1} \rceil + 1\right)\right\rfloor + 1. \]