MAST30001 Stochastic Modelling – 2024 Assignment 2 Submission Instructions: • Typed submissions (ideally using LATEX) are preferred. • Upload a PDF file of your solutions to Assignment 2 in Gradescope via the LMS. Grade- scope will ask you to identify on which of the uploaded pages your answers to each (sub) question are located. You may lose marks if your PDF is not easy to read (in case you are submitting scanned or handwritten solutions), or the pages of your answers are not identified correctly. • Upload R code from Question 2(h) as instructed there. • The submission deadline is 4:00pm on Friday, 18 October. • No marks will be given for answers without clear and concise explanations. Clarity, neatness, and style count. 1. [19 marks] Let (L(t))t≥0, (M(t))t≥0, and (N(t))t≥0 be independent Poisson processes with respective rates λ, µ, and ν, and let 0 < S1 < S2 < · · · and 0 < T1 < T2 < · · · be the respective times of arrivals in the M and N processes. (a) For given j ∈ {1, 2, . . .}, write down a formula for the density of Tj. (b) Given T5 = 2, what is the expected value of T2? (c) Given T5 = 2, what is the expected value of S2? (d) Given T5 = 2, what is the chance that all of T1, T2 and T3 are less than 0.75? (e) Given T5 = 2, what is the chance that all of S1, S2 and S3 are less than 0.75? (f) Derive the probability mass function of L(T1). (g) Derive the probability mass function of N(T1). (h) Derive a simple expression for the joint probability mass function of (L(T1),M(T1)). 2. [26 marks] A queuing system operates as an M/M/1 queue with arrival rate λ > 0 and service rate one, but with the added feature that at independent exponential rate one times, a “super-server” enters the system and instantaneously serves all jobs in the system (including jobs currently in service). (a) Model the system as a CTMC on {0, 1, 2, . . .} and write down its generator matrix. (b) Write at most three sentences proving for which values of λ the system is ergodic. For values of λ where the system is ergodic, derive (c) the stationary distribution,1 (d) the long-run average number of customers in the system per time unit, (e) the average time an arriving customer has to wait for service, 1It would be a good idea to make sure your calculations here are consistent with your answer in the previous part. It would also be a good idea to double-check this part, as the rest of the problem depends on the answer. (f) the average number of jobs served by the super-server when it arrives, (g) the proportion of jobs the super-server serves. (h) Write an R script that simulates the CTMC (Xt)0≤t≤20000 with X0 = 0 and λ = 3/4. Have your code output two vectors named t1 and XH, where the ith entry of XH is the ith state visited by the chain, and the ith entry of t1 is the time the chain spent in the ith state visited for that visit. Save the script as assignment2.R and submit it separately to the coding assignment in Gradescope. (You can and should check that your code and your answers from the previous parts are consistent.2) Warning! To get credit for this part of the assignment, your code must not load (or require) any packages, it must produce vectors with the correct names, and the file must be named assignment2.R (case sensitive). Once the “Autograder” finishes running after uploading, if you receive 2 out of 2 possible marks for the “Length” tests (see figure below), then this means your file is named correctly, and the script produces two vectors with the correct names and lengths that are the same, and the sum of the entries of t1 is correct. If not, you can revise and resubmit as many times as necessary before the due date. 2To put a finer point on it, you can use your code to estimate all the quantities asked for in Parts (c)-(g). If your answers and code output significantly differ, then either your code is wrong, or your answers are wrong! 51作业君版权所有