For bits , repeated exclusive or computes the parity of the number of ones:
An induction proves this: the first bit gives its own parity, and appending a zero preserves it while appending a one changes it. The binary string has three ones, so its parity bit is one. Append that parity bit to obtain , whose six bits have even parity. Flipping the second bit produces and changes the combined exclusive or to one, detecting an error. Flipping the third bit as well produces , with four ones and combined exclusive or zero: an even number of flips can escape this check.
For three inputs, repeated exclusive or means an odd number of true inputs, rather than exactly one: . The “exactly one” description applies to the two-input exclusive or. This distinction matters when translating a requirement that exactly one option be selected into a program condition.
Generate the binary Markov source by taking independent and identically distributed Bernoulli random variables of parameter , independent of a fair initial bit, and setting . Here is exclusive or. Each is the unpredictable flip decision.
The transformation between and is a bijection. It preserves information entropy, so
Sending the initial bit and encoding the innovation sequence describes every source word exactly. This does not by itself specify a practical compressor, but it identifies the uncertainty which a prefix code or other lossless source coding method must handle.
For a word with flips among its transitions,
There are such words: choose the initial bit and the flip positions. At and , each constant word has probability , whereas an independent fair source gives each word probability . Equal marginal probabilities plainly do not imply equal word probabilities.
Mutual information Created 2026-09-24 Updated 2026-10-14
For finite discrete random variables, mutual information is the reduction of information entropy provided by observing the other variable:
The last expression makes the symmetry visible. It is nonnegative and is zero exactly when and are independent random variables. One way to see both facts is
where is the Kullback-Leibler divergence with base-two logarithms. The Gibbs inequality gives nonnegativity; equality means that the joint probability distribution factors. The statement extends to more general distributions via relative entropy, but differences of infinite information entropies must not be used as if they were finite numbers.
A binary symmetric channel gives a useful example. Let be a fair bit, let be an independent Bernoulli random variable with error probability , and set , where is exclusive or. The output is also a fair bit, but knowing the input leaves just the error uncertainty:
Here is binary entropy. At , , so the output carries about bits of mutual information about the input per use. This is an average uncertainty reduction, not a claim that each observed symbol can be divided into fractional physical bits.
Figure 1.
Binary entropy and retained information distinguish noisy transmission from predictable bit inversion
. Details.
At , every output is equally likely for either input, so . At , the output is always the inverted input: knowing this rule lets the receiver recover the input exactly, so again. A high raw error rate need not mean low mutual information when the errors are predictable. For this particular channel the fair input is optimal, giving the binary symmetric channel capacity .
Mutual information detects dependence that ordinary correlation can miss. Let be uniform on and . Symmetry gives , hence zero covariance and zero correlation, while is completely determined by . Thus . This distinction is useful whenever a relationship is nonlinear: knowing one variable can reveal another without a linear trend.
Let be independent fair bits, and let be their exclusive or: precisely when . The four possible triples are , each with probability . Each coordinate is a fair bit. Writing out all eight patterns gives
Every pair has all four cells with probability :
For , the four allowed triples project to ; for they project to . Each projection lists each pair exactly once, proving pairwise independence. But differs from the product , so the three are not independent random variables. Indeed, any two determine the third. A single coordinate reveals nothing about another, while two coordinates together reveal it completely.
Figure 1.
The XOR example hides joint dependence from every pairwise probability table
. The bars show all eight triple patterns against the reference for three independent fair bits. Below, all three pairwise joint probability mass functions have four equal cells of . Details.
The exclusive or example is the complementary-bit version of the two-toss exercise in Grinstead and Snell, Introduction to Probability, section 4.1, exercise 7, printed page 151. It is a compact reason to check the full product rule whenever a calculation uses three-way or higher events.
Pairwise independent events describe a subtle kind of uncertainty: learning that one event occurred leaves each other event's probability unchanged, yet learning that two occurred can reveal a third completely. Checking every pair therefore answers a weaker question than checking the whole collection. The parity construction of pairwise independent bits makes this distinction visible with just four equally likely outcomes.
A family of events is pairwise independent when
If , this is equivalent to the conditional probability identity . The product definition also handles events of probability zero. Independent events, meaning mutually independent events, require the same product rule for every finite subfamily, including triples. For three events, the three pair equations and the triple equation are four separate requirements. [ref].
For a worked example, take independent fair bits : the sample space is with probability per outcome. Set , , and , using exclusive or, which is one precisely when its inputs differ. The events , , and each contain two outcomes. Their pair intersections are
Thus each event has probability and each pair intersection has probability : these are pairwise independent events. But forces , so
The three are not independent events. This is the complementary-third-event version of the two-toss example in Tsitsiklis and Jaillet, MIT Introduction to Probability, Lecture 3, slides 7–8.
Figure 1.
Four outcomes give three pairwise independent bits with a joint parity constraint
. Each row has probability . Each pair's joint probability mass function contains all four value combinations with probability , although only four of the eight triple combinations can occur. Details.
Another useful diagnostic preserves a special common-intersection case. Suppose three events have common probability and every pair and triple intersect in the same event, of probability . Pairwise independence requires , while mutual independence additionally requires . Both hold only for or . For a concrete nontrivial instance, assign probability to each of four outcomes, let all three events contain the first outcome, and give each event one different additional outcome. Then and : the pair equations hold, while the triple equation fails. Unlike the exclusive or example above, this triple intersection is nonempty.
Let be independent fair bits and set , their exclusive or. The four possible triples are , each with probability . Every coordinate is fair, and every pair has all four outcomes with equal probability. Thus each pair's mutual information is zero, as in pairwise independence does not imply joint independence.
The full random vector has joint entropy bits, while the marginal information entropies sum to three bits. Consequently
The product of the marginals predicts probability for every triple, including the four impossible ones. On each possible triple, the ratio of true to product probability is ; averaging its base-two logarithm gives the same one bit of relative entropy.
The example gives a concrete use for joint information measures. A lossless source coding scheme that treats the three coordinates separately needs three bits here. If the decoder knows the integer parity rule, the encoder can send just and let the decoder reconstruct exactly. Pairwise independence does not reveal that saving. This is a stipulated source law and an explicit two-bit code, rather than a promise that arbitrary data can be shortened.
For three bits, the Boolean function outputs one when is odd, where denotes exclusive or. Unlike the three-bit majority decision tree, an exact decision tree computing parity must inspect all three bits on every input. If any coordinate is unread, two completions differing only at that coordinate follow the same observed graph path but have opposite parity. A single leaf cannot correctly label both.
The same argument works for bits: parity needs all queries on every input, whatever their order. Thus its decision-tree depth is , its expected query cost is for every input probability distribution, and each coordinate revealment is one. The algorithm remains required to be correct on the whole Boolean cube, even if the chosen probability distribution assigns some inputs zero probability; a promise restricting permitted inputs would be a different computational problem.
Use for exclusive or and regard all bits as elements of . For every public label , Alice computes the indicator function
while Bob computes from the known truth table. Exactly one of the is one, so the separated Boolean decomposition is
For each , they invoke an independent PR box with respective input bits and receive outputs . These satisfy . Alice forms , and Bob forms . Taking the exclusive or of all box constraints proves
Alice sends the single bit . Bob combines it with his locally known , obtaining
This is one-bit computation using Popescu–Rohrlich boxes. It uses boxes; decomposing by Bob's input instead gives , so the smaller truth-table factorization uses at most . No efficiency bound on local calculation or box use is needed for the stated unlimited resource.
Each PR box has uniform local output distributions regardless of the other party's input. Independent invocations therefore give Bob a uniform output string before the message, carrying no information about . The useful correlation becomes accessible through Alice's final bit; the construction respects the no-signalling property of the boxes.
Use for addition modulo two, or exclusive or. The key is to write the known Boolean function as an XOR of products of locally computable bits. An explicit separated Boolean decomposition avoids any need to assume a particular circuit for the function. For every possible Alice input , put
Alice can compute the first bit from her actual input and the public label ; Bob can compute the second bit from his own input because and the full function are public. Exactly one of the indicators is one, namely the one with . Hence
For each label , invoke one independent Popescu–Rohrlich box with inputs and . Denote its outputs by and . By the given correlation, . Alice locally forms , and Bob locally forms . Taking the XOR of all box constraints yields
Thus the protocol is
It succeeds exactly for every input and every allowed sequence of box outputs. Randomness of the individual outputs introduces no error because each parity relation is exact. All box calls can be made before the message, with no extra classical communication. This proves one-bit computation using Popescu–Rohrlich boxes.
The truth-table construction uses PR boxes. If Bob's input is shorter, use the equally valid decomposition . Alice computes the first factor, Bob the indicator, and Alice still sends her output parity. Therefore at most boxes are enough. This is a bound on box use, not on local computational work; the communication complexity remains one bit.
Another standard route is the algebraic normal form over the two-element field:
The empty products are one. For completeness, this representation follows by induction on the number of bits from , which adds a new variable only to its corresponding coefficients. Each nonzero monomial supplies one local product to each party and can be evaluated in distributed parity form by one PR box. Terms depending on only one party can instead be included directly in that party's final parity; the constant may be assigned to either side. For example, a single cross-product needs one box, whereas needs no boxes and just the one-bit message .
Finally, the scheme does not make the boxes themselves signalling devices. At any fixed box inputs, the two allowed output pairs give each party an individually uniform bit, independent of the distant input. Independence across box calls makes Bob's entire uncommunicated output string uniform, for any Alice input. Without he generally cannot identify the answer. The communicated parity combines with the nonlocal correlations to reveal it; it does not contradict the uniform local marginals of these no-signalling boxes.
The answer qubit enters the Boolean quantum oracle in , because the Pauli X gate followed by the Hadamard gate maps to . Since , quantum phase kickback multiplies the component by and leaves the answer qubit unchanged. The two input qubits enter in the uniform quantum superposition . Thus
Equivalently, using the Controlled-Z gate and the Pauli Z gate,
Here the exponent in the phase may be evaluated as an ordinary integer, since its parity agrees with the exclusive or expression. In particular, contributes only a global phase.
Interpret a function collision as two distinct inputs with equal outputs. Without distinctness the request is vacuous, since an input paired with itself always qualifies. Set (handling small by direct queries), choose a known set of size , and query all its inputs. Store a classical table of their outputs and corresponding inputs. If this table contains a function collision, return it immediately.
Otherwise the table contains distinct outputs. Because is exactly two-to-one, each has exactly one partner in , the known complement of . None lies in , and different table outputs have different partners. Thus exactly inputs in , of size , satisfy the known-table membership predicate
Build a marked-state phase oracle for this predicate by a compute-phase-uncompute construction: use on a clean answer quantum register, reversibly compare its output against the classical table, apply the conditional minus sign, undo the comparison, and apply again. Since the answer operation is bitwise exclusive or, . All workspace returns to zero, and each phase query costs two calls to .
Perform known-subset Grover search in the span of the computational basis states labelled by , starting in their uniform superposition state. Reflection about this known state uses no queries; choosing as an initial interval makes a known interval that can also be encoded by its own labels. Its marked fraction is , so the previous Grover rotation angle analysis uses phase queries. On measuring , one further query checks the output and retrieves its partner from the table. The inputs are distinct because the two sets are disjoint.
Consequently the quantum query complexity is
For large , rounding the optimal Grover search algorithm iteration count gives success at least . An internal table function collision already gives certain success. The balance explains the cube-root choice. This is the Brassard–Høyer–Tapp collision algorithm: its table uses classical bits. The bound counts calls to , as requested; it does not charge table lookup and its reversible implementation as constant-time gates, or claim an overall polynomial time in .
The path graph state is . The factor commutes with both the Controlled-Z gates and the quantum measurement of vertex . Treat as the input of one-bit teleportation. The equatorial qubit measurement result therefore gives the normalized state
Here the subscript on expresses the teleported input factor; it is not an extra operation on the already measured vertex. Use to obtain
The exclusive or exponent is equivalent to the printed sum because . The conditional probability of is one half for either , by the one-bit teleportation branch norm. This calculation concerns an equatorial measurement of a graph-state leaf; no third remaining qubit or extra factor is present.
The logical depth of a measurement pattern counts sequential layers of quantum measurements forced by dependence of measurement bases on earlier outcomes. Depth one means every basis can be fixed before measurements start, allowing all quantum measurements on distinct qubits to be performed in parallel. This does not require depth-one resource-state preparation or constant-depth classical parity processing.
Suppose the circuit contains gates in time order, with each . Prepare an -vertex path graph state from and Controlled-Z gates between neighbours. Its first qubit supplies the specified input . Measure vertex in the fixed equatorial qubit measurement basis at angle for , obtaining . Measure the final vertex in the computational basis, obtaining .
Track the Pauli frame as , starting with . A hypothetical sequential reading of the same quantum measurements gives the step . The supplied commutation rules imply, up to global phase,
For , the sign is irrelevant. For , the identity absorbs the possible sign change into the Pauli frame. If for and for , the update is
Inductively the final unmeasured quantum state would be . The final computational basis outcome is corrected by and is unaffected by . The induction on a sequential interpretation proves the joint statistics; projectors on distinct vertices commute, so the identical fixed-basis pattern can actually be measured simultaneously, including its final vertex.
The first printed commutation formula has an incorrect exact scalar phase: with the printed matrix definition, , rather than the negative-exponent prefactor. For example, at the two versions differ by a factor . They agree up to global phase, so this error does not affect the Pauli frame recurrence or any quantum measurement probability.
Consequently a fixed-basis path-state pattern of logical depth one simulates every such circuit. Only Pauli measurements occur: the angle-zero basis measures , and the angle- basis measures with the printed eigenvector labels. Classical exclusive or processing suffices for all output corrections. These gates are Clifford gates, which explains why angle adaptation can be eliminated. For , simply measure the initial in the computational basis; it is already a depth-one pattern.