Discrete Math Construct Tree from Weights. Consider the weights: 10, 12, 13, 16, 17, 17. (a) Construct an optimal coding scheme for the weights given by using a tree. (b) What is the total weight of the tree you found in part (a)?

Mutignaniz2

Mutignaniz2

Answered question

2022-09-07

Discrete Math Construct Tree from Weights
Consider the weights: 10, 12, 13, 16, 17, 17.
(a) Construct an optimal coding scheme for the weights given by using a tree.
(b) What is the total weight of the tree you found in part (a)?

Answer & Explanation

Mateo Tate

Mateo Tate

Beginner2022-09-08Added 18 answers

Step 1
I presume that you can construct the tree, given the hints you've been offered. Once that's done, at each non-leaf node, arbitrarily assign a 0 and a 1 to each branch, Then the code for each leaf node is just the sequence of these branch values, reading from the top to the bottom.
Step 2
For example, if the leaf nodes contain 10, 12, 13, 16, 17, 17, reading from left to right, then assigning 0 to each left branch and 1 to each right branch gives you the codes
10 : 000 12 : 001 13 : 010 16 : 011 17 : 10 17 : 11
along with 31 other equally good codes.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?