0% found this document useful (0 votes)
41 views

GEN210 Assignment 02_SP25_Solution(2)

Uploaded by

ghhmfyv9vb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

GEN210 Assignment 02_SP25_Solution(2)

Uploaded by

ghhmfyv9vb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CENG 210 – Answer Key for Assignment 2 (Spring 2025)

1. Which of the following is a random-access protocol?

a. CSMA/CD b. Polling c. TDMA

2. Stations in a pure Aloha network send frames of size 1000 bits at the rate of 1 Mbps. What is the
vulnerable time for this network?

Transmission Time = 1000/1000000 = 1 ms, VT = 2 ms.

3. In a pure Aloha network with G = 1/2, how is the throughput affected in each of the following
cases?
a. G is increased to 1. b. G is decreased to 1/4.

In a pure Aloha, the throughput at G = 1/2 is 18.4% (maximum value).

a. When G = 1, the throughput is decreased to 13.5%.

b. When G = 1/4, the throughput is decreased to 15.2%.

4. Assume the propagation delay in a broadcast network is 5 μs and the frame transmission time
is 10 μs.
a. How long does it take for the first bit to reach the destination? 5 s μ
b. How long does it take for the last bit to reach the destination after the first bit has
μ
arrived? 15 s
c. How long is the network involved with this frame (vulnerable to collision)? 15 μs
5. Assume the propagation delay in a broadcast network is 3 μs and the frame transmission time
is 5 μs. Can the collision be detected no matter where it occurs?
The sender needs to detect the collision before the last bit of the frame is sent out. If the
μ
collision occurs near the destination, it takes 2 × 3 = 6 s for the collision news to reach the
sender. The sender has already sent out the whole frame; it is not listening for a collision
anymore.

6. Can two hosts in two different networks have the same link-layer address?

Ideally, no. But sometimes there may be the same if different manufacturers make the devices.

7. Explain why collision is an issue in random-access protocols but not in controlled access or
channelizing protocols.

In random access methods, there is no control over medium access. Each station can transmit
when it desires. This liberty may create collisions. In channelization methods, the medium is
divided into channels and each station has its own channel.

A s s i g n m e n t 2 – S p r i n g 2 0 2 5 - P a g e 1|6
CENG 210 – Answer Key for Assignment 2 (Spring 2025)
8. Byte-stuff the following frame payload in which E is the escape byte, F is the flag byte, and D is a
data byte other than an escape or a flag character.

9. Bit-stuff the following frame payload:

Just add 0 after each 011111 sequence.

10. What is the maximum effect of a 2-ms burst of noise on data transmitted at the
following rates?

a. 1500 bps b. 12 kbps c. 100 kbps d. 100 Mbps

a. vulnerable bits = (1500) × (2 × 10−3) = 3 bits


b. vulnerable bits = (12 × 103) × (2 × 10−3) = 24 bits
c. vulnerable bits = (100 × 103) × (2 × 10−3) = 200 bits
d. vulnerable bits = (100 × 106) × (2 × 10−3) = 200,000 bits

11. Bonus: There are only three active stations in a slotted Aloha network: A, B, and C. Each station
generates a frame in a time slot with the corresponding probabilities pA = 0.2, pB = 0.3, and pC
= 0.4, respectively.
a. What is the throughput of each station?
b. What is the throughput of the network?
We can first find the throughput for each station. The throughput of the network is the sum of
the throughputs.

a. The throughput of each station is the probability that the station has a frame to send and
other stations have no frame to send.
SA = pA (1-pB) (1-pC) = 0.2 x 0.7 x 0.6 ≈ 0.084
SB = pB (1 -pA) (1-pC) = 0.3 x 0.8 x 0.6 ≈ 0.144
SC = pC (1-pA) (1 -pB) = 0.4 x 0.8 x 0.7 ≈ 0.224

b. The throughput of the network is the sum of the throughputs.


S = SA + SB + SC ≈ 0.452

12. Bonus: There are only three active stations in a slotted Aloha network: A, B, and C. Each station
generates a frame in a time slot with the corresponding probabilities pA = 0.2, pB = 0.3, and pC
= 0.4, respectively.
a. What is the probability that any station can send a frame in the first slot?
A s s i g n m e n t 2 – S p r i n g 2 0 2 5 - P a g e 2|6
CENG 210 – Answer Key for Assignment 2 (Spring 2025)
b. What is the probability that station A can successfully send a frame for the first time
in the second slot?
c. What is the probability that station C can successfully send a frame for the first time
in the third slot?

We first find the probability of success for each station in any slot (PSA, PSB, and PSC). A station
is successful in sending a frame in any slot if it has a frame to send and the other stations do not.

PSA = (pA) (1 - pB) (1 - pC) = (0.2) (1 - 0.3) (1 - 0.4) = 0.084


PSB = (pB) (1 - pA) (1 - pC) = (0.3) (1 - 0.2) (1 - 0.4) = 0.144
PSC = (pC) (1 - pA) (1 - pB) = (0.4) (1 - 0.2) (1 - 0.3) = 0.224

We then find the probability of failure for each station in any slot (PFA, PFB, and PFC).

PFA = (1 - PSA) = 1 - 0.084 = 0.916


PFB = (1 - PSB) = 1 - 0.144 = 0.856
PFC = (1 - PSC) = 1 - 0.224 = 0.776

a. The probability of success for any frame in any slot is the sum of probabilities of success.
P[success in first slot] = PSA+ PSB + PSC = (0.084) + (0.144) + (0.224) » 0.452

b. The probability of success for the first time in the second slot is the product of failure in the
first and success in the second.
P[success in second slot for A] = PFA x PSA= (0.916) x (0.084) ≈ 0.077

c. The probability of success for the first time in the third slot is the product of failure in two
slots and success in the third.
P[success in third slot for C] = PFC x PFC x PSC = (0.776)2 x (0.224) ≈ 0.135

13. A slotted Aloha network is working with maximum throughput. What is the probability that a
slot is empty?

In a slotted Aloha network with maximum throughput, the probability of a collision (p) is equal to 1/e
(where e is the mathematical constant approximately equal to 2.71828).

Since a slot can be either empty or experience a collision, the probability of an empty slot (P(empty))
is simply 1 minus the probability of a collision (p).

Therefore, P(empty) = 1 - (1/e) = approximately 0.632.

In other words, there's roughly a 63.2% chance that a given slot in a slotted Aloha network operating
at maximum throughput will be empty. This allows for successful data transmission without
collisions.

14. Assume that only two stations, A and B, are in a bus CSMA/CD network. The distance between
the two stations is 2000 m, and the propagation speed is 2 × 108 m/s. If station A starts
transmitting at time t1:
a. Does the protocol allow station B to start transmitting at time t1 + 8 μs? If the answer is yes,
A s s i g n m e n t 2 – S p r i n g 2 0 2 5 - P a g e 3|6
CENG 210 – Answer Key for Assignment 2 (Spring 2025)
what will happen?
b. Does the protocol allow station B to start transmitting at time t1 + 11 μs? If the answer is yes,
what will happen?
The propagation delay for this network is Tp = (2000 m) /(2 × 108 m/s) = 10 μs .The first bit of station
A’s frame reaches station B at (t1 + 10 μs).

a. Station B has not received the first bit of A’s frame at (t1 + 10 μs). It senses the medium and
finds it free. It starts sending its frame, which results in a collision.

b. At time (t1 + 11 μs), station B has already received the first bit of station A’s frame. It
knows that the medium is busy and refrains from sending.

15. We have a pure ALOHA network with a data rate of 10 Mbps. What is the maximum number of
1000-bit frames that can be successfully sent by this network?
The maximum efficiency in a pure Aloha network is 0.184.

16. One of the useful parameters in a LAN is the number of bits that can fit in 1 meter of the
medium (nb/m). Find the value of nb/m if the data rate is 100 Mbps and the medium propagation
×
speed is 2 108 m/s.
The data rate (R) defines how many bits are generated in one second and the propagation speed (V)
defines how many meters each bit is moving per second. Therefore, the number of bits in each meter
nb/m= R / V. In this case,

17. In a CDMA/CD network with a data rate of 10 Mbps, the minimum frame size is found to be 512
bits for the correct operation of the collision detection process. What should the minimum
frame size be if we keep the size of the network constant, but we increase the data rate to each
of the following?
a. 100 Mbps b. 1 Gbps c. 10 Gbps
Let us find the relationship between the minimum frame size and the data rate. We know that
Tfr = (frame size) / (data rate) = 2 × Tp = 2 × distance / (propagation speed)
or
(frame size) = [2 × (distance) / (propagation speed)] × (data rate)]
or
(frame size) = K × (data rate)
This means that minimum frame size is proportional to the data rate (K is a constant). When the data
rate is increased, the frame size must be increased in a network with a fixed length to continue the
proper operation of the CSMA/CD. We calculate the minimum frame size based on the above
proportionality relationship.
Data rate = 10 Mbps → minimum frame size = 512 bits
Data rate = 100 Mbps → minimum frame size = 5120 bits
Data rate = 1 Gbps → minimum frame size = 51,200 bits
Data rate = 10 Gbps → minimum frame size = 512,000 bits

18. We have defined the parameter a as the number of frames that can fit the medium between two
stations as a = (Tp)/(Tfr). Another way to define this parameter is a = Lb/Fb, in which Lb is the
A s s i g n m e n t 2 – S p r i n g 2 0 2 5 - P a g e 4|6
CENG 210 – Answer Key for Assignment 2 (Spring 2025)
bit length of the medium and Fb is the frame length of the medium. Show that the two
definitions are equivalent.
Let Lm be the length of the medium in meters, V the propagation speed, R the data rate, and nb/m the
number of bits that can fit in each meter of the medium (defined in the previous problems). We can
then proceed as follows:

19. To understand why we need to have a minimum frame size Tfr = 2 ×T p in a CDMA/CD
network, assume we have a bus network with only two stations, A and B, in which Tfr = 40 μs
and Tp = 25 μs. Station A starts sending a frame at time t = 0.0 μs, and station B starts sending
a frame at t = 23.0 μs. Answer the following questions:

a. Do frames collide?
b. If the answer to part a is yes, does station A detect collision?
c. If the answer to part a is yes, does station B detect collision?

The first bit of each frame needs at least 25 μs to reach its destination.
μ
a. The frames collide because 2 s before the first bit of A’s frame reaches the destination,
station B starts sending its frame. The collision of the first bit occurs at t = 24 s. μ
μ μ
b. The collision news reaches station A at time t = 24 s + 24 s = 48 s. Station A has μ
μ
finished transmission at t = 0 + 40 = 40 s, which means that the collision news reaches
μ
station A 8 s after the whole frame is sent and station A has stopped listening to the
channel for collision. Station A cannot detect the collision because Tfr < 2 × Tp.

μ
c. The collision news reaches station B at time t = 24 + 1 = 25 s, just 2 s after it has μ
started sending its frame. Station B can detect the collision.

20. Assume that there are only two stations, A and B, in a bus CSMA/CD network. The distance
between the two stations is 2000 m and the propagation speed is 2 ×
108 m/s. If station A
starts transmitting at time t1:
a. Does the protocol allow station B to start transmitting at time t1 + 8 s? If the μ
answer is yes, what will happen?
b. Does the protocol allow station B to start transmitting at time t1 + 11 s? If the μ
answer is yes, what will happen?

The propagation delay for this network is Tp = (2000 m) /(2 × 108 m/s) = 10 s. The first bit
A s s i g n m e n t 2 – S p r i n g 2 0 2 5 - P a g e 5|6
CENG 210 – Answer Key for Assignment 2 (Spring 2025)
of station A’s frame reaches station B at (t1 + 10 µs).

a. Station B has not received the first bit of A’s frame at (t1 + 10 µs). It senses the
medium and finds it free. It starts sending its frame, which results in a collision.

b. At time (t1 + 11 µs), station B has already received the first bit of station A’s frame. It
knows that the medium is busy and refrains from sending.

A s s i g n m e n t 2 – S p r i n g 2 0 2 5 - P a g e 6|6

You might also like