Chapter 11: Trees
Q39E
Which connected simple graphs have exactly one spanning tree?
Q39SE
Suppose that in a long bit string the frequency of occurrence of a 0 bit is 0.9 and the frequency of a 1 bit is 0.1 and bits occur independently.
a. Construct a Huffman code for the four blocks of two bits, 00, 01, 10, and 11. What is the average number of bits required to encode a bit string using this code?
b.Construct a Huffman code for the eight blocks of three bits. What is the average number of bits required to encode a bit string using this code?
Q3E
Use Prim's algorithm to find a minimum spanning tree for the given weighted graph.
Q3E
Answer these questions about the rooted tree illustrated.
- Which vertex is the root\(?\)
- Which vertices are internal\(?\)
- Which vertices are leaves\(?\)
- Which vertices are children of \({\bf{j}}\)\(?\)
- Which vertex is the parent of \({\bf{h}}\)\(?\)
- Which vertices are siblings of \({\bf{o}}\)\(?\)
- Which vertices are ancestors of \({\bf{m}}\)\(?\)
- Which vertices are descendants of \({\bf{b}}\)\(?\)
Q3E
In Exercises 2–6 find a spanning tree for the graph shown by removing edges in simple circuits.
Q3E
How many comparisons are needed to locate or to addeach of these wordsin the search tree for Exercise 1, starting fresh each time?
a) pear
b) banana
c) kumquat
d) orange
Q3E
In Exercises 1 – 3 construct the universal address system for the given ordered rooted tree. Then use this to order its vertices using the lexicographic order of their labels.
Q3RE
Give at least three examples of how trees are used in modeling.
Q3SE
Show that every tree with at least one edge must have at least two pendant vertices.
Q40E
Show that if a game of nim begins with two piles containing different numbers of stones, the first player wins when both players follow optimal strategies.