Saint Louis University |
Computer Science 140
|
Dept. of Math & Computer Science |
Topic: Data Representation and Compression
Related Reading: Ch. 1.4, 1.8 and notes
Due:
8pm Wednesday, 20 September 2006
Pages 43-44 has a set of Questions and Exercises for Chapter 1.4, with solutions in the back of the book. Most relevant to this assignment are questions 1, 2, 3, 7, 8, 9, 10.
Page 66 has a set of Questions and Exercises for Chapter 1.8 on compression, with solutions in the back of the book. None of them are directly relevant, but you may want read.
Chapter 1, Review Problem 20 (page 72).
Hint: Appendix A of your book has the entire ASCII code, albeit with binary patterns rather than hexadecimal. Alternatively, you can get each character by using the ascii/unicode demo software.
Consider the following Huffman code.
code | character |
---|---|
00 | A |
11 | E |
010 | T |
0110 | C |
0111 | L |
1000 | S |
1011 | R |
10010 | O |
10011 | I |
101000 | N |
101001 | F |
101010 | H |
101011 | D |
Decode each of the following bit strings according to that code.
The following color patch was taken from a section of SLU's
front web page.
Try to perform a manual color match for this color using the
RGB
color settings applet that we explored in class.
Indicate your answer as a 24-bit color specifying individual RGB values. Please use the decimal system for expressing the color components, as in (255,255,255), which is the RGB color for white.
Advice: Though in class we worked with a tool that tells you exactly what color components are used for any color on the screen that you point to, we ask that you not use such a tool for this problem. Please try to see how well you can do manually.
Let's say that you are taking pictures at a resolution of 1024x768 pixels and that it stores 24-bit color for each individual pixel. Assuming that pictures are stored in raw form (that is, not using any compressed file format), please answer the following questions.
Calculate how many bits of information would be used to represent a single such picture. 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.
Approximately how many pictures could be stored on a 512MB memory stick?
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.
Read through the description and examples of LZW compression from
Ch. 1.8 of the text, and then answer