Sunteți pe pagina 1din 5

EE132B-HW Set #2 - Sol.

Prof. Izhak Rubin

Problem 1
Suppose users share a 1 Mbps link. Also suppose that the traffic generation
process of each user alternates (independently of the other users) between periods of
activity (active modes), when the user generates data at a constant rate of 100 Kbps
and periods of inactivity (inactive mode) when the user generates no data. Suppose
further that the user is active (independent of other users) only 10 percent of the
time.
(1) When circuit switching is used to allocate resources on the shared link, how
many users can be supported?
(2) Suppose now that users are supported by using accordance with a packet switching method, so that the communications channel is shared on a statistical multiplexing manner. Assume now that the communications channel is used to
support a number of users that is 4 times larger than those supported under
the circuit switching operation. Use normal distribution to approximate the
probability that more than 10 users are simultaneously active. (Hint: Central
Limit Theorem. You may find (3.16) = 0.99921 useful, where (x) is the CDF
of a normal random variable.)
Ans:
1.

1 Mbps
100 Kbps

= 10 users.

2. Number of user sources is 40.


Let {X1 , ..., X40 } be i.i.d Bernoulli random variables with P r{Xi = 1} = 0.1 =
1 P r{Xi = 0} i = 1...40.

By Central Limit Theorem, Z = X1 + ... + X40 can be approximated by a


Gaussian random variable with mean = 0.1 40 = 4 and variance 2 =
0.1 0.9 40 = 3.6.
Z4
Hence, P r{Z 10} = P r{

3.6

104

}
3.6

0.99921.

P r{Z > 10} 1 0.99921 = 0.00079.

Problem 2
For the Gaussian distribution with mean and variance 2 , find the moment
generating function. Using the moment generating function, calculate the mean and
the variance. (Hint: The probability density function for a Gaussian random variable
X with mean and variance 2 is given by
1
(x )2
fX (x) =
.
exp
2 2
2 2
!

EE132B-HW Set #2 - Sol.

Prof. Izhak Rubin

Ans:
By using the laplace transform, we obtain
h

X (s) = E esX

2
1
1
e 22 (x) dx

2 2
Z
1
2
2
2
1

e 22 [x 2( s)x+ ] dx
=

2 2
i
h
Z
2
12 (x(2 s)) +2(2 s)4 s2
1

dx
=
e 2

2 2
Z
2
1
1
2
1
2 2

= e 2 (2s s )
e 22 (x( s)) dx

2 2
1
2
2
= e 2 (2s s ) .

esx

We can obtain the first and second moment of X, which is given by



1
d
X (s) = lim 2 2 2 s X (s) = .
s0
s0 ds
2
2
d
E[X 2 ] = lim 2 X (s)
s0 d s
"
#
 
2
1
2
2
= lim X (s) +
2 2 s
X (s)
s0
2
= 2 + 2 .

E[X] = lim

Thus, the variance is given as


V ar[X] = E[X 2 ] E[X]2 = 2 .

Problem 3
Consider the following probability density function:
fX (x) =

e|x|
, x (, ),
2

where > 0.
(a) Calculate the mean directly.
(b) Calculate the variance directly.
(c) Find the moment generating function.
(d) Find the mean and the variance from the moment generating function.
Ans:
2

(1)

EE132B-HW Set #2 - Sol.

Prof. Izhak Rubin

0
(a) E [X] =
x f (x) dx =
x ex dx +
R x
R x2
= 0 x 2 e dx + 0 x 2 e dx = 0

(b) V ar [X] = E [X 2 ]
R 2 |x|
dx
=
x e
R 22 x
= 2 0 x 2 e dx =
h

R
0

x 2 ex dx

2
2

(c) X (s) = E esX


R sx |x|
=
e 2e
dx
R 0 (s)x
R (+s)x
=
e
dx
+
dx
0 2e
 2


1
1
= 2 s + +s
h

1
1
+ +s
s
s0
h
i
1
1
d2
+
E [X 2 ] = lim ds
2 2
s
+s
s0
2
V ar [X] = 2

d
(4) E [X] = lim ds
2

=0
=

2
2

Problem 4
A coin is flipped until at least a head occur and at least two tails occur. Define
three random variables X, Y , Z to be the trial numbers at which the first head, the
first tail, and the second tail are observed, respectively. Assume that at any trial, the
probability that a head occurs is p (0, 1). Let q = 1 p.
(a) Find the joint probability P (X = m, Y = n, Z = r).
(b) Verify that your answer in (a) is valid by checking
r) = 1.

m,n,r

P (X = m, Y = n, Z =

(c) Calculate P (Z < X) using the joint probability derived in (a).


Ans:
(a)
P (X = m, Y = n, Z = r) = P (Y = n, Z = r | X = m)P (X = m)
= P (Z = r | X = m, Y = n)P (Y = n | X = m)P (X = m).
Note that P (X = m) = pq m1 m 1. Next, we evaluate P (Y = n | X = m):

1
, m 2, n = 1
n2
p q , m = 1, n 2
P (Y = n | X = m) =

0
, otherwise.

EE132B-HW Set #2 - Sol.

Prof. Izhak Rubin

Finally we evaluate P (Z = r | X = m, Y = n). We can only evaluate m, n


values where P (Y = n | X = m) 6= 0:

1
, r = 2, m > 2, n = 1
r3
, r > 2, m = 2, n = 1
P (Z = r | X = m, Y = n) = p q

rn1
p
q , r > n, m = 1, n 2

We can thus calculate P (X = m, Y = n, Z = r) as:

P (X = m, Y = n, Z = r) =

pq m1
pr3 q pq m1
prn1 q pn2 q pq m1
0

(b)

pq m1 +

m=3

pr2 q 2 +

r=3

pq m1
pr2 q 2
pr2 q 2
0

pr2 q 2 =

n=2 r=n+1

, r = 2, m > 2, n = 1
, r > 2, m = 2, n = 1
, r > n, m = 1, n 2
, otherwise.

, r = 2, m > 2, n = 1
, r > 2, m = 2, n = 1
, r > n, m = 1, n 2
, otherwise.

n1 2
X
pq 2
pq 2
p q
+
+
1 q 1 p n=2 1 p

p(1 p)2 p(1 p)2 p(1 p)2


+
+
p
1p
(1 p)2
= (1 p)2 + p(1 p) + p
=1
=

(c)
P (Z < X) =

pq m1 =

m=3

pq 2
= q2
1q

Problem 5
Two DTEs are communicating via modems and RS-232C interfaces over a half
duplex link. Data transmission is one directional with each message of length M.
After a message is transmitted, the sender waits for a CTS message of length na before
sending another message. Assume error-free operation and the following parameter
values:
R (line bit rate) = 9600 bps
M (message length) = 1000 bits (all data bits)
4

EE132B-HW Set #2 - Sol.

Prof. Izhak Rubin

nh (overhead in each message packet) = 24 bits


na (acknowledgement length) = 24 bits
tp (propagation time in one direction) = 1 msec
Minimum transition time between states (1,3) and (1,1) (CTS delay) is equal to
10 msec at message transmitting end, and 20 msec at message receiving end (CTS
transmitting end). All other delays during message transmission and reception are
assumed to be negligible. For the stated conditions, determine the effective data rate
in bps.
Ans:

Data message

ACK

tp

Data message

Data message
t

CTS
delay in
TX

tp

ACK

CTS
delay in
RX

Data message

tp

Figure 1: The waveforms seen by transmitter and receiver of the data message
The Figure 1 illustrates waveforms seen by transmitter and receiver of the data
message. As the figure indicates, the receiver completes reception of the data message
h
(plus overhead) at a time equal to tp plus the time M +n
(which requires to transmit
R
the data message) and is ready to transmit after a delay equal to the CTS delay at
the receiver. Reception of the CTS at the transmitter is then complete at time tp
plus nRa after the receiver begins transmission. After another delay, equal to the CTS
delay at the transmitter, the transmitter can begin to send the next message. Thus,
the time required per data message of M bits is
24 + 1000 + 24
+ 0.001 2 + 0.020 + 0.010 = 0.14117 (seconds)
9600
As a result, the effective data rate is

1000
0.14117 (seconds)

= 7.0837 103 [bps].

S-ar putea să vă placă și