Due: April 8, 2004 Sprig 2004 ENEE 426: Cmmuicati Netwrks Dr. Naraya TA: Quag Trih Prblem Set 2 Sluti 1. (3.57) A early cde used i radi trasmissi ivlved usig cdewrds that csist biary bits ad ctai the same umber 1s. Thus, the 2-ut--5 cde ly trasmits blcks 5 bits i which 2 bits are 1 ad the thers 0. Slutis llw questis: a. List the valid cdewrds. 11000 10100 10010 10001 01100 01010 01001 00110 00101 00011 b. Suppse that the cde is used t trasmit blcks biary bits. Hw may bits ca be trasmitted per cdewrd? There are 10 pssible cdewrds. Three bits per cdewrd ca be trasmitted i eight cdewrds are used. c. What patter des the receiver check t detect errrs? Each received cdewrd shuld have exactly tw bits that are es ad three bits that are zers t be a valid cdewrd. d. What is the miimum umber bit errrs that cause a detecti ailure? A valid cdewrd ca be chaged it ather valid cdewrd by chagig a 1 t a 0 ad a 0 t a 1. Therere, tw bit errrs ca cause a detecti ailure. 2. (3.63) Let g 1 (x) = x + 1 ad let g 2 (x) = x 3 + x 2 + 1. Csider the irmati bits (1,1,0,1,1,0). a. Fid the cdewrd crrespdig t these irmati bits i g 1 (x) is used as the geeratig plymial. Cdewrd = 1101100
b. Fid the cdewrd crrespdig t these irmati bits i g 2 (x) is used as the geeratig plymial. Cdewrd = 110110111 c. Ca g 2 (x) detect sigle errrs? duble errrs? triple errrs? I t, give a example a errr patter that cat be detected. Sigle errrs ca be detected sice g 2 (x) has mre tha e term. Duble errrs cat be detected eve thugh g 2 (x) is primitive because the cdewrd legth exceeds 2 -k -1=7. A example such udetectable errr is 1000000010. Triple errrs cat be detected sice g 2 (x) has ly three terms. d. Fid the cdewrd crrespdig t these irmati bits i g(x) = g 1 (x) g 2 (x) is used as the geeratig plymial. Cmmet the errr-detectig capabilities g(x). Cdewrd = 1101100011 The ew cde ca detect all sigle ad all dd errrs. It cat detect duble errrs. It ca als detect all bursts legth k = 4 r less. All bursts legth 5 are detected except r the burst that equals g(x). The racti 1/2 -k = 1/16 all bursts legth greater tha 5 are detect 3. (5.18) A 64-kilbyte message is t be trasmitted rm the surce t the destiati. The etwrk limits packets t a maximum size tw kilbytes, ad each packet has a 32-byte header. The trasmissi lies i the etwrk have a bit errr rate 10 6, ad Stp-ad-Wait ARQ is used i each trasmissi lie. Hw lg des it take the average t get the message rm the surce t the destiati? Assume that the sigal prpagates at a speed 2 x 10 5 km/secd. Sluti: Message Size 65536 bytes Max Packet Size 2048 bytes Packet Header 32 bytes Available r i 2016 bytes # packets eeded 32.51 packets Ttal 33 packets bit errr rate 1E-06 bits/packet 16384 Prbability errr i packet 0.016251 1 (1 bit_errr_rate) ^ (bits/packet) Prpagati speed 2E+05 Km/s Distace 1000 Km Badwidth 1.5 Mb/s We assume that the ACK errr, the ACK time, ad prcessig time are egligible. T prp T T 0 = distace / prpagati speed = 0.0050 s = packet size / badwidth = 0.0109 s = T prp + T = 0.0159 s P = prbability errr i packet = 0.016251 E[Tttal] = T 0 / (1 - P ) = 0.0162
There is pipeliig eect that ccurs as llws: Ater the irst packet arrives at switch 1, tw trasmissis take place i parallel. The irst packet uderges stp-ad-wait the secd lik while the secd packet uderges stp-ad-wait i the irst lik. The packet arrivig at the switch cat begi trasmissi the ext lik util the previus packet has bee delivered, s there is a iteracti betwee the trasmissi times the tw packets. We will eglect this eect. The time t sed every packet ver tw liks is the the iitial packet trasmissi time + 33 additial packet timess, ad s the average time is E[Tttal] * 34 = 0.522 secds. 4. (5.20) The Trivial File Traser Prtcl (RFC 1350) is a applicati layer prtcl that uses the Stp-ad-Wait prtcl. T traser a ile rm a server t a cliet, the server breaks the ile it blcks 512 bytes ad seds these blcks t the cliet usig Stp-ad-Wait ARQ. Fid the eiciecy i trasmittig a 1 MB ile ver a 10 Mbps Etheret LAN that has a diameter 300 meters. Assume the trasmissis are errr ree ad that each packet has 60 bytes header attached. Sluti: The prpagati delay i a Etheret LAN is egligible cmpared t the ttal trasmissi time a packet rm start t iish. Igrig prcessig time ad usig the termilgy i the chapter, we have: t = t η = R + t e 8(512 + 60) 64 4 = + = 4.64 10 6 6 10 10 10 10 8 512 t 4 = = 4.64 10 = 0.8828 = 88.3 6 R 10 10 ack Oe mre surce verhead ccurs because the last packet is t ull. Hwever, this additial verhead accuts r a very small racti the ttal verhead ad des t aect the abve result. 0 0 5. (5.33) A telephe mdem is used t cect a persal cmputer t a hst cmputer. The speed the mdem is 56 kbps ad the e-way prpagati delay is 100 ms. Slutis llw questis: a. Fid the eiciecy r Stp-ad-Wait ARQ i the rame size is 256 bytes; 512 bytes. Assume a bit errr rate 10 4. First we have the llwig: P = 1 (1 10 4) = 256 8 = 2048 r = 512 8 = 4096 t prp = 100 ms
= 0 a = 64 bits t prc = 0 Usig the results i Equati 5.4, η = (1 P ) 1+ = 0.125 ( = 2048) = 0.177 ( = 4096) 1 2( t prp + t + a prc) R b. Fid the eiciecy G-Back-N i three-bit sequece umberig is used with rame sizes 256 bytes; 512 bytes. Assume a bit errr rate 10 4. Give that W S = 2 3-1= 7, we ca calculate that the widw size is: R W s = 256 ms Sice this is greater tha the rud trip prpagati delay, we ca calculate the eiciecy by usig the results i Equati 5.8. η = 1 (1 P ) 1+ ( W 1) P s = 0.385 ( = 2048) = 0.220 ( = 4096) 6. Each arrivig batch N packets ctais a ttal NL bits, requirig a trasmissi time exactly NL/R secs. Hece, all these N packets wuld have bee just cmpletely trasmitted at the arrival istat the ext batch N packets. (Thus, there are mre that N packets i the buer at ay time.) It is w clear that all the last (i.e., N th ) packets i each batch will icur the (same) lgest delay, caused by the trasmissi the precedig (N 1) packets. This delay = [(N 1)L]/R secs.
7. All the des i the etwrk ca cmmuicate with each ther prvided that mre tha 1 lik ails. Hece, the desired prbability is: P[{ lik ailure} U {1 lik ailure}] = P[ lik ailure] + P[1 lik ailure] = (1 p) 6 6 + p(1 p) 5 = (1 p) 6 + 6p(1 p) 5 = (1 p) 5 (1 + 5p). 1 8. [i] I ly e lik ails, clearly etwrk cectivity is still maitaied. I tw liks ail, etwrk cectivity may be lst (e.g., i liks ad ad ab ail) r still retaied (e.g., i ab ad bd ail). O the ther had, i three liks ail, the regardless the ailure lcatis etwrk cectivity is lst. Nte that three lik ailures must csist the ailure three uter liks r tw uter liks ad the diagal lik; i either case, etwrk cectivity is lst. Thus, the required miimum umber lik ailures = 3. [ii] There are 5 liks i the etwrk. Netwrk cectivity may be lst i 2 liks ail, but is deiitely lst i 3, 4 r 5 liks ail. Usig the abbreviated tati: NC lst = etwrk cectivity lst. P[NC lst] = P[ 2 ail i.e. ab, ad OR bc, cd ] + P[ 3 ail ] + P[ 4 ail ] + P[ 5 ail ] = 2p 2 (1-p) 3 5 + p 3 (1-p) 2 5 + p 4 5 (1-p) + p 5 3 4 5 = 2p 2 (1-p) 3 + 10p 3 (1-p) 2 + 5p 4 (1-p) + p 5 = 4p 5-9p 4 + 4p 3 + 2p 2 5 Nte that the = 10 distict ways 2 lik ailures, etwrk cectivity is lst ly i the case whe 2 ab, ad ail r bc, cd ail.