What are instantaneous code words?

1k Views Asked by At

I need help understanding what instantaneous code words are.

Example: Design an instantaneous code of length 3,2,3,2,2

2 00
2 01
2 10
3 100

Is my solution valid?

1

There are 1 best solutions below

0
On

Assuming that your textbook is using the same definitions as Wikipedia this is not a prefix code (aka instantaneous).

  • Your suggested word $10$ is a prefix of the word $100$.
  • Your code is not uniquely decodable either, because $100100$ could be parsed as $10\ 01\ 00$ as well as $100\ 100$.
  • Your code does not meet the specification in the sense that you listed only a single word of length three whereas the assignment asked for two.

Hint:

  • You need to use three out of four two-bit segments as codewords. This leaves relatively few possibilities for the first two bits of the three-bit codewords.