Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ee132b Hw4 Sol

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11
At a glance
Powered by AI
The document discusses ARQ stop-and-wait schemes and analyzes the average number of retransmissions and probability of a certain number of retransmissions. It also covers properties of exponential and Poisson distributions.

The average number of retransmissions is 1/(1-p) where p is the probability of error.

The probability that the number of retransmissions is equal to 2 is M(M+1)p^2(1-p)^M/2 where M is the number of frames and p is the probability of error.

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

Problem 1
Consider an ARQ stop-and-wait scheme between stations A and B.
(a) If station A intends to transmit a single data frame, what is the average number
of retransmissions required for the successful transport of data frames? (Hint:
Let p denote the probability that the transmit frame is received with error.
Express the average number of retransmissions in terms of p.)
(b) If a station intends to transmit M data-frames, where M 2, what is the
probability that the number of retransmissions NR (M ) is equal to 2? (Hint:
Express the probability in terms of M and p.)
Ans:
(a)
Let NR (1) denote the number of retransmission. Then, NR (1) follows the Geometrical distribution with parameter p. Thus, we have
E[NR (1)] =

nP (NR (1) = n) =

X
n=0

n=0

n(1 p)pn =

p
.
1p

(b)
Let NRk denote the number of retransmissions for the kth data-frame. Then,
P
NR (M ) = M
k=1 NRk . Note that {NRk | k = 1, 2, . . . , M } is the set of independent,
identically distributed random variables. Each random variable follows Geometrical
distribution with parameter p.
For NR (M ) is equal to 2, there are two possibilities: (i) One of these random
variables is equal to 2 and the others are equal to 0 and (ii) Any two of these random
variables are each equal to 1, and the others are equal to 0. Therefore, we have
P (NR (M ) = 2) =

M
X

P (NR1 = 0, NR2 = 0, NRi1 = 0, NRi1 = 1, NRi1 = 0, . . . , NRM = 0)

k=1

+ P (NR1 = 1, NR2 = 1, . . . , NRi1 = 0, . . . , NRM = 0) + . . .


+ P (NR1 = 0, NR2 = 0, . . . , NRi1 = 1, . . . , NRM = 1)
!

=
+
=
=

M
P (NR1 = 1, NR2 = 0, . . . , NRM = 0)
1
!
M
P (NR1 = 1, NR2 = 1, NR3 = 0, . . . , NRM = 0).
2
!
!
i
M
M h
2
M 1
(1 p)p (1 p)
+
[(1 p)p]2 (1 p)M 2
1
2
M (M + 1) 2
p (1 p)M .
2

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

Problem 2
Consider an ARQ stop-and-wait scheme which is similar to the scheme described
in Problem 1 but a distinct feature: suppose that an acknowledgement can be lost
during its transmissions with probability q. If an acknowledgement is lost, station A
will retransmit the data-frame after time-out. Such retransmission process continues
until station A receives an acknowledgement.
(a) If station A intends to transmit a single data frame, what is the average number
of retransmissions required for the successful delivery of data frames? (Hint:
Express the average number of retransmissions in terms of p and q.)
(b) Find the probability that station A retransmits exactly twice. (Hint: express
the probability in terms of p and q. You do not need to simplify your answer.)
Ans:
(a)
Note that when station A transmits a data frame, it may not receive an acknowledgement if the frame is delivered to station B with errors or if the acknowledgement
for the frame which is received without errors is lost. Let r denote the probability
that station A does not receive an acknowledgement. Let A and B denote the events
that a frame is received with errors and that an acknowledgement is lost, respectively.
Then, we have
r = P (A (Ac B)) = P (A) + P (Ac B) = p + (1 p)q.
Whenever an acknowledgement is not received, the data frame is retransmitted.
Therefore, the number of retransmissions for a data-frame NR (1) has a Geometric
distribution with parameter r. The average number of retransmissions is given by:
E[NR (1)] =

p + (1 p)q
r
=
.
1r
(1 p)(1 q)

(b)
The probability that station A retransmits exactly twice is given by
P (NR (1) = 2) = r2 (1 r) = [p + (1 p)q]2 [(1 p)(1 q)] .

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

Problem 3
Let T and S denote two independent exponentially distributed random variables
with parameter T and S , respectively.
(a) Show that the random variable T is memoryless (i.e., P (T t | T > s) =
P (T t s), t s 0).
(b) Set Y = min{T, S}. Show that the random variable Y is exponentially distributed, and find its parameter.
(c) Let X denotes a Poisson random variable with parameter T , where T is an exponentially distributed random variable with parameter T . Find the distribution
for X (i.e., P (X = n), n = 0, 1, . . . ).
Ans:
(a)
P (T t | T > s) = P (T t s) is given by
P (s < T t)
1 eT t (1 eT s )
=
P (T > s)
eT s
eT s eT t
=
= 1 eT (ts) = P (T t s).
eT s

P (T t | T > s) =

(b)
Since P (min{T, S} > t) = P (T > t, S > t) = e(T +S )t , which is also an exponential distribution with parameter T + S .
(c)
The distribution for X (i.e., P (X = n), n = 0, 1, . . . ) is given by
Z t n
eT T n
e t
P (X = n) = E[P (X = n | T )] = E
=
T eT t dt
n!
n!
0
Z
(1 + T )n+1 n (1+T )t
T
=
t e
dt.
(1 + T )n+1 0
n!
"

n+1

Since (1+n!T ) tn e(1+T )t is the probability density function for a Gamma distribution
with parameter (n + 1) and (1 + T ), thus, we have
(1 + T )n+1 n (1+T )t
t e
dt = 1.
n!
0
As a result, we conclude that
Z

T
1
P (X = n) =
= 1
n+1
(1 + T )
1 + T




which is also a Geometrical distribution with parameter


3

1
1 + T
1
1+T

n

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

Problem 4
Figure 1 illustrates the first two messages exchanged in the course of a telephone
call from user A to user B. extend this diagram to include the following messages (with
first two already illustrated: A Off Hook; Dial Tone to A; Dialed digits from A; Called
Request signals; Call Accept signal; Conversation with B answering, A responding,
and one more response from B; B On Hook, Disconnect signals (originating from
location of first user to hang up); and finally A on hook. (This is an arbitrary choice
of the order of actions during disconnect; for example, either user could equally well
hang up first.)
Local Loop
User A

Telephone network

Network interface

Local loop

Network interface

User B

Off-hook signal

Dial tone

Dialed digits

Figure 1: The first two messages exchanged in the course of a telephone call from
user A to user B

Ans:

EE132B-HW Set #4

UCLA 2014 Fall

User A

Network interface

Prof. Izhak Rubin

Network interface

User B

Off-hook signal

Dial tone

Dialed Digits

Call request

Ring

Off-hook
Call respond
A hears Off-hook
B Answering

A responding

B responding
On-hook signal
Disconnect signal

A hear on-hook

On-hook signal

Figure 2: The messages exchanged in the course of a telephone call from user A to
user B

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

Problem 5
Compare virtual circuit and datagram service with respect to the following:
(a) Ability to survive link or node failure.
(b) Ability to deal with congestion in the network.
(c) Applicability for use with the following types of traffic: (i) voice, (ii) interactive
data traffic, and (iii) file transfer.
Ans:
(a)
Since virtual circuits use fixed routes per connection, failure of any link or node
along the route results in failure of the established virtual circuit. On the other hand,
in a datagram network that employs a dynamic routing scheme, datagram packets
that belong to a single flow do not use a fixed route. Datagram packets that incur at
a packet switch/router node due to a failed link will typically be redirected along a
different link (i.e., using an alternate route to reach the destination, if possible).
(b)
The alternate routing capability of a connectionless packet switching network
that employs dynamic routing and congestion control mechanisms, provides for its
capability to route datagram packets around (and away from) areas of congestion.
In turn under a virtual packet networking operation, once congestion along the route
allocated for a connection is discovered, if unacceptable, the virtual circuit connection
must be completely re-configured so that a new route is discovered and configured.
On the other hand, the occurrence of congestion across a virtual circuit can be limited
by using, at connection setup time, effective flow control mechanisms for congestion
control purposes. In this manner, the rate at which traffic flows are permitted entry
to the configured virtual circuits can be controlled. This type of flow control is more
difficult with datagram transmission since no direct route from a congested node
back to the source of congestion is established. Thus, both types of service reveal
advantages relative to each other in their capability for dealing with congestion.
(c)
(i)
Neither virtual circuits nor datagram are ideal for voice communications. Virtual
circuits have the advantage of ensuring sequenced delivery, but long delays that are
occasionally encountered lead to quality degradation. Under a datagram networking
service, packet delays and jitters are often less regulated and thus may be higher and
subsequently lead to packet losses and quality degradations. Also, in a datagram
network, packets may arrive out of order. A protocol (such as that know as Real
Time Protocol) is therefore often used above the transport layer to provide ordering
6

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

(sequencing of voice packets) as well as to attach time stamps to voice packets so that
the reconstruction of the voice message at the receiving terminal can be performed
in face of packet losses and time delay variations. Hence, virtual circuits offer fewer
disadvantages.
(ii)
The choice between virtual circuit and datagram based operations for interactive
data traffic should depend on the nature of the traffic. If interactions are infrequent
and of short duration, the overhead incurred for connection and disconnection phases
of virtual circuits mat not be justified, so datagram might be preferred. If there are
frequent transmissions back and forth over extended periods of time, virtual circuits
would be preferred; they would then also guarantee sequenced delivery.
(iii)
For file transfers, virtual circuit networking can offer more advantages than datagram networking. This is particularly the case, when quality of service (QoS) must
be guaranteed for the file transport, i.e. in terms of delivery time and reliability.
For long sessions, virtual circuit operation leads to reduction of overhead associated
with a virtual circuit operation after a connection has been established. Otherwise,
a datagram operation is acceptable.

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

Problem 6
(a) Compute the total delays to transfer a message 10000 (eight bit) characters long
across the three hop communications path under the following timing assumptions. Assume that all links operate at 4800 bps, with a 20 msec delay per link
for propagation delays plus reaction time at the receiver. (Timings given are
typical, though they are so highly variable that results of this problem should
be treated with caution.)
(i) For circuit switching assume 3 sec per link connection delay (time hunting
for an outgoing trunk, or dialing and associated delays) and 100 msec
durations of call request or accept signal (times to put signals on the
communications lines, for example, number of bits divided by line rate
in bps).
(ii) For message switching, assume 50 bytes per message of header (routing
information, identification, sequencing information, and so forth) and (arbitrarily) 300 msec processing plus queuing time at each node.
(iii) for packet switching, assume the message is divided into 20 equal length
packets with 50 bytes of header information per packet, 300 msec processing plus queuing time at each node and 20 msec between packets.
(b) Discussing your results and indicate reasonable conditions under which the relative rankings of the delays might change.
Ans:

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

(a)
(i)
B

A
tc
tR

Dialing and
associated delays
Requ
est li
nk

Time

tp
to
Requ
est li
n

tp
k

to
Requ
est li
nk

Conn

gnal
ect si

tp

3tp

3tp

td
Data tr
ansmis
sion

td

Figure 3: Circuit switching


From Figure.3, we can obtain the total transmission time, which is given by as
follows.
Dialing and associated delays = 3 sec
Times hunting for outgoing tricks = 2 3 = 6 sec
Durations for call requests and accepts = 4 0.1 = 0.4 sec
Propagation delays = 9 0.02 = 0.18 sec
Transmission time = 8

10000
4800

= 16.67 sec

Total time = 26.25 sec

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

(ii)
C

D
Time

tQ
tp

head

er
Data

tQ
tp

head
er
Data

tQ
tp

head
er
Data

Figure 4: Message switching


From Figure.4, we can obtain the total transmission time, which is given by as
follows.
Queuing delays = 3 0.3 = 0.9 sec
Propagation delays = 3 0.02 = 0.06 sec
Transmission times = 3 8

10050
4800

= 50.25 sec

Total time = 51.21 sec


(iii)
C

D
Time

tQ
Head
er 1
Data
1

tp

tI
tQ
Head
er 2
Data
2

Head
er 1
Data
1

tp

Head
er 2
Data
2

tQ
Head
er 1
Data
1

tp

Head
er 2
Data
2

tI

Figure 5: Packet switching with an example of 2 packets


10

EE132B-HW Set #4

UCLA 2014 Fall

Prof. Izhak Rubin

From Figure.5, we can obtain the total transmission time, which is given by as
follows. The delay for this case can be computed by computing the time for the first
packet to reach C then adding the time for the entire message to go from C to D.
Since each packet, including header, contains 550 characters, the former time consists
of:
Queuing delays = 2 0.3 = 0.6 sec
Propagation delays = 2 0.02 = 0.04 sec
Transmission times = 2 8

550
4800

= 1.83 sec

Total = 2.47 sec


The latter time then consists of:
Queuing delays = 0.3 sec
Propagation delays = 0.02 sec
Transmission times = 20 8

550
4800

= 18.33 sec

Inter-packet times = 19 0.02 = 0.38 sec


Total = 19.03 sec
Adding this to the previous value gives a total time of 21.50 sec.
(b)
For the parameter given, the delay incurred in message switching is far inferior
to that for either of the other two approaches. This is primarily due to the extra
transmission times incurred, which a separate transmissions of the complete message
over each link after storage at previous node. Packet switching has the shortest delay,
roughly 5 seconds less than that for circuit switching. the main source of additional
delay for circuit switching is the switching time of approximately 9 seconds. This is
particularly compensated for by extra transmission delays in packet switching plus
almost 1 second of queuing delays. Faster circuit switching, on the order of a second
or so instead of 9 seconds total switching time, would change the relative rankings so
that circuit switching would yield minimum delay. Finding situations when message
switching would yield minimum delay is more difficult since the main situation where
this is true when there is only single link in the source-destination path and that is
not situation here.

11

You might also like