next up previous
Next: Random coding Up: Yet more solutions to Previous: Yet more solutions to

Solutions for Chapter 5

If assume we observe tex2html_wrap_inline1189,
eqnarray1065
If we observe y=0,
eqnarray1072
The probability that y=1 is 0.5, so the mutual information is:
eqnarray1076
We again compute the mutual information in the form H(X;Y) = H(Y) - H(Y|X). The probability that y=1 is 0.575, and tex2html_wrap_inline1217 + P(x=0) H(Y|x=0) so the mutual information is:
eqnarray1078
By symmetry, the optimal input distribution is tex2html_wrap_inline1223. Then the capacity is
eqnarray1080
Maybe it's best to get the optimal input distribution without invoking symmetry. We can do this by computing the mutual information in the general case where the input ensemble is tex2html_wrap_inline1225:
eqnarray1082
The only p-dependence is in the first term tex2html_wrap_inline1229, which is maximized by setting the argument to 0.5. This value is given by setting tex2html_wrap_inline1231. By symmetry, the optimal input distribution is tex2html_wrap_inline1223. The capacity is most easily evaluated by writing the mutual information as H(X;Y) = H(X) - H(X|Y). The conditional entropy H(X|Y) is tex2html_wrap_inline1239; when y is known, x is only uncertain if tex2html_wrap_inline1245, which occurs with probability q/2+q/2, so conditional entropy H(X|Y) is tex2html_wrap_inline1251.
eqnarray1084
The binary erasure channel `fails' a fraction q of the time. Its capacity is precisely 1-q, which is the fraction of the time that the channel is functional.

Alternatively, without invoking the symmetry assumed above, we can start from the input ensemble tex2html_wrap_inline1225. The probability that tex2html_wrap_inline1245 is tex2html_wrap_inline1261, and when we receive tex2html_wrap_inline1245, the posterior probability of x is the same as the prior probability, so:
eqnarray1086
This mutual information achieves its maximum value of (1-q) when tex2html_wrap_inline1269. In example 7 of chapter 5 we showed that the mutual information between input and output of the Z channel is
eqnarray1088
We differentiate this expression with respect to tex2html_wrap_inline1271, taking care not to confuse tex2html_wrap_inline1273 with tex2html_wrap_inline1275:
equation1090
Setting this derivative to zero and rearranging using skills developed in exercise 32, we obtain:
equation1092
so the optimal input distribution is
equation1094
As the noise level q tends to 1, this expression tends to 1/e.

For all values of q, tex2html_wrap_inline1283 is smaller than 1/2. A rough intuition for why input 1 is used less than input 0 is that when input 1 is used, the noisy channel injects entropy into the received string; whereas when input 0 is used, the noise has zero entropy. Thus starting from tex2html_wrap_inline1269, a perturbation towards smaller tex2html_wrap_inline1271 will reduce the conditional entropy H(Y|X) linearly while leaving H(Y) unchanged, to first order. The capacities of the three channels are shown in the figure below.

tex2html_wrap1347

For any q <0.5, the channels can be ordered with the BEC being the highest capacity channel and the BSC the lowest. The logarithm of the posterior probability ratio, given y, is
equation1096
Using our skills picked up in chapter 1, we readily rewrite this in the form
equation1098
The optimal decoder selects the most probable hypothesis; this can be done simply by looking at the sign of a(y). If a(y)>0 then decode as tex2html_wrap_inline1303.

The probability of error is
equation1100
where
equation1102
Note that this is my personal definition of tex2html_wrap_inline1305 which may not correspond to other people's definitions of the `error function'. Some people have the bizarre habit of leaving out factors of two in the definition. The number of recognizable `2's is best estimated by concentrating on the type of patterns that make the greatest contribution to this number. These are patterns in which just a small patch of the pixels make the shape of a 2 and most of the other pixels are set at random. It is unlikely that the random pixels will take on some other recognizable shape, as we will confirm later. A recognizable letter 2 surrounded by a white border can be written in tex2html_wrap_inline1307 pixels. This leaves 214 pixels that can be set arbitrarily, and there are also tex2html_wrap_inline1309 possible locations for the miniature 2 to be placed, and two colourings (white on black / black on white). There are thus about tex2html_wrap_inline1311 miniature `2' patterns, almost all of which are recognizable only as the character `2'.

  figure977
Figure 23.1: Four random samples from the set of tex2html_wrap_inline1313 `miniature 2s' defined in the text.

This claim that the noise pattern will not look like some other character is confirmed by noting what a small fraction of all possible patterns the above number of 2s is. Let's assume there are 127 other characters to worry about. Only a fraction tex2html_wrap_inline1315 of the tex2html_wrap_inline1317 random patterns are recognizable `2's, so similarly, of the tex2html_wrap_inline1313 miniature `2' patterns identified above, only a fraction of about tex2html_wrap_inline1321 of them also contain another recognizable character. These double-hits decrease undetectably the above answer, tex2html_wrap_inline1313.

Another way of estimating the entropy of a `2', this time banning the option of including background noise, is to consider the number of decisions that are made in the construction of a font. A font may be bold (2) or not bold; italic (2) or not; calligraphic (2) or not; sans-serif (2) or not. It may be normal size, small (2) or tiny (2). It may be futuristic, modern, or gothic. All these choices are independent. So we have at least tex2html_wrap_inline1325 completely distinct fonts. I believe that Donald Knuth's METAFONT, with the aid of which this document was produced, turns each of these axes of variation into a continuum so that arbitrary intermediate fonts can also be created. If we can distinguish, say, five degrees of boldness, ten degrees of italicity, and so forth, then we can imagine creating perhaps tex2html_wrap_inline1327 distinguishable fonts, each with a distinct `2'. Extra parameters such as loopiness and spikiness could further increase this number. It would be interesting to know how many distinct `2's METAFONT can actually produce in a 16 tex2html_wrap_inline1329 16 box.

The entropy of the probability distribution P(y|x=2) depends on the assumptions about noise and character size. If we assume that noise is unlikely, then the entropy may be roughly equal to the number of bits to make a clean `2' as discussed above. The possibility of noise increases the entropy. The largest it could plausibly be is the logarithm of the number derived above for the number of patterns that are recognizable as a `2', though I suppose one could argue that when someone writes a `2', they may end up producing a pattern tex2html_wrap_inline1333 that is not recognizable as a `2'. So the entropy could be even larger than 220 bits. It should be noted however, that if there is a 90% chance that the `2' is a clean `2', with entropy 20 bits, and only a 10% chance that it is a miniature 2 with noise, then the entropy of y is tex2html_wrap_inline1337 bits, so in this case the entropy would be much smaller than 220 bits. Notice also, in this case, that the probability distribution P(y|x=2) would not be at all uniform over this set of recognizable 2s. The probability of a y in the `clean' set would be about tex2html_wrap_inline1343, and the probability of a noisy miniature 2 pattern would be much smaller, about tex2html_wrap_inline1345.


next up previous
Next: Random coding Up: Yet more solutions to Previous: Yet more solutions to

David J.C. MacKay
Sat May 10 22:36:02 BST 1997