6 (define symbol-pairs '((A 2) (BOOM 1) (GET 2) (JOB 2) (NA 16) (SHA 3) (YIP 9) (WAH 1)))
8 (define huffman-tree (generate-huffman-tree symbol-pairs))
10 (define test-message '(GET A JOB
11 SHA NA NA NA NA NA NA NA NA
13 SHA NA NA NA NA NA NA NA NA
14 WAH YIP YIP YIP YIP YIP YIP YIP YIP YIP
18 (length (encode test-message
23 a. Encoding requires 84 bits.
24 b. There are 8 symbols, so we use 3 bits/symbol.
25 (length test-message) is 36. So total length of the encoded
26 song, had it been fixed length code, will be (* 36 3) = 108