CSCI 189 - Assignment 9 Lab Work
The Problem set for this assignment is due 5:00pm Friday
December 9, 2005.
Start Haskell by following the same procedure that you used
in earlier labs.
- Open the file http://www.bowdoin.edu/~allen/courses/cs189/Asst9/Asst9.lhs
from a Web browser and save this file as Asst8.lhs (do not
append the .txt suffix) on the Desktop.
- Open two windows:
(a) A Unix "Shell" where you can run Haskell programs: select
Macintosh HD -> Applications -> Utilities -> Terminal
(b) A text editor where you can edit Haskell programs: select Macintosh
HD -> Applications -> TextEdit
- Line up these two window side by side so that you can see them both.
- Now switch to the right-hand window and open the tutorial
lab exercise for this assignment by selecting File -> Open ->
Asst9.lhs The following text should appear in that window.
-------------------------------------------
Matrices, Graphs, Trees, and Huffman Coding
Allen Tucker
April 2004
-------------------------------------------
> module Asst9 where
- Now switch to the left-hand window and type the following two lines at the
prompt:
- cd Desktop
- hugs Asst8
This lab explores some basic algorithms for manipulating important data structures
in computer science - matrices, graphs, and trees. An important application of
trees is called "Huffman coding," which is a data compression technique
widely used in JPEG images and other large data files.