CSCI 112 Fall 2012
Exploring Computer Science
Archived Class
Charles Cusack
Computer Science
Hope College
Main
Schedule
Grading
Gradebook

Policies
Advice
College
    Policies

Notes
Programs
Tutorials

Others

Admin

Homework 15

Details

Do the following exercises.
ProblemPoints
#1 below6
#2 below18
#3 below6
#4 below6

    1. Assume the following string was encoded with the Hamming Code discussed in class, and was transmitted over a noisy channel. Also assume that at most 1 error occurred in each 7-bit segment. Decode the message:
      1111100 1111010 1001111 1100001 0100010 0000011 1010001
    2. Assume the following string was encoded with the Hamming Code discussed in class, and was transmitted over a noisy channel, and that it is possible that 2 errors occurred in each segment. If it is possible, decode the message. If you cannot decode it, explain why.
      1011010 1001001 1010110 1111100 0111110
  1. Consider the string zip. This problem will explore the overhead associated with error-correcting codes.
    1. Encode the string using ASCII represented in binary.
    2. Encode the string using ASCII represented in hexadecimal.
    3. Encode the string from (a) with the Hamming Code discussed in class.
    4. Encode the string from (a) with the repetition code with k=3 discussed in class.
    5. How much larger is the binary string in (c) than the original in (a)? (Give your answer in the form of "x times larger", not "It uses y more bits".)
    6. How much larger is the binary string in (d) than the original in (a)? (Give your answer in the form of "x times larger", not "It uses y more bits".)
    7. Which code is more efficient in this case: The hamming code or the repetition code with k=3?
    8. Which code is able to correct more errors? Provide details.
    9. Which code is better? Why?
    1. Decode the string FVBNVAPAOHSMYPNOA that was encrypted with a shift cipher with k=7.
    2. Decode the string YBPROBQLAOFKHVLROLSXIQFKB that was encrypted with a shift cipher with an unknown value of k. Give both the plaintext and the value of k that was used.
      Hint: You need to try several values of k until you obtain a message that is readable. You may use an online tool to do this, but you should give the URL and provide all output in your homework.
  2. There are times when people need to transmit data in such a way that it is secure, reliable, and efficient. Thus they may need to encrypt it, apply an error-correcting code, and compress it. Do you suppose it matters which order these operations are performed? In other words, should they apply an error-correcting code then compress it and then encrypt it, or do these three operations in some other order. Let's assume the data to be sent is a memo encoded in ASCII or Unicode. Suggest an order and clearly justify your ordering. (It may be important to realize that these operations are performed in the reverse order at the receiving end.)
The following problem was removed from the assignment.
  • An application stores its data in an ASCII file. Although every possible ASCII character may not appear in the file the exact same number of times, they typically appear with relatively similar frequencies. In other words, it is not like an English text file in which 'e' would be very common and 'q' and 'x' would very uncommon. Would it be beneficial for this application to store data using a Huffman encoding instead of using the ASCII encoding? Justify, being as specific as possible.