 Different types of codes for a 5-ary source example made of a binary codeword alphabet. Nonsingular, not Uniquely decodable, Source Singular uniquely decodable not prefix Prefix 10110 Codewords Dummy Figure 8.2 Alternative coding tree for the source in Fig. 8.1. interpretation. Indeed, consider the code sequence 1101110010 made from a string of codewords from the code in Fig. 8.1. Scanning from left to right, since 1 and 11 are not codewords, the first matching codeword is 110, or symbol B. The same analysis continues until we find the meaning BADE. The code is, thus, uniquely decodable. We also note that under this last condition, no codeword represents the beginning bits or prefix of another codeword. This means that the codeword can be instantaneously interpreted after reading a certain number of bits (this number being known from the identified prefix), without having to look at the codeword coming next in the sequence. For this reason, such codes are called prefix codes or instantaneous codes. Note that a code may be uniquely decodable without being of the prefix or instantaneous type. Table 8.4 shows examples of singular codes, nonsingular but nonuniquely decodable, uniquely 8.5 Optimizing coding efficiency 22211 22210 22212 22200 22222 Figure 8.3 Coding tree for A-Z letter source, using ternary codewords (see also Table 8.3). decodable but not prefix, and prefix, in the case of a 5-ary code alphabet made of five different binary codewords. We shall now use the coding-tree method to see if we might improve the cod- ing efficiency of the A-Z English-character source, using a ternary alphabet with variable size (case (iv) in Section 8.4). Figure 8.3 shows a possible coding tree for a 27-symbol source (26 letters, plus a dummy). The method consists of assign- ing the first group of 2-bit codewords (00, 01, 02, 10, 11, 12) to the first six most frequent characters, then the second group of 3-bit codewords (200, 201, 202, 210, 211, 212) to the following six most frequent characters, and SO on, until all attribu