diff --git a/xml/chapter2/section3/subsection4.xml b/xml/chapter2/section3/subsection4.xml index ebfffc325..bf176a3ab 100644 --- a/xml/chapter2/section3/subsection4.xml +++ b/xml/chapter2/section3/subsection4.xml @@ -235,12 +235,7 @@ BACADAEAFABBAAAGAH there is only one node left, which is the root of the entire tree. Here is how the Huffman tree of figure was generated: - - -
-
- - +
Initial leaves @@ -305,9 +300,7 @@ BACADAEAFABBAAAGAH
$\{$($\{$A B C D E F G H$\}$ 17)$\}$ - -
-
+ The algorithm does not always specify a unique tree, because there may not be unique smallest-weight nodes at each step. Also, the choice of the order in which the two nodes are merged (i.e., which will be the @@ -1052,12 +1045,7 @@ equal(sample_tree, rock songs, 1950s rock songs. (Note that the symbols of an alphabet need not be individual letters.) - - -
-
- - +
-
A @@ -1128,9 +1116,7 @@ equal(sample_tree, 1
-
-
+ Use generate-huffman-tree diff --git a/xml/chapter3/section1/subsection3.xml b/xml/chapter3/section1/subsection3.xml index 101b341e2..f4a44a220 100644 --- a/xml/chapter3/section1/subsection3.xml +++ b/xml/chapter3/section1/subsection3.xml @@ -1045,6 +1045,7 @@ paul_acc("withdraw", "rosebud")(50); // Withdraws 50, should return 40 +