Comp 346 - Spring 2003 -- Dordal -- Homework 1 solutions 2.1 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. 2.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. 3.10 You are adding 25% more bandwidth. Thus, you can either increase the number of vertical lines by 25%, or increase the number of pixels horizontally by 25%. 3.14 (a) 1200 (b) 600 #levels = 2^(#bits) = M; log_2(M) = #bits 4.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 Grounding the outer conductor provides electrical shielding. 5.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. 5.8 9.2 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. 10.1 For circuit switching, idle time still uses the circuit. For packet switching, idle time costs nothing. 10.2 Circuit-switching: delay = S + ND + L/B = 537 ms packet switching [I made an arithmetic error in my original solution, and got 774; if you didn't get credit and think you should, see me.] 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 107 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 640 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 660 ms total bandwidth delay. We now add 4 ms of propagation delay (D*N) to get a grand total of: 664 ms virtual-circuit delay: We add the setup time of 200 ms to the above, yielding 864 ms.