(This is because the probability that the number of errors will be between 1 and d falls as d increases). The decoder could therefore output the "most probably correct" codeword, Cji this is known as maximum-likelihood or minimum-distance error correction. Such error correction is only possible if the number of errors is less than dMIN/2 because otherwise the distance to a incorrect codeword could be less than or equal to the distance to the correct one. In general it is possible to trade off error detection and correction ability. A code that is required to be able to correct nc errors and detect a further ND errors must have a minimum distance given by equation 4.6. dMIN=2nc+nD+1 (4.6) Determining the minimum distance of a code by comparing every pair of codewords would be time consuming for large codeword lengths. However, for a linear block code only the 2k valid codewords themselves need to be checked because the minimum Hamming distance between codewords is equal to the minimum Hamming weight among its nonzero codewords. (The Hamming weight of a codeword is the number of 1s in it.) Chapter 4 Coding Hard- and Soft-Decision Decoding In hard-decision decoding, as noted earlier, the receiver demodulates each digit in turn before decoding. For binary signals, demodulation (slicing) is a simple thresholding operation. The decoder then performs error detection and correction using this (possibly corrupted) received digit stream. In soft-decision decoding, the input to the decoder is the unsliced (analogue) sample stream. Because the decoder implementation is usually digital, the sample stream has to be digitized before input to the decoder, but it has been found that in practice very low- resolution digitization (for example, to only 8 or 16 levels) is often adequate. Soft decision decoding is computationally more demanding than hard-decision decoding. It has long been used with convolutional codes (see the Convolutional Codes section) to give extra coding gain, typically of about 2 dB. Its use for block codes was