Suppose we have been given that our prefix-free binary code has 11 codewords of length 4, and 2 codewords of length 2. We are asked to come up with an example for it, but how can we make 11 codewords when the code length is 4 and we can only use 1s and 0s (binary code).

有帮助吗?

解决方案

You don't have to fill the binary space. For instance, if there were only two codewords they could be 0010 and 0001; all other codewords (1, 0000, 0011, etc) would be invalid and any application interpreting the code should generate an error upon encountering them.

That said, you won't find an example because this particular code's requirements are impossible to satisfy.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top