{
  "cells": [
    {
      "metadata": {
        "collapsed": true
      },
      "cell_type": "markdown",
      "source": "# BL40A2030 Wireless Communication Networks\n\n## Week 2 - Assignment\n\n### Author: [Write your name]"
    },
    {
      "metadata": {},
      "cell_type": "markdown",
      "source": "### Part I: Theory (40%)\n\n**1. Explain with your own words what is a random variable and a random process.**\n\n**2. Explain with your own words and give an example of the following kind of random processes:**\n\n- (a) Memoryless\n- (b) Markov\n- (c) History-dependent"
    },
    {
      "metadata": {},
      "cell_type": "markdown",
      "source": "### Part II: Jupyter NB experiments (60%)\n\n**The LUT restaurant works from 9 to 14. Based on the data, there were identified three different periods in relation to arrival of people to have lunch. Answer the following 3 questions.** \n\n*Hint:* Careful with the time scales given in the question and the one implemented in the tutorial.\n\n**3. The arrivals follow a Poisson process with different arrival rates (see below). Simulate it, plot the historgram from the simulated results and compare with the analytical formulation. These are the parameters.**\n\n- (a) For two hours between 9 and 11, the arrival rate is 10 students per 10 minutes.\n- (b) For two hours between 11 and 13, the arrival rate is 30 students per 10 minutes.\n- (c) For two hours between 13 and 15, the arrival rate is 20 students per 10 minutes.\n\n**NOTE: Compute using rates in students per minute.**\n\n**4. Using the code from the tutorial, simulate these three scenarios (one scenario per cell, do not combine the three scenarios in the same code). In this case, the restaurant put more works so the service rate varies as follows.**\n\n- (a) For two hours between 9 and 11, the arrival rate is 10 students per 10 minutes. Service rate is 10 students per 10 minutes.\n- (b) For two hours between 11 and 13, the arrival rate is 30 students per 10 minutes. Service rate is 35 students per 10 minutes.\n- (c) For two hours between 13 and 15, the arrival rate is 20 students per 10 minutes. Serice rate is 19 students per 10 minutes.\n\n**NOTE 1: Compute using rates in students per hour as input of the code.**\n\n**NOTE 2: Simulation time is 2 hours.**\n\n**NOTE 3: The analytical formulation only works when the queue is stable, i.e. arrival rates lower than service rates**\n\n**5. Discussions about the results.**\n- What is the impact of a simulation time of 2 hours?\n- In the simulations, the 3 periods were also considered independent, i.e. the initial states of the queues were always considered 0. What is the impact of this assumption? (No need to simulate, just arguments)\n- Would be this a sound model? Why?\n\n**Challenge (not to be graded). Simulate a more realistic queue system considering that the three periods are sequencial and that the last period only ends after the last service is complete. When the restaurant is closed?**"
    },
    {
      "metadata": {
        "trusted": true
      },
      "cell_type": "code",
      "source": "",
      "execution_count": null,
      "outputs": []
    }
  ],
  "metadata": {
    "kernelspec": {
      "name": "python36",
      "display_name": "Python 3.6",
      "language": "python"
    },
    "language_info": {
      "mimetype": "text/x-python",
      "nbconvert_exporter": "python",
      "name": "python",
      "pygments_lexer": "ipython3",
      "version": "3.6.6",
      "file_extension": ".py",
      "codemirror_mode": {
        "version": 3,
        "name": "ipython"
      }
    }
  },
  "nbformat": 4,
  "nbformat_minor": 2
}