Chapter 5: Q4E (page 161)
Show that if an undirected graph with n vertices has k connected components, then it has at least n - k edges.
Short Answer
The undirected graph with n vertices has k connected components with least n - k edges.
Chapter 5: Q4E (page 161)
Show that if an undirected graph with n vertices has k connected components, then it has at least n - k edges.
The undirected graph with n vertices has k connected components with least n - k edges.
All the tools & learning materials you need for study success - in one app.
Get started for freeUnder 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.
Prove 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 .
Give You are given a graphwith positive edge weights, and a minimum spanning tree with respect to these weights; you may assume GandTare given as adjacency lists. Now suppose the weight of a particular edge is modified fromw(e)to a new value w'(e). You wish to quickly update the minimum spanning tree T to reflect this change, without recomputing the entire tree from scratch. There are four cases. In each case give a linear-time algorithm for updating the tree.
(a) and .
(b) role="math" localid="1658907878059" and .
(c) role="math" localid="1658907882667" and .
(d) role="math" localid="1658907887400" and .
The following table gives the frequencies of the letters of the English language (including the blank for separating words) in a particular corpus.
blank | 18.3% | r | 4.8% | y | 1.6% |
e | 10.2% | d | 3.5% | p | 1.6% |
t | 7.7% | l | 3.4% | b | 1.3% |
a | 6.8% | c | 2.6% | v | 0.9% |
o | 5.9% | u | 2.4% | k | 0.6% |
i | 5.8% | m | 2.1% | j | 0.2% |
n | 5.5% | w | 1.9% | x | 0.2% |
s | 5.1% | f | 1.8% | q | 0.1% |
h | 4.9% | g | 1.7% | z | 0.1% |
(see the box in page 143). Would you expect it to be larger or smaller than your answer above? Explain.
d. Do you think that this is the limit of how much English text can be compressed? What features of the English language, besides letters and their frequencies, should a better compression scheme take into account?
A long string consists of the four characters ; they appear with frequency and respectively. What is the Huffman encoding of these four characters?
What do you think about this solution?
We value your feedback to improve our textbook solutions.