Comp 346/446: Telecom Midterm guide solutions Dordal ======================================================================= Here are solutions to some of the book exercises on the study guide. Numbering is 9th_edition/8th_edition/7th_edition, with headings to indicate the chapter. Chapter 2 4/4/4 The idea is for the first general to resend a messenger if an answer hasn't been received in a reasonable amount of time; this represents *timeout and retransmission*. Three-way handshakes don't help here! In a military situation there may be time constraints forcing a very small value of timeout, in which case you are basically sending several messengers in parallel, but that is another issue. 6/6/7 (a) No; there is no reason for the layer-N header to be replicated in each (N-1)-layer fragment. The fragments will each need an address, of course, but that will be an essential component of the (N-1)-layer header. (b) For consolidation, it is very difficult to consolidate the N-layer headers because it is hard to guarantee that the N-layer packets have any specific relation to one another. If the packets are not related, then each will need to keep its own header. ======================================================= Chapter 4 2/2/2 output noise = 0.0045 mw; output signal = 5 mw (input signal = 500 mw, reduced 100-fold, ie by 20dB). SNR - 0.0045 / 5; taking logs, we get 30.5dB 4/4/4 Grounding the outer conductor provides electrical shielding. 6/6/6: The wavelength is 10,000 km. Half that, in miles, is 3,000 miles. Perhaps the sub could trail out a *very* long wire behind it? ======================================================= Chapter 5 7/7/7 Manchester: 0 = transition from high to low. Note that the last half-cycle of a previous bit interval is shown. The data is 1 1 1 0 0 1 1 0 1 0 However, there is no reason to have provided the last half-cycle of the previous bit unless *differential* manchester was being used (which is what is normally thought of as "Manchester"); if the question was about differential manchester, the answer would be 0 0 0 1 0 1 0 1 1 1. 8/8/8 (a). NRZ-L: A long stretch of 0-level (indistinguishable from no-signal), followed by a high pulse representing the 1-bit, followed by 0-level again. (b). Bipolar-AMI: +-+-+-+-+-+-+-+-0+-+-+-+-+-+- ... (c). Pseudoternary: 0000000000000000+00000000000000 ( ^ could be - too, depending on previous 1-bit) I've put NRZ, NRZI, Manchester, Bipolar-AMI, and B8ZS on the formulas sheet. If I ask about any other similar encoding, I'll define it for you also. 18/18/17: Delta modulation only works where the signal changes relatively slowly. Yet digital signals almost invariably have very sharp transitions. ======================================================= Chapter 7 1/1/1 Line utilization is the fraction of time the sending station spends actually sending, versus waiting for the ACK. If transmit_time is the time it takes to send a packet (ie bandwidth time), and prop_time is the ROUND TRIP propagation delay, this is transmit_time / (transmit_time + prop_time) Since bandwidth is fixed, transmit depends only on the frame size. (a). Frame size is unchanged, so there is no significant utilization change (b). frame size DECREASES, so the utilization goes down (b). frame size increases, and so does utilization 4/4/4 We have 1 frame per ms, with a 270 msdelay. The book does not make clear whether that 270ms includes the 1ms needed to send a frame, or doesn't. I will assume the former. (a) 1/270 (the fraction, that is) (b) 7/270 (c) 127/270 (d) 255/270 5/5/4 A can send to B 3 frames in 50 ms On the B--C link, each frame takes 10+x ms, where x is the time to transmit one frame (10 is the propagation delay) Equating, we need 3*(10+x) = 50, or x = 6.67 ms/frame, which means the B--C bandwidth must be 150kbps 10/10/9 Diagrams as indicated. Note that there are no packet losses, so the ARQ mechanism does not matter. For (c), A has sent 0,1,2,3,4,5, B has sent ACKs 0, 1, 2, 3, and just sent ACK 4 ======================================================= Chapter 8 7/7/7 The receiving station monitors this frame bit position to be sure that, over a series of several frames, a specified pattern is seen. T1 uses a pattern of 12 bits, so 12 frames must be observed. According to Stallings, a typical bit pattern is 101010101010. 10/10/10 Diagram. You won't have to produce diagrams like this on the test, but you should understand what Figure 8.8 means. The analog signal, after PCM encoding, has a rate of 4000 bps. The four digital inputs, if you use pulse-stuffing to raise the rate as recommended, are now 400 bps. Therefore, the combined output rate would be 5600 bps (5200 bps if you didn't use pulse stuffing). You didn't have to do this, but, with pulse stuffing, a plausible frame might be 1 byte from each of the four digital inputs, followed by 10 bytes from the analog input. The frame rate would be 50 frames/sec (so 1 byte/frame would be 50 bytes/sec, or 400 bits/sec; 10 bytes would be 4000 bits/sec). 17/17/17 30 calls * 6 bits/call = 180 bits, plus 1 bit for framing 181 bits/frame * 8000 frames/sec = 1448 kbps. ======================================================= Chapter 10 1/1/1 Phones are used on average 24 minutes out of each 8-hour day, or 5% of the time. So, 20 phones means that on average one is used at a time. 10% of the calls are long distance, so for every 200 phones, we need one long-distance channel (10% of 200 is 20). The text is unclear about how many channels there are. If you assume one voice channel is 4mHz, and that channels can be packed tightly together, then there are 1mHz/4kHz = 250 channels and we can support 200*250 = 50,000 phones. If you assume that the trunk handles 1mbps, and each phone needs 64kbps (normal T-carrier numbers), then the trunk can handle 1mbit/64kbit = 16 channels, for a total of 16*200 = 3200 phones. 3/3// See extra problem #8 below. 4/4/3 For circuit switching, idle time still uses the circuit. For packet switching, idle time costs nothing. 5/5/4 Circuit-switching: delay = S + ND + L/B = 537 ms packet switching There are three whole packets, each with 1008 bytes of data, 1024 bytes total, and one final packet of 176 bytes data / 192 bytes total. One whole packet takes 1024/B bandwidth delay, or 125 ms. There are *six* such delays: on link one we have three, and then one additional such delay for each of the three subsequent links. This is a total of 750 ms. We also have the 192-byte packet; this takes 20ms. We count *one* such delay, as this packet traverses the final link; whenever this packet is on an earlier link there is also a whole packet on the next link and the whole-packet time was counted previously. We thus have 770ms total bandwidth delay. We now add 4 ms of propagation delay (D*N) to get a grand total of: 774 ms virtual-circuit delay: We add the setup time of 200 ms to the above, yielding 974 ms. ======================================================================= ======================================================================= Solutions to my additional problems ======================================================================= ======================================================================= > 1. Give a possible explanation for transmission distortion that is based on > Fourier analysis. This one is pretty vague. The idea is that: * every signal can be represented as a sum of sine waves * distortion for sine waves is usually easier to analyze For example, in many cases sine waves aren't "distorted" at all, but different frequencies are attenuated by different amounts. The net effect for non-sine waves may indeed be distortion, as the overall shape is changed as the differently attenuated sine waves are reassembled. ======== > 2. Why is digital data often encoded via an analog signal? Having an analog "carrier" often improves reliability over long distances. ======== > 3. Give some advantages of microwaves versus land lines, for long-distance > transmission. * Microwaves may be cheaper. The cost of stringing wire is significant. * Any kind of cable is subject to exponential attenuation: if the signal is reduced by 1/2 in one distance unit, then it is reduced by 1/2^n in n distance units. Attenuation of wireless transmission is, in the long run, subject to much less attenuation due to the inverse-square law: if the signal is reduced by 1/2 in one distance unit then it is reduced by 1/2n^2 in n units, and as n gets large this means *much* less strength reduction. ======== > 4. List some disadvantages with NRZ encoding for long lines (>= 10 km). > Which, if any, are addressed by NRZI? > Which, if any, are not an issue for shorter lines? The problems with NRZ encoding are: * long runs of 1's or 0's are hard to keep count of * There is a significant DC component, and if that gets lost the signal is lost * the receiver must receive and recognize a specific voltage. NRZI can reliably send long strings of 0's (assuming 0 = transition), but still loses count sending 1's. By switching to transitions rather than absolute voltage levels, NRZI also fixes the third problem. For shorter lines, the last two issues are not significant; they become significant, however, for long lines. ======== > 5. Suppose we take a 4-kHz voice signal and digitize it to a 56kbps signal. > (a). What frequency bandwidth is needed to transmit this using binary signaling, > so the signaling rate is also 56kbps? > (b). What bandwidth is needed if we use 16-level signaling? How many bits can > be sent in a single signal element? 56kbps = 2B logM. For (a), logM = 1, and so B = 28 kHz. For (b), M=16 and logM = 4; each signal element encodes 4 bits. We have 28 kHz = B * 4, or B = 7 kHz. ======== > 6. Consider the following sequence of virtual-circuit routers, and tables. > > D > | > link3 > | > [1] > A------link1-------[0]-B-[1]------link2---------[0]-C-[2]-----link4------E > vc vc port vc vc port > in out out in out out > 3 5 1 5 4 2 > 4 2 1 2 3 1 > List the VC used on each link as A sends to D 4 2 3 A-------B-------C-------D > List the VC used on each link as A sends to E 3 5 4 A-------B-------C-------E ======== > 7. Why are virtual circuits called that? That is, why are they like circuits, > and why is the adjective "virtual" there? Circuits can be defined as ways to send a stream of bits at a specified bandwidth. Virtual circuits provide this capability. However, they do entail some delay due to the need to wait for a packet to fill with data before it can be sent; while this delay is often small if the packet size is small, it is usually much larger than the corresponding circuit delay. > 8. Look at the three-stage space division switch in Fig 10.6 (all editions). > Modify it so the second stage has 3x3 crossbars instead of 2x2, and any > three connections can be made. What other changes do you have to make? In order to do this, the left-and-righthand sides will change from 5x2 to a series 3x3, 3x3, 4x3 (since 10 is not divisible by 3).