Assignments | Class Photo | Computing Resources | Course Home | Lab Hours/Tutoring | Schedule | Submit

Saint Louis University

Computer Science 180
Data Structures

Michael Goldwasser

Spring 2009

Dept. of Math & Computer Science

Homework Assignment 05

Trees

Contents:


Overview

Topic: Trees
Related Reading: Ch. 6.1-6.4 of the text, except 6.3.5, 6.4.3 and 6.4.4. Most relevant for these questions will be 6.2.3, 6.2.4 and 6.3.4.
Due: Wednesday, 8 April 2009, 10:00am

Please make sure you adhere to the policies on academic integrity.


Problems to be Submitted (20 points)

  1. (5 points)

    For the tree in Figure 6.6 (on page 259), what order will nodes be visited during a postorder traversal?

  2. (5 points)

    Draw a (proper) binary tree T such that simultaneously,

  3. (10 points)

    The following binary string represents an encoded message using the format described in the upcoming decode programming assignment (for the sake of typesetting, we are breaking up the display to have 24 bits per line, but you should assume they are contiguous).

    000100111010010011011100
    100110011110011011110000
    100110010010011011001001
    100001010011010011000100
    000001001100011100010111
    000110000000010011001010
    100111010101001110010100
    111001111000110010101111
    101001000111101000110010
    001010011001111111110110
    110101110100010111100011
    100001010001010110111100
          

    Decode this message by hand and submit a picture of the Huffman tree as well as the decoded message.


Extra Credit

  1. (2 points)

    Creativity Exercise C-6.12 on page 305 of the text.


Michael Goldwasser
CSCI 180, Spring 2009
Last modified: Friday, 03 April 2009
Assignments | Class Photo | Computing Resources | Course Home | Lab Hours/Tutoring | Schedule | Submit