Computer Science 210
Data Structures

Fall 2017, Siena College

Lecture 34: Huffman Trees; Maps
Date: Friday, December 8, 2017


Agenda

Lecture 34 Assignment

Due at the start of class, Monday, December 11.

Please submit answers to these questions by the start of class. zyBook activities should be done right in your zyBook, and all others should be submitted to Blackboard under "Lecture 34 Assignment" . We will discuss these questions at the start of class, so no late submissions can be accepted.

Read and complete all participation activities in your zyBook, Chapter 17. This is worth 15 points.

Then, answer the questions below in Blackboard.

Ignoring case, the string

She sells sea shells down by the sea shore.

has the following character frequencies:

(s,8), (h,4), (e,7), (_,8), (l,4), (a,2), (d,1), (o,2), (w,1), (n,1), (b,1), (y,1), (r,2), (.,1)

  1. Construct a Huffman tree based on these frequencies. (8 points)
  2. Encode the substring "sea shore shells" using the code specified by your tree. (6 points)

Terminology

Examples