g distance is a mathematical distance in the strict definition of the term, as described in Chapter 5, when introducing the Kullbach- Leibler distance between two probability distributions. To illustrate the meaning of Hamming distance, Fig. 11.2 shows that it is possible to place all the different two- bit or three-bit codewords ((a;a) or (a;a;ak)) on the vertices of a square or a cube, following the Cartesian coordinate system x = a, y = a, which corresponds to the vectors (x, y, z) = (a,aj,ak). According to definition, the Hamming distance between codeword (0,0) and (1,0) or (1,1 1) is d = 1 or d=2, respectively. Likewise, the distance between (0, 0, 0) and (1, 0, 0) or (1, 0, 1) or (1,1,1) is d = 1 or d = 2 or 11.2 Linear block codes Table 11.2 Syndrome vector S=(s1,S2, S3) associated with single-error patterns E = (e1, e2, e3, e4, e5, e6, e7) in the Hamming block code (7, 4) defined in Table 11.1. Error pattern E Syndrome S 0000000 1000000 0100000 0010000 0001000 0000100 0000010 0000001 d = 3, respectively. We see from the illustration that the Hamming distance does not correspond to the Euclidian distance, but rather to the smallest number of square or cube edges to traverse in order to move from one point to the other. Going back to our (n, k) = (7, 4) block code example, assume next that the received block Z contains a single bit error, whose position in the block is unknown. If the error concerns the first bit of Z = Y + E, this means that the value of the first bit of Y has been increased (or decreased) by 1, corresponding to the error vector E = (1, 0, 0, 0, 0, 0, 0). For an error occurring in the second bit, we have E = (0, 1, 0, 0, 0, 0, 0), and SO on, to bit seven. For each single-error occurrence, we can then calculate the corresponding syndrome vector using the relation S = in Eq. (11.9). The result of the computation is shown in Table 11.2. It is seen that a unique syndrome corresponds to each error occurrence. For instance, if the syndrome is S = (0, 1, 1), we know that a bit error occurred in t