You are on page 1of 2

King Fahd University of Petroleum and Minerals

College of Computing and Mathematics


Department of Computer Engineering

COE 344 – Computer Networks (T212) – Solution

Homework # 01 (due date & time: Thursday 03/02/2022 on Blackboard before 10:00 AM)

Late homework submission will NOT be accepted

*** Show all your work. No credit will be given if work is not shown! ***

For all problems: 1 kbits = 1,000 bits, 1 Mbits = 1,000,000 bits


Problem # 1 (30 points; 10 points each): Consider sending a file of 50 Mbits over a path of 4
links. Each link transmits at a rate of 10 Mbps. The network is lightly loaded so that there are no
queuing delays, the processing delay is negligible, and that the propagation delay on each link is 20
milliseconds. Using these assumptions, answer the following:
a. Suppose the network is a packet-switched datagram network, and a connectionless service is
used. Suppose that the file is broken into 10,000 packets. Now suppose each packet has 320 bits
of header. How long does it take to send the file?
b. Repeat (a), but assume message switching is used (i.e., 320 bits are added to the file, and the file
is not segmented).
c. Finally, suppose that the network is a circuit-switched network. Further, suppose that the data
rate of the circuit between source and destination is 10 Mbps. Assuming the circuit is made up of
4 links with a propagation delay on each link being 20 milliseconds, a 500 milliseconds set-up
time, and 160 bits of header appended to the entire file, how long does it take to send the file?

Size of each packet = 50 Mbits / 10,000 packets = 5,000 bits/packet

a. ttrans per link = (5,000 + 320) bits / 10 Mbps = 0.532 ms


Total delay = time to deliver 1st packet + time to deliver remaining packets
= 4 × (0.532 + 20) ms + 9,999 × 0.532 ms
= 5.401596 seconds

b. ttrans per link = (50,000,000 + 320) bits / 10 Mbps = 5.000032 seconds


Total delay = time to deliver message over all links
= 4 × (5.000032 + 0.02) seconds
= 20.080128 seconds

c. ttrans per circuit = (50,000,000 + 160) bits / 10 Mbps = 5.000016 seconds


Total delay = tset-up + ttrans for circuit + tpropagation for circuit
= 0.5 seconds + 5.000016 seconds + 4 × 0.02 seconds
= 5.580016 seconds
Problem # 2 (20 points):
Suppose users share a 4 Mbps link. Also suppose each user requires 500 Kbps when transmitting,
but each user transmits only 10% of the time.
a. (4 points) When circuit switching is used, how many users can be supported?
b. (4 points) For the remainder of the problem, suppose packet switching is used. Find the
probability that a given user is transmitting.
c. (4 points) Suppose there are 25 users. Find the probability that at any given time, exactly n users
are transmitting simultaneously. (Hint: Use the binomial distribution.)
d. (8 points) Find the probability that there are 9 or more users transmitting simultaneously.

a. 4 Mbps / 500 Kbps per user = 8 users.

b. P(a given user is transmitting) = p = 0.1


25
c. P(exactly n users are transmitting simultaneously) = ( 𝑛 )𝑝𝑛 (1 − 𝑝)25−𝑛

d. P(9 or more users are transmitting simultaneously)


= 1 – P(8 or less users are transmitting simultaneously)
= 1 – [P(8 users are transmitting simultaneously) + P(7 users are transmitting simultaneously) + … +
P(1 user is transmitting simultaneously) + P(no user is transmitting)]
8
=1−∑ (25
𝑛
)𝑝𝑛 (1 − 𝑝)25−𝑛
𝑛=0

Using Excel, we get the following table:

n x = 25!/[n! * (25 - n)!] y = pn z = (1 - p)(25 - n) x * y * z


0 1 1 0.071789799 0.071789799
1 25 0.1 0.079766443 0.199416108
2 300 0.01 0.088629381 0.265888144
3 2300 0.001 0.09847709 0.226497308
4 12650 0.0001 0.109418989 0.138415021
5 53130 0.00001 0.121576655 0.064593677
6 177100 0.000001 0.135085172 0.023923584
7 480700 0.0000001 0.150094635 0.007215049
8 1081575 0.00000001 0.166771817 0.001803762
= 0.9995425
(1 - ) = 0.0004575

 P(9 or more users are transmitting simultaneously) = 0.0004575

You might also like