ACM 116 Problem Set 4 Solutions

Similar documents
Continuous-Time Markov Chain

Chapter 2. Poisson Processes. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Chapter 5. Continuous-Time Markov Chains. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Notes on Continuous Random Variables

M/M/1 Queueing System with Delayed Controlled Vacation

Continuous-time Markov Chains

Figure 10.1: Recording when the event E occurs

Exponential Distribution and Poisson Process

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

IEOR 6711, HMWK 5, Professor Sigman

Transform Techniques - CF

Solutions to Homework Discrete Stochastic Processes MIT, Spring 2011

The exponential distribution and the Poisson process

Continuous Time Markov Chains

Continuous time Markov chains

Link Models for Packet Switching

Chapter 5: Special Types of Queuing Models

Statistics 150: Spring 2007

Markov processes and queueing networks

Chapter 8 Queuing Theory Roanna Gee. W = average number of time a customer spends in the system.

Stochastic process. X, a series of random variables indexed by t

Time Reversibility and Burke s Theorem

M/G/1 and M/G/1/K systems

Stochastic Models in Computer Science A Tutorial

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Part I Stochastic variables and Markov chains

M/G/1 queues and Busy Cycle Analysis

Bernoulli Counting Process with p=0.1

Expected Values, Exponential and Gamma Distributions

LECTURE #6 BIRTH-DEATH PROCESS

Lecture 20: Reversible Processes and Queues

Class 11 Non-Parametric Models of a Service System; GI/GI/1, GI/GI/n: Exact & Approximate Analysis.

Recap. Probability, stochastic processes, Markov chains. ELEC-C7210 Modeling and analysis of communication networks

2905 Queueing Theory and Simulation PART III: HIGHER DIMENSIONAL AND NON-MARKOVIAN QUEUES

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science

2905 Queueing Theory and Simulation PART IV: SIMULATION

reversed chain is ergodic and has the same equilibrium probabilities (check that π j =

Probability Distributions

Probability and Statistics Concepts

Lecture 9: Deterministic Fluid Models and Many-Server Heavy-Traffic Limits. IEOR 4615: Service Engineering Professor Whitt February 19, 2015

Lecture 4a: Continuous-Time Markov Chain Models

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science

Exercises Solutions. Automation IEA, LTH. Chapter 2 Manufacturing and process systems. Chapter 5 Discrete manufacturing problems

P (L d k = n). P (L(t) = n),

Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1

Exact Simulation of the Stationary Distribution of M/G/c Queues

Random variables. DS GA 1002 Probability and Statistics for Data Science.

h(x) = f(x)/g(x) = (1 + x)e (1/2)x.

Review of Queuing Models

Computer Networks More general queuing systems

EE126: Probability and Random Processes

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.265/15.070J Fall 2013 Lecture 22 12/09/2013. Skorokhod Mapping Theorem. Reflected Brownian Motion

Stat 512 Homework key 2

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

Markov Processes and Queues

Q = (c) Assuming that Ricoh has been working continuously for 7 days, what is the probability that it will remain working at least 8 more days?

Transform Techniques - CF

Expected Values, Exponential and Gamma Distributions

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations

UNIVERSITY OF LONDON IMPERIAL COLLEGE LONDON

T. Liggett Mathematics 171 Final Exam June 8, 2011

Quantitative Model Checking (QMC) - SS12

Since D has an exponential distribution, E[D] = 0.09 years. Since {A(t) : t 0} is a Poisson process with rate λ = 10, 000, A(0.

MATH 56A: STOCHASTIC PROCESSES CHAPTER 6

Interlude: Practice Final

TCOM 501: Networking Theory & Fundamentals. Lecture 6 February 19, 2003 Prof. Yannis A. Korilis

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/6/16. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

Northwestern University Department of Electrical Engineering and Computer Science

Chapter 4. Continuous Random Variables

The Performance Impact of Delay Announcements

2 Continuous Random Variables and their Distributions

Queueing Theory. VK Room: M Last updated: October 17, 2013.

The story of the film so far... Mathematics for Informatics 4a. Continuous-time Markov processes. Counting processes

Transform Techniques - CF

Simple queueing models

Modeling Rare Events

Making Delay Announcements

M/G/1 and Priority Queueing

Queuing Theory. Using the Math. Management Science

Performance Modelling of Computer Systems

Link Models for Circuit Switching

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

YORK UNIVERSITY FACULTY OF ARTS DEPARTMENT OF MATHEMATICS AND STATISTICS MATH , YEAR APPLIED OPTIMIZATION (TEST #4 ) (SOLUTIONS)

Simulating events: the Poisson process

An Analysis of the Preemptive Repeat Queueing Discipline

Contents Preface The Exponential Distribution and the Poisson Process Introduction to Renewal Theory

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

Renewal processes and Queues

IEOR 4106: Spring Solutions to Homework Assignment 7: Due on Tuesday, March 22.

Chapter 3 Balance equations, birth-death processes, continuous Markov Chains

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

The Transition Probability Function P ij (t)

Solutions to COMP9334 Week 8 Sample Problems

Chapter 1 Statistical Reasoning Why statistics? Section 1.1 Basics of Probability Theory

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

Chapter 2. Poisson Processes

Queueing Systems: Lecture 3. Amedeo R. Odoni October 18, Announcements

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/25/17. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

Transcription:

ACM 6 Problem Set 4 Solutions Lei Zhang Problem Answer (a) is correct. Suppose I arrive at time t, and the first arrival after t is bus N i + and occurs at time T Ni+. Let W t = T Ni+ t, which is the waiting time or forward recurrence time at t. By the memoryless property, it s clear that W t is exponentially distributed with rate λ, E[W t ] = λ. Also, for fixed t, let { t TNi, if N V t = i > 0 t if N i = 0 be the backward recurrence time at t, the time that has elapsed at t since the last arrival bus prior to t (or t if there have been no arrivals). It s clear that 0 V t t, thus V t cannot be exponentially distributed. Actually, V t has the cumulative distribution function (figure ) 0 s < 0 F (s) = e λs 0 s < t s t As t, F converges to the cumulative distribution function of an exponential distribution. V t has a distribution function P. Notice that since F has discontinuity at t, P is point mass at t. 0 s < 0 λe P (s) = λs 0 s < t e λt δ(s t) s = t 0 s > t 0.8 0.6 0.4 0.2 0 0 0.5.5 2 2.5 3 Figure : Cumulative Distribution Function F for V t

We can compute E[V t ] = t 0 sλe λs ds + te λt = te λt + e λt λ = e λt λ + te λt W t and V t are indepent for each t by the memoryless property. Therefore we see that W t and V t are not symmetric for fixed t, although as t, E(W t ) = E(V t ) = λ. This solution is based on pp60, Probability by A F Karr, Springer-Verlag. Problem 2 The Poisson process in the problem is a process of randomly occurring events in space such that: i) For any region of volume V the number of events in that region has a Poisson distribution with mean λv. ii) The number of events in nonoverlapping regions are indepent. Fix the star alpha at origin y = 0, consider the region V = {y R 3 0 < y < x} and V 2 = {y R 3 x < R < x + dx}, the probability P that the nearest neighbor to alpha belongs to V 2 is, the probability distribution function is given by Problem 3 P = P (N(V ) = 0)P (N(V 2 ) ) = e λv (λv 2 + o(v 2 )) = 4λπx 2 e 4λπx3 3 dx f R (x) = 4λπx 2 e 4λπx3 3, x > 0. (a) State i can be defined as: i customers in the station, m i customers are outside the station and each will enter the system will exponential rate θ, 0 0 m. The balance equation is state entering rate = leaving rate 0 µp = mθp 0 0 < i < m (m i + )P i + µp i+ = ((m i)θ + µ)p i m θp m = µp m which can be solved by and P i = m! (m i)! P i =. ( ) i θ P 0 µ 2

(b) Average rate that customer enter the system is λ a = P i θ(m i) = mθ θ ip i = θ(m L). The average number of customers in the system L is L = ip i. (c) The average time that a customer sps in the station per visit is m L W = L/λ a = θ(m L) = ip i θm θ m ip i Problem 4 (a) State i can be defined as the state that i customer in the system. The balance equation is, state entering rate = leaving rate 0 µp = λp 0 λp 0 + 2µP 2 = (λ + µ)p 2 λp + 2µP 3 = (λ + 2µ)P 2 3 λp 2 = 2µP 3 (b) Let ρ = λ µ. The solution of the balance equation is given by the long run probabilities, P 0 = P = P 2 = P 3 = + ρ + 2 ρ2 + 4 ρ3 ρ + ρ + 2 ρ2 + 4 ρ3 2 ρ2 + ρ + 2 ρ2 + 4 ρ3 4 ρ3 + ρ + 2 ρ2 + 4 ρ3 (c) If a customer arrives and finds two others in the system, his waiting time is exponential with rate 2µ and service time is exponential with rate µ. Therefore the expected time he sps in the system is E(T ) = 2µ + µ = 3 2µ. (d) Customers can enter if less than 3 customers in the system. The proportion of customers entering the system is (e) The rate of customers entering the system is The average number of customers in the system is P 3 = ρ + 2 ρ2 + 4 ρ3 + ρ + 2 ρ2 + 4 ρ3. λ a = λ( P 3 ). L = P + 2P 2 + 3P 3 = ρ + ρ 2 + 3 4 ρ3 + ρ + 2 ρ2 + 4 ρ3 3

5.5 convergence of mean value 5 E(X)=5 4.5 4 3.5 3 2.5 2 E(X3)=2.5 E(X2)= 0.5 0 0 20 30 40 50 60 Figure 2: convergence plot The average time a customer in the system is Problem 5 W = L = ρ + ρ2 + 3 4 ρ3 λ a λ( + ρ + 2 ρ2 ) (a) By the fact that λ < min{µ, µ 2, µ 3 } and Burke s Theorem, there exist long run probabilities (steady state) and the departure process of each station is also Poisson with rate λ. Let ρ = λ µ 3 = 0/5 = 2/3, the probability of k customers in the station is Suppose c is integer, we have lim P (X 3(t) > c) = t ρ k ( ρ). ρ k ( ρ) = ρ c+. The smallest number c for which lim t P (X 3 (t) > c) < 0.0 is given by c = x means the minimum integer larger than x. c+ log(0.0) log ρ =, where (b) See the accompanying Matlab file in the Appix. In the long run, the averaged time in server i is L i = λ µ, thus L i λ = E(X ) = 5, L 2 = E(X 2 ) = and L 3 = E(X 3 ) = 2. We study the convergence by sampling X i and drawing the averaged X i at different time points, and compare it with E(X i ). In figure 2, we can see that after about 30 hours the mean value converges visually. Appix Matlab-code for Problem 2 % This code is modified from Mulin Cheng s homework % % The function prob5 is for running the numerical % experiments 4

function prob5 close all clear all lambda=0; mu=2; mu2=20; mu3=5; % simulate the process up to time T T=60; N=60; % sample time points tlist=linspace(t/n,t,n); samplesdrawn=00000; X=zeros(samplesdrawn,N); X2=X; X3=X; X0=zeros(,N); X20=X0; X30=X0; for i=:samplesdrawn [X0,X20,X30]=sample(lambda,mu,mu2,mu3,T,tlist); X(i,:)=X0; X2(i,:)=X20; X3(i,:)=X30; figure hold on plot(tlist,mean(x),tlist,mean(x2),tlist,mean(x3)); line([0 T],[5 5]);text(0,5, E(X)=5 ) line([0 T],[2 2]);text(0,2, E(X3)=2 ) line([0 T],[ ]);text(0,, E(X2)= ) % This function is for the sampling with the method described % in 5(b) % X_i number of customers in station i at time list tlist % lambda arrival rate % mu_i service rate at station i % T simulation time % tlist sample time list function [X,X2,X3]=sample(lambda,mu,mu2,mu3,T,tlist) %the total number of customers entering the system by time t N=poissrnd(lambda*T); n=length(tlist); X=zeros(,n); X2=zeros(,n); X3=zeros(,n); % arrival times AT0=T*rand(N,); % ordered arrival times AT=sort(AT0, asc ); DT=DepartTime(AT,mu); 5

DT2=DepartTime(DT,mu2); DT3=DepartTime(DT2,mu3); for i=:n t=tlist(i); % M is the arrivals at server before time t M=find(AT<=t,, last ); if length(m)==0 % if no arrivals before time t M=0; X(i)=0; X2(i)=0; X3(i)=0; % departures from server before time t temp=find(dt(:m)<=t,, last ); if length(temp)==0 % if no departure before time t temp=0; X(i)=M; X2(i)=0; X3(i)=0; % arrivals at server - departures from server X(i)=M-temp; % M is departures from server, i.e. arrivals at server 2 M=temp; % departures from server 2 temp=find(dt2(:m)<=t,, last ); if length(temp)==0 % if no departure before time t temp=0; X2(i)=M; X3(i)=0; % arrivals at server 2 - departures from server 2 X2(i)=M-temp; % M is departures from server 2, i.e. arrivals at server 3 M=temp; % departures from server 3 temp=find(dt3(:m)<=t,, last ); if length(temp)==0 % if no departure before time t temp=0; X3(i)=M; % arrivals at server 3 - departures from server 3 X3(i)=M-temp; return % This function is for the departure time of customers 6

% passing by a single station with service rate mu % DT departure times % AT arrival times % mu service rate function DT=DepartTime(AT,mu) n=length(at); DT=zeros(n,); % sample the service time ST=exprnd(/mu,n,); DT()=AT()+ST(); for i=2:n DT(i)=AT(i)+max([DT(i-)-AT(i),0])+ST(i); return 7