A prefix code assigns to each symbol a word of bits, its codeword, so that no codeword is the beginning of another. Its code tree is the binary tree whose leaves are the symbols, the codeword of a symbol spelling the path from the root, 0 for left and 1 for right. For frequencies , the cost of the code is , where , the length of the codeword of , is the depth of its leaf: the number of bits of the encoded text.
Computer Science · Glossary
What is Prefix code, code tree, cost?
Also known as: prefix code · code tree · cost (of a code)