**1. (M/M/1/K queue) Go to the p. 149 (sectin 7.2) of this book.**

(a) Plot the block probability (probability of the queue is full when a new arrival happens) $P_K$ as a function of $K$ (size of the queue) for $\lambda = 1$ (arrival rate) and $\mu=2$ (service rate). Note that $P_K$ is the probability of having $K$ elements in the system. Use $K$ between 0 and 10.

(b) Plot the expected waiting time in the queue system $\bar{W}$ as a function of $K$ (size of the queue) for $\lambda = 1$ (arrival rate) and $\mu=2$ (service rate). Note that $P_K$ is the probability of having $K$ elements in the system. Use $K$ between 0 and 10.

(c) Discuss the trade-off involved between waiting time and block probability.

**2. ($x$ M/M/1 queues in tandem) Study the network of $x$ queues, a special case of the system presented in Fig. 4.16 in p. 109 from 3. Consider that the arrival rate is $\lambda$ and the service rate is $\mu$ (the same for all servers) so that $\lambda$ smaller that $\mu$**

- What is the probability that all $x$ queues are empty at the same time as a function of $\lambda$, $\mu$ and $\rho = \lambda/\mu$?
- Plot this probability as a function of $\lambda$ for $\mu = 3$. Plot in the same figure using the values of $x=1,2,3,4,5$.

**3. (Optimize Slotted Aloha) In the tutorial, an optimization related to the pure Aloha was presented. Follow the same approach and optimize the Slotted Aloha. Plot the results together with the one presented in the tutorial.**

**4. (Theory) Explain with your own words the basics of the following protocols. Whenever it is possible, compare their differences in terms of throughput, delay and implementation complexity. Use this slides to help.**

- Pure Aloha
- Slotted Aloha
- CSMA non-persistant
- CSMA 1-persistant
- CSMA p-persistant