CS 105 - Final Examination

Friday, December 12, 1997
NAME:
Question Points Score
1 16
2 5
3 6
4 20
5 5
6 6
7 6
8 4
9 4
10 4
11 4
12 4
13 5
14 5
15 6
TOTAL 100
There are 15 questions on this examination. The point values associated with the questions are shown in the table above. You have 150 minutes to complete the examination. You should not consult any references while completing this examination. Show all answers in the spaces provided in the examination booklet. Paper for scrap work will be made available.

  1. Indicate whether each of the following statements is true or false:

    1. The Caesar Cipher is an example of a secure secret key encryption technique appropriate for use on the Internet.

    2. Frequency division multiplexing can be used with either analog or digital data.

    3. Public key encryption allows different people to use the same encryption key when they are not supposed to know the contents of the messages others are sending.

    4. Visible light and electromagnetic waves are basically the same thing.

    5. Modern program development techniques have eliminated flaws like the buffer overrun problem in the finger server that was exploited in 1987 by the Internet worm.

    6. Two pairs of computers can communicate simultaneously on a token ring as long as the sections of cable that connect the members of each pair do not overlap with the sections connecting the other pair.

    7. Messages sent using the IP protocol may be delivered in a different order than the order in which they were sent.

    8. All messages transmitted through the Internet are encrypted to ensure privacy.

  2. Encode the message "SECRET" using the Vigenere cipher with the key "BE".

  3. Each packet transmitted through a network follows a format that partitions the binary digits in the message into distinct units. As we have seen, depending on the protocols used, these units may include such things as the:

    1. ethernet destination address

    2. ethernet source address

    3. packet length

    4. IP destination address

    5. IP source address

    6. TCP port number

    7. Error detecting code

    1. When an internet router examines a packet to decide how to forward the packet to its intended recipient, which of the fields listed above might it examine? (Just list the appropriate letters.)

    2. When an Internet firewall examines a packet to decide whether to forward it to its intended recipient, which of the fields listed above might it examine?

  4. Each of the following samples of HTML are a) derived from pages created by members of this class, and b) examples of either incorrect or inapproriate use of HTML.

    For each example, please briefly explain the problems with the HTML shown and indicate how to modify the HTML to make it correct while producing what the author appeared to have in mind. You can either clearly mark up the code shown or write a complete revision in the space provided.

    For the examples using "form" tags, you should assume that the fragment was extracted from a valid pair of opening and closing FORM tags.

    1. <H3><FONT SIZE=+3><CENTER>
      1997-98
      </CENTER> 
      <BR> 
      <CENTER>
      SOME INTERESTING HEADER
      </FONT></CENTER>
      </H3>
      

    2. <HR size=5>
      
      <TABLE align=left>
      <TD><IMG SRC="guesswhat.jpeg" WIDTH="288" HEIGHT="214"></TD>
      </TABLE>
      <P>
      i don't remember much...
      

    3. <UL>
      <table>
      <tr>
      <td></td>
      <td>
      <li><A HREF="someplace.html">HOME AWAY FROM HOME</A></li>
      <li><A HREF="someplaceelse.html">MY NEIGHBORHOOD</A></li>
      <li><A HREF="elsewhere.html">PARIS</A></li>
      </td>
      <td></td>
      </table>
      </UL>
      

    4. <p>
      Choose one of the following:
      <p align=center>
          <input type="radio" name="hereBefore" value="RadioButton">
          Done This</p>
      <p align="CENTER"> 
          <input type="radio" name="neverHere" value="RadioButton">
          Never Tried</p>
      

    5. <p>
      Indicate as many of the following that describe your experience:
      <UL>
      <LI>
          <input type="checkbox" name="Informative" value="CheckBox">
          Informative
      <LI>
          <input type="checkbox" name="educational" value="CheckBox">
          Educational
      <LI>
          <input type="checkbox" name="amusing" value="CheckBox">
          Amusing 
      </UL>
      

  5. My home telephone number is 413 458 9354 but when my phone bill arrives the phone company tells me that my account number is something like 413 458 9354 706. Given material covered in this class, why do you think the phone company doesn't just use the telephone number itself as my account number? What are the extra digits added for?

  6. A version of the code needed to set up everything for the color selection applet you created for Lab 7 this semester is shown below. As the assignment suggested, the code shown sets things up so that the scrollbars initially control the color of the background. Suppose you instead wanted the scrollbars to initially control the text color. Show all the changes that would need to be made to the code shown below to make the scrollbars initially control the text color. The changes you make should ensure that all the interface components (the scrollbars, choice and subcanvas) are displayed in a form consistent with this change.
     void begin() {
                
           red= new Slider(255,0,255,150);
           add(red);
           add(new Label("Red"));
           
           blue= new Slider(255,0,255,150);
           add(blue);
           add(new Label("Blue"));
           
           green= new Slider(255,0,255,150);
           add(green);
           add(new Label("Green"));
           
           item= new Choice();
           item.addItem("Background");
           item.addItem("Text");
           add(item);
           
           pad= new SubCanvas(this,200,100);
           add(pad);
           
           redbg=255;
           bluebg=255;
           greenbg=255;
    
           redtext=0;
           bluetext=0;
           greentext=0;
           
           textOrBg="Background";
           
           showDisplay();
        }
    

  7. Explain two significant differences between IP and TCP.

  8. Many network protocols depend on other network protocols to deliver message for them. To accomplish this, the software responsible for implementing one protocol "stuffs" a message in that protocol's format into the data area of a message/packet of the format used by another protocol and then asks the software or hardware that implements the other protocol to deliver the message.

    For each of the following protocol pairs, indicate whether the first protocol is always/sometimes/never used to deliver messages by the second protocol by circling the appropriate choice. If cases where protocol A depends on protocol B and then in turn protocol B depends on protocol C, you should state that protocol A also depends on protocol C.

  9. If Alice want to send a signed message to Bob (not necessarily privately) she should:

    1. encrypt the message with Bob's public key.

    2. encrypt the message with her own public key.

    3. encrypt the message with Bob's private key.

    4. encrypt the message with her own private key.

  10. if Alice want to send a private, signed message to Bob she should:

    1. encrypt the message with her own private key.

    2. encrypt the message first with Bob's public key and then with her own private key.

    3. encrypt the message first with her private key and then with Bob's public key.

    4. enrypt the message first with her private key and then with her public key.

  11. Three unlabeled waveforms are shown below. One represents a carrier wave, one a digital signal to be transmitted and the last a modulated wave for transmission. Label each waveform appropriately.

  12. Three unlabeled waveforms are shown below. One represents a carrier wave, one an analog signal to be transmitted and the last a modulated wave for transmission. Label each waveform appropriately.

  13. Error correcting codes are used on CD's, but they are rarely used in network messages. Describe what is used instead and explain why.

  14. Recall that the technique on which Ethernet is based is called CSMA/CD -- Carrier Sense Multiple Access with Collision Detection. The "CS" part (Carrier Sense) refers to the fact that each station listens to the network before it starts transmitting and waits if it hears a transmission in progress. The "CD" part (Collision Detection) refers to the fact that while a station is sending its own packet it listens to see if anyone else starts sending at the same time and stops its own transmission if it hears some other station's transmission mixed in with its own.

    Suppose defective ethernet hardware was installed on all the computers on an ethernet so that none of them did the "CS" part. Would this:

    1. Increase the average rate at which message could be delivered,

    2. Have no effect,

    3. Reduce the average rate at which message could be delivered, or

    4. Make it impossible for the network to deliver any messages.
    BRIEFLY, justify your answer.

  15. One problem with using simple on-off keying to transmit digital data is that long sequences of repeated 0's or 1's produce a "flat" signal that gives the receiver no regular transitions that can be used to keep its timer synchronized with the sender.

    Suppose that to increase reliability, extra parity bits are added to data ultimately being transmitted using on-off keying.

    1. If odd parity is used and an extra parity bit is added after every seventh data bit (to form 8-bit units with odd parity), what is the longest sequence of repeated 0's or 1's that can actually be transmitted? Briefly explain your answer.

    2. Suppose that instead a parity bit is added after every eight bits (to form 9-bit units with odd parity), what is the longest sequence of repeated 0's or 1's that can actually be transmitted in this case?