rd length assignments. The remarkable feature is that such apparently small differences actually make it possible to increase the coding efficiency from 91.42% (Shannon code) to 99.33% (Huffman code). A recommended class project is to write a computer program aiming to perform a Huffman-coding assign- ment, with team competition for the fastest and most compact algorithm, while taking sources with a large number of symbols for test examples. 9.1 Huffman codes Table 9.1 Binary Huffman code for English-letter source, showing assigned codeword and calculation of mean codeword length, leading to a coding efficiency of n = 99.33%. The two columns at far right show the new probability distribution q(x) = - log(2-1(x)) and the Kullback-Leibler distance D (pllq). Length -p(x)log2(x) Codeword p(x)l(x) D(p)|q) 0.127 0.378 0.380 0.125 0.002 0.091 0.314 0.272 0.125 -0.042 0.082 0.295 0.327 0.063 0.032 0.075 0.280 0.299 0.063 0.019 0.070 0.268 0.279 0.063 0.011 0.067 0.261 0.267 0.063 0.006 0.063 0.251 0.251 0.063 0.000 0.061 0.246 0.243 0.063 -0.002 0.060 0.243 0.239 0.063 -0.004 0.043 0.195 00000 0.214 0.031 0.020 0.040 0.185 00110 0.199 0.031 0.014 0.028 0.144 10110 0.140 0.031 -0.005 0.028 0.144 10111 0.140 0.031 -0.005 0.024 0.129 11001 0.120 0.031 -0.009 0.024 0.129 11010 0.120 0.031 -0.009 0.022 0.121 11011 0.110 0.031 -0.011 0.020 0.113 000010 0.120 0.016 0.007 0.020 0.113 000011 0.120 0.016 0.007 0.019 0.108 001110 0.114 0.016 0.005 0.015 0.091 001111 0.090 0.016 -0.001 0.010 0.066 110001 0.060 0.016 -0.006 0.008 0.056 1100000 0.056 0.008 0.000 0.002 0.018 110000100 0.018 0.002 0.000 0.002 0.018 110000101 0.018 0.002 0.000 0.001 0.010 110000110 0.009 0.002 -0.001 0.001 0.010 110000111 0.009 0.002 -0.001 1.000 1.000 Source entropy 4.184 bit/symbol Coding 99.33% efficiency n Mean codeword 4.212 length L KL distance 0.028 Looking next at Fig. 9.2, the coding tree is seen to be of order nine, meaning that there are nine branch splits from the root, corresponding to the maximum codeword size. A complete tree of order 9 ha