# ELEN E6761 Computer Communication Networks

## Homework 4: CSMA

- In all our discussions so far we have considered equal size packets where the transmission time of each packet was one unit. In this question, we consider slotted CSMA with variable packet lengths. Assume that the transmission time of each packet is a random variable
*X*; for consistency with the slotted assumption, assume that*X*is discrete, taking values that are integer multiples of*β*. Assume that all transmission times are independent and identically distributed (i.i.d.) with the mean*X*¯ = 1. Further, the idle detection time*β*is very small.

- Let
*Y*be the longer of two iid transmissions*X*_{1 }and*X*_{2 }(i.e.,*Y*= max(*X*_{1}*,X*_{2})). Show that the expected value of Y satisfies*Y*¯ ≤ 2*X*¯. - Using (a), show that the expected cycle length, given a collision of two packets, is atmost 2 +
*β*. - Let
*N*=_{k }*n*be the number of packets in the system at the beginning of cycle*k*. Show that the the expected number of attempted transmissions in this cycle is*g*(*n*) =*λβ*+ - Show that the expected cycle length is at most

*βe*−*g*(*n*) + (1 + *β*)*g*(*n*)*e*−*g*(*n*) + (1 + (*β/*2))*g*2(*n*)*e*−*g*(*n*)*.*

Hint: To show this, use the following facts: a binomial *B*(*n,p*) distribution can be approximated by a poisson distribution with mean *np *if *n *is large and *p *is small, then it follows that the number of attempted transmissions can be approximated by a Poisson random variable with mean *g*(*n*). Also we can ignore collisions of more than two packets as the probability of such events is negligible (*g*(*n*) is small).

- Find an upperbound on the drift
*D*and write down the condition on the arrival rate_{k }*λ*for stability of the system.

- Show that the throughput is maximized (for small
*β*) by*g*(*n*) =*√β*. - What is the optimal
*q*^{∗}? What is the maximum throughput?