Current location - Training Enrollment Network - Mathematics courses - What is right in this chapter of discrete mathematics? Thank you.
What is right in this chapter of discrete mathematics? Thank you.
The weight of a tree refers to a meaningful number given to the nodes in the tree, which we call weight.

Weight is meaningless to the tree itself, but it is very useful for practical application.

For example, in information transmission, objects are represented by codes. Of course, the shorter the code length, the shorter the transmission time.

If the probability of letters A, B, Z and C is 0.75, 0.54, 0.28 and 0.43; How to code to make the code length of the published article the shortest?

At this time, the weight is useful. Let the corresponding weights be 75, 54, 28 and 43.

Construct a tree and find out that the shortest weighted path length of nodes is the minimum code length.

If we code in this way, we will get the smallest code length. Of course, we all know that the weight path of Huffman tree is the shortest, so let's not talk about it.