Chapter 5: Q13E (page 162)
A long string consists of the four characters ; they appear with frequency and respectively. What is the Huffman encoding of these four characters?
Short Answer
Huffman encoding of the characters is respectively.
Chapter 5: Q13E (page 162)
A long string consists of the four characters ; they appear with frequency and respectively. What is the Huffman encoding of these four characters?
Huffman encoding of the characters is respectively.
All the tools & learning materials you need for study success - in one app.
Get started for freeProve the following two properties of the Huffman encoding scheme.
(a) If some character occurs with frequency more than , then there is guaranteed to be a codeword of length 1 .
(b) If all characters occur with frequency less than , then there is guaranteed to be no codeword of length 1 .
Show that if an undirected graph with n vertices has k connected components, then it has at least n - k edges.
Ternary A server has customers waiting to be served. The service time required by eachcustomer is known in advance: it is minutes for customer i. So if, for example, the customers are served in order of increasing i , then the customer has to wait minutes. We wish to minimize the total waiting time.
(time spent waiting by customer ).
Give an efficient algorithm for computing the optimal order in which to process the customers.
Under a Huffman encoding of symbols with frequencies , what is the longest a codeword could possibly be? Give an example set of frequencies that would produce this case.
Suppose you are given a weighted graph with a distinguished vertex s and where all edge weights are positive and distinct. Is it possible for a tree of shortest paths from s and a minimum spanning tree in G to not share any edges? If so, give an example. If not, give a reason.
What do you think about this solution?
We value your feedback to improve our textbook solutions.