Current location - Training Enrollment Network - Mathematics courses - The Best Prefix Code in Discrete Mathematics
The Best Prefix Code in Discrete Mathematics
No, that will increase the data length, and only the best prefix codes with the same length can be exchanged.

That is, the above code is a binary prefix code. Prefix code: Specify a string 0, 1 for each character as its code, and require that the code of any Bai character is not the prefix of other character codes.

Binary tree T represents an optimal prefix code of character set C, X and Y are two leaves in the tree T, and Z is their father. F(y), then the tree t'=t-{x, y} represents an optimal prefix code of the character set c'=c-{x, y} ∨{ z}.

Extended data:

For example, if a=0 10, then 0,0 1 and 0 10 are all prefixes of a.

Prefix code: let Q ={a 1, a2, …, am} be a series from 0 to 1. If none of the sequences in Q is a prefix of another sequence, then Q is called a prefix code.

For example, {0, 10, 1 10} is a prefix code, but {0, 10,1} is not.

The code of any one character cannot be used as the prefix of other character codes, which is the prefix coding characteristic. Codes with prefix code characteristics are prefix codes (with ambiguous names). For coded character set C, the prefix code coding scheme that minimizes the average code length is called optimal prefix code.

Baidu Encyclopedia-Prefix Code