set2soln
TRANSCRIPT
-
8/8/2019 SET2SOLN
1/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 andthe others 0.
Solutions follow questions:
a. List the valid codewords.
11000
1010010010
10001
0110001010
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 areused.
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)
Letg1(x) = x + 1 and letg
2(x) = x
3
+ x2
+ 1. Consider the information bits (1,1,0,1,1,0).
a. Find the codeword corresponding to these information bits ifg1(x) is used as the generating
polynomial.
Codeword = 1101100
-
8/8/2019 SET2SOLN
2/6
b. Find the codeword corresponding to these information bits ifg2(x) is used as the generating
polynomial.
Codeword = 110110111
c. Cang2(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
n-k
-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 ifg(x) = g1(x) g
2(x) is used as the
generating polynomial. Comment on the error-detecting capabilities ofg(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
n-k
= 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 65536 bytesMax Packet Size 2048 bytes
Packet Header 32 bytes
Available for info 2016 bytes# of packets needed 32.51 packets
Total 33 packets
bit error rate 1E-06bits/packet 16384
Probability of error in packet 0.016251 1 (1 bit_error_rate) ^ (bits/packet)
Propagation speed 2E+05 Km/s
Distance 1000 Km Bandwidth 1.5 Mb/s
We assume that the ACK error, the ACK time, and processing time are negligible.
Tprop = distance / propagation speed = 0.0050 s
Tf = packet size / bandwidth = 0.0109 s
T0 = Tprop + Tf= 0.0159 s
Pf = probability of error in packet = 0.016251 E[Ttotal] = T0/ (1 - Pf) = 0.0162
-
8/8/2019 SET2SOLN
3/6
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 whilethe 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 fileover 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 packetfrom start to finish. Ignoring processing time and using the terminology in the chapter, we have:
00
6
4
4
66
3.888828.010101064.4
5128
1064.41010
64
1010
)60512(8
==
=
==
=
+
+=+=
R
t
nn
R
ttt
o
of
effo
o
ackfo
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
-
8/8/2019 SET2SOLN
4/6
no = 0
na = 64 bits
tproc = 0
Using the results in Equation 5.4,
Rn
tt
n
n
n
n
P
f
procprop
f
a
f
o
f )(21
1
)1(+
++
=
= 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 10
4
.
Given that WS= 23 -1= 7, we can calculate that the window size is:
R
Wn sf = 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.
fs
f
o
fPW
n
n
P)1(1
1)1(
+
=
= 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 completelytransmitted 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.
-
8/8/2019 SET2SOLN
5/6
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+
1
6p(1 p)5 = (1 p)6+ 6p(1 p)5 = (1 p)5(1 + 5p).
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 thatthree 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, butis 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 +
3
5p3(1-p)2 +
4
5p4(1-p) +
5
5p5
= 2p2(1-p)3 + 10p3(1-p)2 + 5p4(1-p) + p5
= 4p5 - 9p4 + 4p3 + 2p2
Note that of the
2
5= 10 distinct ways of 2 link failures, network connectivity is lost only in the case when
ab, ad fail or bc, cd fail.
-
8/8/2019 SET2SOLN
6/6