You are on page 1of 6

Due: April 8, 2004

Spring 2004

ENEE 426: Communication Networks Dr. Narayan TA: Quang Trinh Problem Set 2 Solution
1. (3.57) An early code used in radio transmission involved using codewords that consist of binary bits and contain the same number of 1s. Thus, the 2-out-of-5 code only transmits blocks of 5 bits in which 2 bits are 1 and the others 0. Solutions follow questions: a. List the valid codewords. 11000 10100 10010 10001 01100 01010 01001 00110 00101 00011 b. Suppose that the code is used to transmit blocks of binary bits. How many bits can be transmitted per codeword? There are 10 possible codewords. Three bits per codeword can be transmitted if eight codewords are used. c. What pattern does the receiver check to detect errors? Each received codeword should have exactly two bits that are ones and three bits that are zeros to be a valid codeword. d. What is the minimum number of bit errors that cause a detection failure? A valid codeword can be changed into another valid codeword by changing a 1 to a 0 and a 0 to a 1. Therefore, two bit errors can cause a detection failure.

2. (3.63) Let g1(x) = x + 1 and let g2(x) = x + x + 1. Consider the information bits (1,1,0,1,1,0). a. Find the codeword corresponding to these information bits if g1(x) is used as the generating polynomial. Codeword = 1101100
3 2

b. Find the codeword corresponding to these information bits if g2(x) is used as the generating polynomial. Codeword = 110110111 c. Can g2(x) detect single errors? double errors? triple errors? If not, give an example of an error pattern that cannot be detected. Single errors can be detected since g2(x) has more than one term. Double errors cannot be detected even though g2(x) is primitive because the codeword length exceeds 2 -1=7. An example of such undetectable error is 1000000010. Triple errors cannot be detected since g2(x) has only three terms. d. Find the codeword corresponding to these information bits if g(x) = g1(x) g2(x) is used as the generating polynomial. Comment on the error-detecting capabilities of g(x). Codeword = 1101100011 The new code can detect all single and all odd errors. It cannot detect double errors. It can also detect all bursts of length n k = 4 or less. All bursts of length 5 are detected except for the burst that equals g(x). The fraction 1/2 = 1/16 of all bursts of length greater than 5 are detect 3. (5.18) A 64-kilobyte message is to be transmitted from the source to the destination. The network limits packets to a maximum size of two kilobytes, and each packet has a 32-byte header. The transmission lines in the network have a bit error rate of 106, and Stop-and-Wait ARQ is used in each transmission line. How long does it take on the average to get the message from the source to the destination? Assume that the signal propagates at a speed of 2 x 105 km/second. Solution: Message Size Max Packet Size Packet Header Available for info # of packets needed Total 65536 bytes 2048 bytes 32 bytes 2016 bytes 32.51 packets 33 packets 1E-06 16384 0.016251 1 (1 bit_error_rate) ^ (bits/packet) 2E+05 Km/s 1000 Km 1.5 Mb/s
n-k n-k

bit error rate bits/packet Probability of error in packet Propagation speed Distance Bandwidth

We assume that the ACK error, the ACK time, and processing time are negligible. Tprop Tf T0 Pf E[Ttotal] = distance / propagation speed = 0.0050 s = packet size / bandwidth = 0.0109 s = Tprop + Tf = 0.0159 s = probability of error in packet = 0.016251 = T0/ (1 - Pf) = 0.0162

There is pipelining effect that occurs as follows: After the first packet arrives at switch 1, two transmissions take place in parallel. The first packet undergoes stop-and-wait on the second link while the second packet undergoes stop-and-wait in the first link. The packet arriving at the switch cannot begin transmission on the next link until the previous packet has been delivered, so there is an interaction between the transmission times of the two packets. We will neglect this effect. The time to send every packet over two links is then the initial packet transmission time + 33 additional packet timess, and so the average time is E[Ttotal] * 34 = 0.522 seconds.

4. (5.20)

The Trivial File Transfer Protocol (RFC 1350) is an application layer protocol that uses the Stop-and-Wait protocol. To transfer a file from a server to a client, the server breaks the file into blocks of 512 bytes and sends these blocks to the client using Stop-and-Wait ARQ. Find the efficiency in transmitting a 1 MB file over a 10 Mbps Ethernet LAN that has a diameter of 300 meters. Assume the transmissions are error free and that each packet has 60 bytes of header attached. Solution: The propagation delay in an Ethernet LAN is negligible compared to the total transmission time of a packet from start to finish. Ignoring processing time and using the terminology in the chapter, we have:

to = t f + tack =

8(512 + 60) 64 + = 4.64 10 4 6 6 10 10 10 10 n f no 8 512 to R


4 = 4.64 10 = 0.8828 = 88.3 0 0 6 10 10

o = R o eff =

One more source of overhead occurs because the last packet is not full. However, this additional overhead accounts for a very small fraction of the total overhead and does not affect the above result.

5. (5.33) A telephone modem is used to connect a personal computer to a host computer. The speed of the modem is 56 kbps and the one-way propagation delay is 100 ms. Solutions follow questions: a. Find the efficiency for Stop-and-Wait ARQ if the frame size is 256 bytes; 512 bytes. Assume a bit error rate of 104. First we have the following: Pf = 1 (1 104)nf nf = 256 8 = 2048 or nf = 512 8 = 4096 tprop = 100 ms

no = 0 na = 64 bits tproc = 0 Using the results in Equation 5.4,

= (1 Pf )

1+

na 2(t prop + t proc ) R + nf nf

no nf

= 0.125 (nf = 2048) = 0.177 (nf = 4096) b. Find the efficiency of Go-Back-N if three-bit sequence numbering is used with frame sizes of 256 bytes; 512 bytes. Assume a bit error rate of 104. Given that WS = 23 -1= 7, we can calculate that the window size is:

n f Ws R

= 256 ms

Since this is greater than the round trip propagation delay, we can calculate the efficiency by using the results in Equation 5.8.

= (1 Pf )

no nf

1 + (Ws 1) Pf

= 0.385 (nf = 2048) = 0.220 (nf = 4096)

6. Each arriving batch of N packets contains a total of NL bits, requiring a transmission time of exactly NL/R secs. Hence, all these N packets would have been just completely transmitted at the arrival instant of the next batch of N packets. (Thus, there are no more that N packets in the buffer at any time.) It is now clear that all the last (i.e., Nth) packets in each batch will incur the (same) longest delay, caused by the transmission of the preceding (N 1) packets. This delay = [(N1)L]/R secs.

7. All the nodes in the network can communicate with each other provided that no more than 1 link fails. Hence, the desired probability is: P[{no link failure} U {1 link failure}] = P[no link failure] + P[1 link failure] = (1 p)6 + p(1 p)5 = (1 p)6 + 6p(1 p)5 = (1 p)5(1 + 5p). 1

8. [i] If only one link fails, clearly network connectivity is still maintained. If two links fail, network connectivity may be lost (e.g., if links ad and ab fail) or still retained (e.g., if ab and bd fail). On the other hand, if three links fail, then regardless of the failure locations network connectivity is lost. Note that three link failures must consist of the failure of three outer links or two outer links and the diagonal link; in either case, network connectivity is lost. Thus, the required minimum number of link failures = 3. [ii] There are 5 links in the network. Network connectivity may be lost if 2 links fail, but is definitely lost if 3, 4 or 5 links fail. Using the abbreviated notation: NC lost = network connectivity lost. P[NC lost] = P[ 2 fail i.e. ab, ad OR bc, cd ] + P[ 3 fail ] + P[ 4 fail ] + P[ 5 fail ] = 2p2(1-p)3 + p3(1-p)2 + p4(1-p) + p5 3 4 5 = 2p2(1-p)3 + 10p3(1-p)2 + 5p4(1-p) + p5 = 4p5 - 9p4 + 4p3 + 2p2

Note that of the = 10 distinct ways of 2 link failures, network connectivity is lost only in the case when 2

ab, ad fail or bc, cd fail.

You might also like