Skip to content
← All questions

What is the definition of a uniquely decodable code?

A uniquely decodable code is a code where every encoded message sequence has only one valid decomposition into codewords. The video emphasizes that prefix-freeness guarantees this property, but the converse is not required; a code can be uniquely decodable without being prefix-free.

Conditions

  • Concerns decoding of concatenated codeword sequences at the receiver.
  • The video does not state a formal symbolic definition beyond the examples and prose.

Reasoning, step by step

  1. Consider a received binary sequence formed by concatenating codewords.
  2. Attempt to segment the sequence into valid codewords from the code.
  3. Verify that there is only one possible valid segmentation.
  4. Conclude that the code is uniquely decodable.

Example

The video presents the code {0, 01, 011, 0111} as an example. Although it is not prefix-free, the sequence 0111 decodes uniquely as x4x_4, because alternative splits like 0+1110+111 or 01+1101+11 leave invalid residual bits.

Common misconceptions

  • Assuming that all uniquely decodable codes must be prefix-free.
  • Confusing unique decodability with instantaneous decoding, which is a stricter operational property.

Watch the explanation

Explore next

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.