n-bit strings, represented as Boolean-valued functions on Fin n.
Equations
- CommunicationComplexity.BitString n = (Fin n → Bool)
Instances For
The signed inner product of two Boolean strings, viewed through the
usual {0,1} to {±1} correspondence. Each agreeing coordinate
contributes 1, and each disagreeing coordinate contributes -1.
Instances For
The number of coordinates on which two bit strings agree.
Equations
- x.agreementCount y = {i : Fin n | x i = y i}.card
Instances For
The number of agreeing coordinates plus the number of disagreeing coordinates is the total length of the strings.
The number of agreeing coordinates is the total length minus the Hamming distance.
The signed inner product is the length minus twice the Hamming distance.
The signed inner product is the number of agreeing coordinates minus the number of disagreeing coordinates.
Repeating both inputs a times multiplies the signed inner product
by a.