On Mon, 26 Jun 2006, Steve Witham wrote:
The most trivial code is for an alphabet of one symbol, whose probability is 1. I'll write it like this: 1.
The other reading of that is, there is one symbol that encodes with no bits. (The question of how do you know how many of this symbol have been transmitted is outside the scope of everything we've been talking about!) It probably seems strange to include the zero as a possible length of codes, but I had an influential boss who said always to handle the zero case.
My computer has a special unary (zero-ary?) mode in which it uses that encoding, except that it encodes the symbol as 0 instead of 1. You'd be amazed at how fast it runs, computing 0 instructions and putting 0 pixels on the screen. It's really low power too. -J