Exercise 1 -- Introduction & the Physical Layer

Due the week of Feb. 10, 2003

Our first week of readings and exercises will cover two topics. The first goal is to give you a general (and gentle) introduction to computer networking. As part of this introduction, you will learn about the OSI model for computer networking. This model is an attempt to specify (in the form of a recognized international standard) the facilities that must be provided to support computer communication. The OSI model organizes these facilities into a hierarchy of 7 layers. The lowest level of the OSI model's hierarchy is the physical layer which involves "transmitting raw bits over a communication channel." Our second goal for this week will be to learn enough about the physical layer to appreciate the ways in which the physics of the communication media used places constraints on and provides opportunities for computer communication.

The readings for the week will come from our textbook (Peterson and Davie) and from texts by Tanenbaum and Walrand. I will put copies of the required material from Tanenbaum and Walrand and online in PDF form. You can access the online version from the course web page:

http://www.cs.williams.edu/~tom/courses/336

I should warn you that this is one of the few weeks where all the readings will come from textbooks. Most weeks, I will ask you to read sections of research papers that complement the material in the text.

For your introduction to networking, I would like you to read Chapter 1 of Peterson and Davie up to but not including §1.3.3 (pp. 1-48) and the first two sections of Chapter 2 (pp. 68-83).

Unfortunately, while Peterson and Davie admit the existence of the physical layer in Chapter 1, they largely ignore it in the rest of their text. Section 2.1 and 2.2 of their book is all the coverage they provide of this layer.

To compensate for this, I would like you to read some sections from Tanenbaum, and sections from two different editions of a text by Walrand. The readings from Tanenbaum discuss transmission media and introduce the use of Fourier analysis to understand transmitted signals. The readings from Walrand reinforce the materials from Tanenbaum and include details on several widely used schemes for encoding information for transmission.

I would like you to read §2.1 through §2.2 of Tanenbaum (pages 85-99 ). In addition, I would like you to read §3.1 and §3.3 from the first edition of Walrand's text (pages 69 - 83 and 97 - 113). Finally, §7.1 (pp. 202-213) of the second edition of Walrand's text provides descriptions of some standard encoding schemes.

Exercises

  1. In their discussion of resource sharing (§1.1.2), Peterson and Davie explain one advantage of breaking large messages into smaller units called packets. Links can be more easily shared among multiple streams of messages if those messages are broken down into smaller pieces.

    Breaking messages into packets can also be advantageous even if only a single flow of data is using a link. This is because in a switched computer network a receiving switch will usually begin forwarding a message or packet to its eventual destination only after the entire message or packet has been received.

    1. Suppose that some message consisting of a large number, K, bits of data is being transmitted from host A to host C through a single switch B. Assume that each packet sent consists of 16 error-control bits, 32 bits of address and P data bits and that the transmission rate is R bits/sec. Ignoring propagation delays, how much time would elapse between the beginning of transmission from A and receipt of the last bit at C if the packet size was so large that the message could be sent as a single packet ( i.e. with P >= K)?
    2. If instead K/P >> 1, what would the time required to deliver the message be?
    3. What value of P would minimize the time required in the case of K/P >> 1?
    4. What impact would accounting for the propagation time required have on this problem?
  2. Suppose bits are transmitted from Berkeley, California to Boston over an optical fiber at 1.8 Gbps (1 Gbps = 109 bps) going through simple repeaters as needed to amplify the signal. The propagation speed is 2 x 105 km/s. The total length of the fiber is 3,200 miles (1 mile = 1.6km). Determine how many bits have been transmitted and are propagating over the fiber when the first bit reaches Boston. That is, determine the bandwidth-delay product for the link. How "long" (in meters) is each bit?
  3. Suppose bits are transmitted from Bronfman to Jesup over an optical fiber at 10 Mbps (1 Mbps = 106 bps). The propagation speed is 2 x 105 km/s. The total length of the fiber is approximately .5 km. Determine how many bits have been transmitted and are propagating over the fiber when the first bit reaches Jesup. How "long" (in meters) is each bit? (This is not quite an accurate description of how bits do travel from Bronfman to Jesup because our fiber network runs at 100 Mbps, but the data rate of 10 Mbps is accurate for much of the campus network.)
  4. Sketch the encoding for the bit stream: 00011101 using
    1. bipolar modulation (i.e. NRZ),
    2. on-off keying (OOK),
    3. manchester encoding,
    4. non-return to zero with inversion (NRZI) in conjunction with the 4B/5B code, and
    5. frequency shift keying.
    What advantages does each scheme possess?
  5. Walrand presents an analysis that predicts the frequency spectrum found in the signal produced when an alternating sequence of 0's and 1's is encoded using frequency shift keying (pp. 106-107 of 1st edition reading). He concludes that the resulting signal has a bandwidth of f1 - f0 + 5R where f0 and f1 are the two carrier frequencies used and R is the rate at which binary symbols are being transmitted. The "5" is his formula is the result of the unjustified claim that the bulk of the power of the signal is found in the first five components of its Fourier series.

    I would like you to perform a similar analysis for one of the other broadband modulation schemes, phase shift keying. Determine the spectrum for the signal generated when the binary sequence 01010101... is encoded using PSK. Using Walrand's assumption that the first five terms of the Fourier series determine the bandwidth required for the signal, what bandwidth will this signal require? How does this compare to FSK?

  6. Both Tanenbaum and Walrand touch on the importance of Fourier analysis to the understanding of the transmission of signals through various channels. You might have noticed that while Tanenbaum and Walrand both claim to be talking about "Fourier analysis", their explanations of what Fourier analysis is appear contradictory. Tanenbaum claims that Fourier showed that any periodic function f(t) can be written as a sum of sines and cosines (page 86):
    g(t) = (1)/(2)c + SUMn = 1inftyan sin( 2 pin f t ) + SUMn = 1inftybn cos( 2 pin f t )
    Walrand, on the other hand, states that Fourier analysis is based on the fact that any signal can be expressed as a sum of sine waves where a sine wave is defined to be a function of the form (page 99 in 1st edition reading):
    s(t) = A sin( 2 pif t + theta)
    To make matters worse, in his first example of such a "sine wave" decomposition, Walrand uses cosines instead of sines! ( see equation 3.12 in Walrand's text).
    1. First, show that it is fair for Walrand to use "cosine waves" instead of "sine waves". That is, show how to express any cosine wave as a sine wave.
    2. Suppose that we restrict Walrand's scheme by limiting our attention to sums of sine waves with frequencies that are multiples of some base frequency. That is, we claim that any signal can be expressed as a sum of the form:
      g(t) = (1)/(2)c + SUMn=1inftyAn sin( 2 pin f t + thetan )
      Show that any sum, of this form can be rewritten in Tanenbaum's form.
    3. Again restricting your attention to sums of sine waves whose frequencies are multiples of some base frequency, show that any function written in Tanenbaum's form can be written as a sum of sine waves (i.e. no cosines allowed).
    Hint: Almost all you will need to do these problems is the identity
    sin( alpha+ beta) = sinalphacosbeta+ sinbetacosalpha
    and the values of the sine and cosine functions at key values such as sin0 = 0, cos0 = 1, sin(pi/2) = 1 and cos(pi/2) =0. For part (c), you may want to remember the arctangent function (although it isn't really necessary).
  7. One reason Fourier analysis is important to communications is that it can be used to understand how signals are distorted, even if transmitted on a channel that was somehow completely free from noise.

    This comes from the fact that "transmission lines do not distort sine waves; they only delay and attenuate them" proven by Walrand (pages 99 and 100). Walrand's proof depends on the use of complex number (for which he appropriately apologizes). Now that you know all the ways in which a sum of sine waves can be written (from problem 6) it is fairly easy to show this result without using complex numbers. So, show that in a linear, time-invariant system with input

    x(t) = A sin(2 pif t )
    the output will be a sine wave with the same frequency. Note, it is fine if you actually show that the output is either a simple sine wave of the form
    y(t) = B sin(2 pif t + theta)
    or a cosine wave of the same form or a sum of a sine and cosine:
    y(t) = Bs sin(2 pif t ) + Bc cos(2 pif t )
    Hint: Use the formula for the sine of a sum from the previous problem's hints to calculate the output y'(t) produced in response to the input x'(t) = x(t + a). Use the linearity of the transmission channel to express y'(t) in terms of the still unknown output function y(t). Now, consider y'(t) for the two cases a = -t and a = (1)/(4f) - t. This will give you two equations that you can solve for y(t). The final expression should have the desired form, although it will be expressed in terms of two unknown (but constant) values of y(t), namely y(0) and y((1)/(4f)). For this problem, you may also find it helpful to recall that sin-x = - sinx and cos-x = cosx.
  8. As explained in both texts, different rays of light take different paths through a fiber and therefore take different amounts of time to reach the receiver. If eta1 and eta2 are the indices of refraction of the core and cladding of a fiber respectively, then the slowest rays make an angle theta with the axis of the fiber, where costheta= eta2/eta1. Determine a formula for the time it would take the fastest rays (i.e. the rays propagating parallel to the fiber) to propagate a distance L. Determine the distance the slowest rays travel along the fiber in the time it takes the fast rays to travel the distance L. Assuming the transmission rate is R, how wide is a bit when it is first transmitted? How wide is a bit by the time it has propagated a distance L? How do these results relate to formula (3.2a) in Walrand?

Computer Science 336
Department of Computer Science
Williams College