Assignment
Contents:
Overview
Topic: Data Representation and Compression
Related Reading: Ch. 3.1, 3.3-3.6, pp.69-70 and notes
Due:
Internet Requirements
You will not need an Internet connection for completing the
assignment, other than for submission.
Practice Problems
Problems to be Submitted (20 points)
- (4 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. 83)
- (8 points)
Assume that you have a text document with 130 characters, with the following 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 all 130 characters of 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 all 130 characters in the message?
- What compression ratio was achieved over the fixed-length code?
- (4 points)
At the end of Ch. 3 there are a series of "Thought Questions."
Pick any one question to answer (though you would need to read
Ch. 3.2 to answer 1c). The length of your answer should be
appropriate for the question, however I envision answers in the range
of 1/2-page to 1-page.
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.
Last modified: 3 October 2002