What is the definition of a distinct code?
A distinct code is a code in which every source symbol is assigned a codeword different from the codewords assigned to all other symbols. No two symbols share the same binary string.
Conditions
- Applies to a fixed code mapping symbols to codewords.
- Requires pairwise inequality among all codewords in that code.
Reasoning, step by step
- List all codewords assigned to the source symbols under the code.
- Compare each codeword with every other codeword in the set.
- Verify that no two codewords are identical.
- Conclude that the code is distinct if all codewords are pairwise different.
Example
In the displayed table, Code 1 and Code 2 are distinct because their four codewords are pairwise different. However, Code 7 is not distinct because both and are assigned the codeword 00.
Common misconceptions
- Assuming that distinctness implies prefix-freeness.
- Thinking that distinctness guarantees unique decodability without further conditions.
Watch the explanation
Explore next
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.