# Why the use of a fixed length code for N equiprobable symbols is efficient ?

Status
Not open for further replies.

#### yagmai

##### Newbie level 4
Dear guys.

I would like to understand more on fixed length code.

May I ask why the use of a fixed length code for N equiprobable symbols is as efficient as any code can be? What conditions have to be satisfied by N and codeword length so that the coding efficiency is 100%?

Thank you

Re: Fixed Length Code

I guess you are talking source coding.

If each word of the soure alphabet is equally likely, then assigning more or less bits for any particular word doesnt give any advantage. Crudely, if source alphabet has 4 distinct words, and in 100 source symbols, for equal probability, each one would occur 25 times. if you have 6 bits for one word and 4 bits for another, and 5 bits each for the remaining two, the total bits = 25 * (6 + 5 + 5 + 4), which no different from having 5 bits for every word (= 25 * (5 + 5 + 5 + 5)).

It would be perfect if the number of distinct source words (guess N) is a power of 2. If so, then no combination of bits is invalid, ie; all combinations of bits are made use of.
-b

Status
Not open for further replies.