Assignment 03
Contents:
Overview
Topic: Data Representation and Compression
Related Reading: Ch. 3.1, 3.3-3.6, pp.69-70 and notes
Due: 9am Thursday, 25 July 2002
Internet Requirements
You will need an Internet connection for completing the assignment as
well as submission.
Practice Problems
Problems to be Submitted (20 points)
- (6 points)
In the notes, we stated that CD quality music requires 44100 samples per second.
The amplitude of the sound wave is recorded using 16 bits per
channel. (Recorded in stereo, there are two separate channels).
Based on this information, please answer the following:
-
Calculate how many bits of information would be used to represent a
4 minute song, recorded in stereo. Express your answer using the
most natural unit of magnitude (e.g., bytes, KB, MB, GB). Please
explain the details of your calculations so that we can better
understand your method in case of a wrong answer.
-
Assume that a single compact disk, formatted for audio, holds up to
700MB of information. Approximately how many of those 4-minute
songs will fit on the CD.
- (4 points)
Exercise 24 of Ch. 3 (p. 84)
- (10 points)
Assume that you have a text document with the following letter
frequencies:
Letter | Frequency |
E | 28 |
T | 25 |
A | 21 |
S | 12 |
D | 10 |
I | 9 |
R | 7 |
H | 6 |
M | 5 |
U | 4 |
Y | 3 |
- If using a fixed-length code for this message, how many bits
per character must be used, and thus how many overall bits would be
used to represent the message.
- Based on the method discussed in the lecture notes, generate
a Huffman code for this set of frequencies (Note: this method was not
discussed in the text).
Your answer should be a table of codes, formatted similarly to the
one given in the text for Exercise 24.
- Based on your Huffman code, how many overall bits would be
used to represent the message?
- What compression ratio was achieved over the fixed-length code?
Overall, please type your answers to all of the problems in a
single document to be submitted electronically. Please see details about the
submission process.
Extra Credit (3 points)
Play with
graphics. Draw me a picture of your favorite animal using various
shapes and colors from scratch. Please include your name within part
of the graphics.
Windows has an imaging program that you should find under the menu,
Start -> Programs -> Accessories -> imaging. Once you
start the program, you can create a new document, at which point a
menu will appear which allows you to specify things such as the color
scheme, the file format, compression scheme and so on. There is a
Help menu within that program, though you might be able to feel your
way around if you've ever used any such drawing programs.
For two points extra credit, save your picture to a file and submit it
along with the rest of your homework.
For a third point, I want to you save a copy of your file under
each of the following three formats (Using the "Save As" option):
TIFF, Bitmap, JPEG. You do not need to submit all three, but save
them somewhere. In your main assignment writeup, please include
information on the number of bytes which were used by each of the
three formats. To find the number of bytes for a file, you can
locate the icon in whatever folder you used to save it and then click
the right mouse button and select "Properties" at the bottom of the
menu that appears. You will see the size among the properties.
ns121 Class Page
visprof@coloradocollege.edu