The ideal observer performs maximum a posteriori decoding: for received word , it maximizes , equivalently . Maximum-likelihood decoding maximizes the latter conditional likelihood alone. Minimum-distance decoding minimizes the Hamming distance . Ties may be resolved arbitrarily among maximizers.
For independent errors in a binary symmetric channel,
For , its ratio on increasing the distance by one is . Thus maximum-likelihood decoding and minimum-distance decoding select exactly the same codewords. At the allowed endpoint , they agree on a possible observation ; impossible observations have zero likelihood for every codeword, so an arbitrary maximum-likelihood tie rule need not agree with minimum distance. This qualification is needed for the literal assumption .
For the specified observation, the Hamming distances from 000 and 111 are two and one. Their likelihoods are and , respectively. After multiplying by the priors, their joint probabilities are and , so their posterior probabilities are and . Therefore
The binary symmetric channel with crossover probability has channel matrix
Maximum-likelihood decoding chooses a codeword maximizing , while minimum-distance decoding chooses one minimizing the Hamming distance . For a block of length sent through a binary symmetric channel,
When , the final factor decreases strictly with the distance. Thus maximum-likelihood and minimum-distance decoding agree.
For the length-three repetition code , majority decoding is wrong exactly when at least two bits flip. Therefore
The relation makes this a length-seven binary cyclic code. Since , the generator polynomial of a cyclic code gives
The polynomial itself is a codeword of Hamming weight three, so the minimum distance is at most three. A nonzero word of weight one cannot vanish at the nonzero element . If a weight-two word vanished there, then ; because has order seven and , this forces . Hence there are no nonzero words of weight below three, and
The equation gives in the finite field , and therefore
By the root-evaluation syndrome for a cyclic code, this is the syndrome of the single error . Since , minimum-distance decoding uniquely corrects one error. Subtracting and adding agree over , so the decoded codeword is
The received word has Hamming distances from and from , so
After multiplying by the priors, the unnormalized posterior probabilities are and . Thus the ideal observer decodes as , while maximum-likelihood and minimum-distance decoding both choose .
The ideal observer minimizes average error but needs priors and channel statistics. Maximum likelihood needs the channel law but not priors, and can be suboptimal for unequal codeword probabilities. Minimum distance is simple and agrees with maximum likelihood for a binary symmetric channel with crossover probability below , but ignores unequal priors and general channel asymmetry.