From 771c2621f8b96b210d4853e68f8ce7ff0dc0ab54 Mon Sep 17 00:00:00 2001 From: henz Date: Fri, 7 Feb 2025 09:33:58 +0800 Subject: [PATCH] prep for scheme json version --- xml/chapter2/section3/subsection4.xml | 22 +++--------- xml/chapter3/section1/subsection3.xml | 1 + xml/chapter3/section2/section2.xml | 3 ++ xml/chapter3/section2/subsection5.xml | 52 +++++++++++++++++++++++++++ xml/chapter3/section5/subsection2.xml | 10 +++++- xml/chapter5/section5/subsection1.xml | 13 +++++-- 6 files changed, 80 insertions(+), 21 deletions(-) create mode 100644 xml/chapter3/section2/subsection5.xml 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 +