Select any five of the following eight questions. If you work more than five questions, the first five I see will be graded. Write your answers in clear complete English; use a word processor if you have one.
1. SOUND. (a) 10 pts. The speed of sound in water is 1430 meters per second in water. If a dolphin emits a squeak at a frequency of 35 kiloHerz, what is the wavelength of the squeak?
(b) 20 pts. MIDI sound. Is a MIDI signal more like a telephone signal or a telegraph signal? Explain and justify your answer. If you've never heard of a telegraph, then substitute "e-mail message."
(c) 20 pts. Human speech can be physically described as quasi-stationary, and as consisting of formants. Explain these concepts in your own terms. Illustrate these ideas by describing the difference between the pronunciation (shape of the mouth) and sound (actual audio signal produced) by speaking the letter names O, E and S. (Yes, you have seen this question before in the Queries. I hope you took good notes when we discussed this Query!)
2. GRAPHICS. (a) 20 pts. Construct a 3 x 3 homogenous matrix which rotates data points 45 degrees clockwise about the origin.
(b) 30 pts. Draw the picture represented by the following list of points
and commands. Then apply the following homogenous matrix to this list of
points. Write down the new points, and draw the picture they represent.
Then tell me what transformation (that is, what movement in two dimensional
space) the matrix produces.
Command X Y Moveto 0 0 Drawto 0 2 Drawto 1 3 Drawto 2 2 Drawto 2 0 Drawto 0 0 |
0 .5 2 M =-.5 0 0 0 0 1 |
(b) 30 pts. Explain in your own words, and briefly, how the NTSC video system transmits a signal which can be interpreted as a monochrome (black and white) signal by the 7 people in North America who still have black and white TV sets, and as a color signal by the rest of us. Your explanation should intelligently incorporate the term degrees of freedom.
4. DATA COMPRESSION. (a) 20 pts. Consider a set of images consisting of an array of 1024 x 1280 0's and 1's. Describe a run length encoding method appropriate for storing these images. Then figure out an image which would produce the SHORTEST possible encoded message. Describe the image and provide the message. Figure out an image which would produce the LONGEST possible encoded message. Describe the image and the message (providing it, in detail, would be rather tedious.)
(b) 30 pts. In discussing frequency-domain encoding of images, we worked with the 1-dimensional Walsh transform to explain the essential details of the 2 dimensional Discrete Cosine Transform. The basic idea was to break a signal down into its components, sorted by frequency.
Consider this signal: 2 1 2 1 1 0 1 0. Plot it as a graph, with time in eight steps on the horizontal axis. Now examine what you have. Do you see a frequency which could be subtracted in order to make the left and right halves of the signal more similar? In other words, you will manually construct the Walsh frequency transform of this signal. Ultimately it will be represented as an 8-vector of numbers, of the form T=(a b c d e f g h) where a is the DC component, b is the next slowest (longest wavelength), etc. HINT: Only 2 of these numbers will be non-zero. HINT 2: the Basis Vectors B0..B7 in your lecture notes are Very Helpful in this task!
To check your work, multiply the transform matrix M times T as a column vector. M is constructed by using B0..B7 as its columns.
5. OPTICAL STORAGE.
(a) 10 pts. Error correcting codes are essential to optical storage devices. An older form of ECC was represented by the two dimensional parity code used in 9-bit data tapes. Detect and correct the error in the following odd-parity record, on a fictional 5-bit data tape. (Easier to type!) Why was odd parity preferred to even parity?
1 0 1 0 1 1 1 1 1
0 0 0 1 0 1 0 0 1
1 1 1 0 0 1 0 1 1
0 0 1 1 0 1 0 0 0
1 0 0 1 1 1 0 1 0
(b) 20 pts. Error correcting codes are based on the concept of redundency. Describe the "dumbest possible" (i. e. most wasteful) form of single bit error correcting code. What is its redundency factor (ratio of transmitted to useful delivered bits). Also, briefly describe the logic behind efficient error correcting codes - i. e. those which use only the amount of extra information required.
(c) 20 pts. List the essential differences between a DVD storage device and a CD-ROM storage device.
6. HTML FORMS. (a) 20 pts. Write the HTML which produces a neat column of seven radio buttons controlling a shared variable, with captions on the right side of each button readung "Freshman", "Sophomore", "Junior", "Senior", "Master's", "Doctorate" and "Perpetual Student"
(b) 30 pts. Write a CGI script in Perl, which reads a form with a multi-line text field, and prints out GOTCHA if, anywhere in the text field, the expression "Santa Claus" appears.
7. CGI SCRIPTS. (a) 20 pts. In Lab 1, we are using two different server applications - one to generate the dynamic form containing the initial inventory, and another to accept the form and compute the user's cost. Write a small sample of Perl code which would allow these services to be performed by a single server. You can use hidden input variables to tell the software which service to perform, and you can represent the services themselves by calls to procedures (which you don't have to provide.)
(b) 30 pts. Write Perl code which accepts a series of label-value pairs (like "name=Joe"), puts them into an associative array, and prints out the message "DUPLICATE DETECTED" if the same label occurs again with the same value. If a label occurs again but with a different value, your code prints out the message "LABEL UPDATED".
8. GHOSTSCRIPT. (a) 20 pts. Write a Ghostscript program to draw
an upright square with its lower left corner at the origin,and sides of
length 50 pixels.
(b) 30 pts. Write a Perl script which produces a Ghostscript program
to draw the following shape, of height specified by the Perl variable $height,
located at a location specified by variables $xcenter and $ycenter.