xuebaunion@vip.163.com

3551 Trousdale Rkwy, University Park, Los Angeles, CA

留学生论文指导和课程辅导

无忧GPA：https://www.essaygpa.com

工作时间：全年无休-早上8点到凌晨3点

扫码添加客服微信

扫描添加客服微信

无代写-ECMM424

时间：2021-04-30

AN

SW

ER

S

ECMM424

(with Answers)

UNIVERSITY OF EXETER

COLLEGE OF ENGINEERING, MATHEMATICS

AND PHYSICAL SCIENCES

COMPUTER SCIENCE

Examination, May 2019

Computer Modelling and Simulation

Module Leader: Dr. Jia Hu

Duration: TWO HOURS

Answer Question 1 (40%) and any TWO of the other three questions (30%

for each).

Candidates may use calculators provided they are non-programmable.

This is a CLOSED BOOK examination.

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 1

Question 1

(a) Both computer simulation and analytical modelling can be used to evaluate

the performance of systems.

(i) Describe the methods of computer simulation and analytical modelling,

respectively.

(4 marks)

(ii) Explain the situations where it is better to use analytical modelling for

performance evaluation than computer simulation.

(3 marks)

(iii) Explain the situations where computer simulation is more suitable than

analytical modelling for performance evaluation.

(3 marks)

Solutions:

Computer simulation is a computer program that mimics the behaviour

or operations of a real-world system or process over time, including its

inputs and outputs. Simulation experiments imitate the operations of a

real-world process or system over time using a computer program.

(2 marks)

Analytical modelling uses mathematical concepts, tools, and equations

to describe the behaviour or operations of a system and generates closed-

form solutions to the equations.

(2 marks)

Analytical modelling is used if the model is simple enough and

mathematical approach is feasible.

If the model structure is simple, then we could use mathematical

methods to implement the model and get the exact information for

questions of interest, this is called analytical modelling. Different

mathematical techniques (e.g., calculus, algebra, probability theory) can

be applied in this method to implement the model.

(3 marks)

ECMM424 (2019) 1

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 2

However, many real world systems are so complex that models of these

systems are virtually impossible to solve mathematically. In these cases

computer simulation can be used to imitate the behavior of the system

over time for performance evaluation.

(3 marks)

(b) The figure below shows the logical relationship of components in discrete-

event simulation. Describe the flow control of discrete-event simulation

and the functions of the Main program, Initialization routine, Time routine,

Event routine, and Report generator, respectively.

(10 marks)

Solutions:

The simulation begins at time zero with the main program invoking the

initialization routine, where the simulation clock is set to zero. Also in

the initialization routine the systems state and statistical counters and the

event list are initialized.

(2 marks)

After these settings the control goes back to the main program. In the

ECMM424 (2019) 2 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 3

next step the main program invokes the timing routine to determine

which type of event is the most imminent.

Based on the type of the next occurring event the simulation clock is

advanced to the time that event type will occur. The time of occurrence

of events is dependent on their type and their distribution in time.

(2 marks)

Then the control goes back to the main program again.

Based on the type of event, the main program invokes the appropriate

routine. If the next event is arrival then the arrival routine is invoked else

the departure routine is invoked.

(2 marks)

In general inside the event routines three main activities occur:

The system state is updated to account for the fact that an event of a

specific type has occurred.

Information about the system performance is gathered by updating

the statistical counters. The times of occurrence of future events are

generated, and this information is added to the event list.

In order to generate future events some random variates are used which

we will talk about more in detail in future sessions.

(2 marks)

After all processing has occurred in the event routine and the main

program, a check is typically made to determine (relative to some

stopping condition) if the simulation should now be terminated.

If it is time to terminated the simulation, the report generator will be

invoked from the main program to compute estimates of the desired

performance measures using the statistical counters.

If it is not to terminate the simulation then the control is passed back

to the main program. Then the main program routine invokes the

timing routine, then again the control of the program goes back to

the main program routine, then to the event routine, and so on. . . .

The termination check cycle is repeated until the stopping condition is

eventually satisfied. Time can be compressed or expanded allowing for

speedup or slowdown of the phenomena under consideration.

(2 marks)

ECMM424 (2019) 3

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 4

(c) Consider 3 boxes. Box A contains 2 white and 4 red balls; Box B contains 3

white and 6 red balls; and Box C contains 1 white and 2 red balls. If 1 ball

is selected from each box, what is the probability that the ball chosen from

box A was white, given that exactly 2 white balls were selected?

(10 marks)

Solutions:

By Bayes’s formula,

Pr(ball from A was white | 2 white balls selected)

=

Pr(ball from A was white ∩ 2 white balls selected)

Pr(2 white balls selected)

(3 marks)

Pr(ball from A was white ∩ 2 white balls selected)

=

2

6

∗ (3

9

∗ 2

3

+

6

9

∗ 1

3

) =

4

27

(3 marks)

Pr(2 white balls selected)

=

2

6

∗ 3

9

∗ 2

3

+

2

6

∗ 6

9

∗ 1

3

+

4

6

∗ 3

9

∗ 1

3

=

6

27

(3 marks)

So, the result is 2/3.

(1 mark)

(d) Buses arrive at a certain stop according to a renewal process, with interarrival

intervals taking three possible values: 80% of them are equal to 5 minutes,

15% are equal to 10 minutes, and 5% are equal to 20 minutes. How long, on

average, would a passenger coming at random to that stop have to wait for

the next bus?

(10 marks)

ECMM424 (2019) 4 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 5

Solutions:

The average interval between consecutive bus arrivals is given by

m = 0.8 ∗ 5 + 0.15 ∗ 10 + 0.05 ∗ 20 = 6.5

(3 marks)

The second moment of the interval is given by

M2 = 0.8 ∗ 25 + 0.15 ∗ 100 + 0.05 ∗ 400 = 45

(3 marks)

The waiting time would be

E(R) =

45

2 ∗ 6.5 =

45

13

≈ 3.46minute

(4 marks)

(Total 40 marks)

ECMM424 (2019) 5

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 6

Question 2

(a) Queueing networks are widely applied to model and analyse the performance

of computing and communication systems. Queueing networks can be clas-

sified into two categories: Open Queueing Networks and Closed Queueing

Networks.

(i) Describe what a queueing network is.

(2 marks)

(ii) Explain the differences between Open Queueing Networks and Closed

Queueing Networks.

(3 marks)

Solutions:

(i) Queueing Networks:

A queueing network is a collection of inter-connected nodes that

consist of queues and servers and are all connected to each other.

A queueing network is a model in which jobs departing from one

queue arrive at another queue.

(2 marks)

(ii) Open Queueing Networks:

Open Queueing Networks have external arrivals and departures and

thus the number of jobs in the system varies with time.

Closed Queueing Networks:

A closed network is just a special case of an open network where

there is no exterior, arrival or departure to or from the network.

In Open Queuing Networks, jobs may enter and leave the system.

But in Closed Queueing Networks, a fixed set of jobs circulate

between servers.

(3 marks)

(b) The following figure illustrates an open queueing network with multiple (say

N ) single-server queues in tandem.

(i) Draw the flowchart for the DEPARTURE routine of the n-th queuing

system, where 1 ≤ n ≤ N .

ECMM424 (2019) 6 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 7

(10 marks)

(ii) Describe how the routine works.

(5 marks)

Solutions:

(i) The flowchart for the DEPARTURE routine of the n-th queuing

system, where 1 ≤ n ≤ N :

(5 marks for Arrival, 5 marks for Departure)

(ii) Describe how the routine works:

For the departure, as you can see on this flowchart, the first thing

to do is to check if we have reached the server of the final node

or not. The reason for doing this is that all the first (N-1) nodes

ECMM424 (2019) 7

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 8

have a different departure to the last node. At the time of departure,

the first (N-1) nodes first schedule the arrival to the next connecting

node. The first thing they do is that they check to see if the server of

the next node is busy or not:

1- if the server is busy, the queue of the node is checked. If the

queue is not full the customer is sent into the queue otherwise it is

dropped.

2- if the server is idle then the customer goes directly into the server

for service. After dealing with the next neighboring node, the (N-

1) nodes then start to deal with their own queue. If their queue is

empty and no other customer is waiting then the server goes into an

idle state, otherwise another customer is removed from the queue

and all the relevant statistics are updated.

For the node at the end of the chain, node N, the only part of the

algorithm that is executed is the part where it has to check its own

queue status. So only the second half of the flowchart/ algorithm is

executed.

(5 marks)

(c) Confidence intervals are central to making meaningful inferences from the

results of stochastic simulation experiments.

(i) Explain what is meant by the confidence interval in simulation results.

(2 marks)

(ii) Compute the 95% confidence interval of a network where the 800

packets sent to destinations have the mean packet delay of 15 msec,

while the standard error is 2 msec. (The t distribution value for (30-1)

degrees of freedom and 95% confidence level is 2.0452).

(8 marks)

Solutions:

(i) Explain what is mean by confidence interval

During a simulation experiment, we attempt to generate only limited

ECMM424 (2019) 8 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 9

samples of a large number of representative scenarios for a system.

Therefore a Confidence Interval is a region that contains the "true"

value (the parameter of interest) with a specified probability.

(2 marks)

(ii) Calculate the 95% confidence interval

X(n)± tn−1,1−α2

√

S2(n)

n

= 15± 2.0452

√

22

30

= 15± 0.75

⇒ confidence interval = [15.75, 14.25]

(8 marks, 2 marks for each correct step)

(Total 30 marks)

ECMM424 (2019) 9

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 10

Question 3

(a) Random numbers are necessary ingredients in the simulation of almost all

discrete systems. Explain what are random numbers used in discrete-event

simulation. Describe two important statistical properties (i.e., uniformity

and independence) of random numbers.

(5 marks)

Solutions:

Random numbers in discrete-event simulation is a series of independent

and identically distributed numbers in the range from 0 to 1.

Uniformity: If the interval [0,1] is divided in to n subintervals of equal

length, the expected number of observations in each interval is N/n. The

values are uniformly distributed over a defined interval or set;

Independence: The probability of observing a value in a particular

interval is independent of the previous values drawn. It is impossible

to predict future values based on past or present ones.

(5 marks)

(b) The Linear Congruential Generator (LCG) is a widely applied random

number generator following the equation:

Xi = (aXi−1 + b)mod(m), i = 1, 2, ...

where a, b, and m are appropriate constants. Explain why LCG often has a

looping behaviour.

(5 marks)

Solutions:

When Xi takes on the values that it has had previously, exactly the same

sequence of values is regenerated, and this cycle repeats itself endlessly.

The length of the cycle is called the period of a generator.

(5 marks)

(c) Suppose X is a continuous random variable with a cumulative distribution

function (CDF), F (x) = P (X ≤ x). Describe how to generate random

variates (i.e., samples from statistical distributions) of X by using Inverse

ECMM424 (2019) 10 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 11

Transform Technique.

(5 marks)

Solutions:

Step 1: Calculate F−1 that denotes the inverse of the function F

Step 2: Generate U (0, 1) (random-number generator)

Step 3: Find X such that (X) = F−1(U), and return this value X

(5 marks)

(d) What are the union, superposition, decomposition, and PASTA properties of

Poisson processes?

(15 marks)

Solutions:

Union: If I1 and I2 are two disjoint intervals of lengths x1 and x2

respectively, and I is their union, then the number of arrivals in I from a

Poisson process with rate λ has the Poisson distribution with parameter

λ(x1 + x2).

(3 marks)

Superposition: The superposition property. If B1 and B2 are two

independent Poisson processes with rates λ1 and λ2 respectively, then

the total number of arrivals from B1 and B2 during an interval of length

x has the Poisson distribution with parameter (λ1 + λ2)x.

(3 marks)

Decomposition: If a Poisson process, A, with rate λ, is decomposed

into processes B1, B2, ..., Bn, by assigning each arrival in A to Bi with

probability qi(q1 + q2 + ... + qn = 1), then B1, B2, ..., Bn are Poisson

processes with rates q1λ, q2λ, ..., qnλ respectively, and are independent

of each other.

(4 marks)

PASTA: In the long-term, the system state seen by an arrival from a

Poisson process has the same distribution as the state seen by a ‘random

observer’, i.e. at a point in time chosen at random.

ECMM424 (2019) 11

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 12

(5 marks)

(Total 30 marks)

ECMM424 (2019) 12 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 13

Question 4

Consider the Markovian queueing system shown below. Branch labels are arrival

and service rates. Node labels give the number of customers in the system.

(a) Solve for steady state probabilities pk(k = 0, 1, 2, 3).

(10 marks)

(b) Find the average number of customers in the system and the average

response time of a customer.

(6 marks)

(c) Write down the transition rate matrix (i.e., generator) Q for this problem and

give the matrix equation relating Q to the steady state probabilities.

(4 marks)

(d) Work out the average first passage times from the state 1 to the set of states

{2, 3}.

(10 marks)

Solutions:

(a) Balance equations:

λp0 = µp1

(λ+ µ)p1 = λp0 + µp2

λp2 = µp3

(6 marks)

Normalization equation:

p0 + p1 + p2 + p3 = 1

ECMM424 (2019) 13

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 14

(1 mark)

Solving the above questions, we have

p0 =

1

1 + ρ+ ρ2 + ρ3

pi = ρ

ip0, i = 1, 2, 3

where ρ = λ

µ

.

(3 marks)

(b) The average number of customers in the system, L, is given by

1 ∗ p1 + 2 ∗ p2 + 3 ∗ p3 = ρ+ 2ρ

2 + 3ρ3

1 + ρ+ ρ2 + ρ3

(3 marks)

Using Little’s Law, the average response time, W , is given by

W =

L

λ

=

ρ+ 2ρ2 + 3ρ3

λ(1 + ρ+ ρ2 + ρ3)

(3 marks)

(c)

Q =

−λ λ

µ −λ− µ λ

µ −λ− µ λ

µ −µ

(2 marks)

pQ = 0, where p = (p0, p1, p2, p3).

(2 marks)

(d) Let the set of state S = {2, 3}

The average first passage time from 1 to S, m1,S , is given by

m1,S =

1

λ+ µ

+m0,S

µ

λ+ µ

(4 marks)

And the average first passage time from 0 to S, m0,S , is given by

m0,S =

1

λ

+m1,S

ECMM424 (2019) 14 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 15

(4 marks)

Solving the above equation, we have

m1,S =

1

λ

+

µ

λ2

(2 marks)

(Total 30 marks)

ECMM424 (2019) 15 End of Paper

学霸联盟

SW

ER

S

ECMM424

(with Answers)

UNIVERSITY OF EXETER

COLLEGE OF ENGINEERING, MATHEMATICS

AND PHYSICAL SCIENCES

COMPUTER SCIENCE

Examination, May 2019

Computer Modelling and Simulation

Module Leader: Dr. Jia Hu

Duration: TWO HOURS

Answer Question 1 (40%) and any TWO of the other three questions (30%

for each).

Candidates may use calculators provided they are non-programmable.

This is a CLOSED BOOK examination.

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 1

Question 1

(a) Both computer simulation and analytical modelling can be used to evaluate

the performance of systems.

(i) Describe the methods of computer simulation and analytical modelling,

respectively.

(4 marks)

(ii) Explain the situations where it is better to use analytical modelling for

performance evaluation than computer simulation.

(3 marks)

(iii) Explain the situations where computer simulation is more suitable than

analytical modelling for performance evaluation.

(3 marks)

Solutions:

Computer simulation is a computer program that mimics the behaviour

or operations of a real-world system or process over time, including its

inputs and outputs. Simulation experiments imitate the operations of a

real-world process or system over time using a computer program.

(2 marks)

Analytical modelling uses mathematical concepts, tools, and equations

to describe the behaviour or operations of a system and generates closed-

form solutions to the equations.

(2 marks)

Analytical modelling is used if the model is simple enough and

mathematical approach is feasible.

If the model structure is simple, then we could use mathematical

methods to implement the model and get the exact information for

questions of interest, this is called analytical modelling. Different

mathematical techniques (e.g., calculus, algebra, probability theory) can

be applied in this method to implement the model.

(3 marks)

ECMM424 (2019) 1

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 2

However, many real world systems are so complex that models of these

systems are virtually impossible to solve mathematically. In these cases

computer simulation can be used to imitate the behavior of the system

over time for performance evaluation.

(3 marks)

(b) The figure below shows the logical relationship of components in discrete-

event simulation. Describe the flow control of discrete-event simulation

and the functions of the Main program, Initialization routine, Time routine,

Event routine, and Report generator, respectively.

(10 marks)

Solutions:

The simulation begins at time zero with the main program invoking the

initialization routine, where the simulation clock is set to zero. Also in

the initialization routine the systems state and statistical counters and the

event list are initialized.

(2 marks)

After these settings the control goes back to the main program. In the

ECMM424 (2019) 2 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 3

next step the main program invokes the timing routine to determine

which type of event is the most imminent.

Based on the type of the next occurring event the simulation clock is

advanced to the time that event type will occur. The time of occurrence

of events is dependent on their type and their distribution in time.

(2 marks)

Then the control goes back to the main program again.

Based on the type of event, the main program invokes the appropriate

routine. If the next event is arrival then the arrival routine is invoked else

the departure routine is invoked.

(2 marks)

In general inside the event routines three main activities occur:

The system state is updated to account for the fact that an event of a

specific type has occurred.

Information about the system performance is gathered by updating

the statistical counters. The times of occurrence of future events are

generated, and this information is added to the event list.

In order to generate future events some random variates are used which

we will talk about more in detail in future sessions.

(2 marks)

After all processing has occurred in the event routine and the main

program, a check is typically made to determine (relative to some

stopping condition) if the simulation should now be terminated.

If it is time to terminated the simulation, the report generator will be

invoked from the main program to compute estimates of the desired

performance measures using the statistical counters.

If it is not to terminate the simulation then the control is passed back

to the main program. Then the main program routine invokes the

timing routine, then again the control of the program goes back to

the main program routine, then to the event routine, and so on. . . .

The termination check cycle is repeated until the stopping condition is

eventually satisfied. Time can be compressed or expanded allowing for

speedup or slowdown of the phenomena under consideration.

(2 marks)

ECMM424 (2019) 3

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 4

(c) Consider 3 boxes. Box A contains 2 white and 4 red balls; Box B contains 3

white and 6 red balls; and Box C contains 1 white and 2 red balls. If 1 ball

is selected from each box, what is the probability that the ball chosen from

box A was white, given that exactly 2 white balls were selected?

(10 marks)

Solutions:

By Bayes’s formula,

Pr(ball from A was white | 2 white balls selected)

=

Pr(ball from A was white ∩ 2 white balls selected)

Pr(2 white balls selected)

(3 marks)

Pr(ball from A was white ∩ 2 white balls selected)

=

2

6

∗ (3

9

∗ 2

3

+

6

9

∗ 1

3

) =

4

27

(3 marks)

Pr(2 white balls selected)

=

2

6

∗ 3

9

∗ 2

3

+

2

6

∗ 6

9

∗ 1

3

+

4

6

∗ 3

9

∗ 1

3

=

6

27

(3 marks)

So, the result is 2/3.

(1 mark)

(d) Buses arrive at a certain stop according to a renewal process, with interarrival

intervals taking three possible values: 80% of them are equal to 5 minutes,

15% are equal to 10 minutes, and 5% are equal to 20 minutes. How long, on

average, would a passenger coming at random to that stop have to wait for

the next bus?

(10 marks)

ECMM424 (2019) 4 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 5

Solutions:

The average interval between consecutive bus arrivals is given by

m = 0.8 ∗ 5 + 0.15 ∗ 10 + 0.05 ∗ 20 = 6.5

(3 marks)

The second moment of the interval is given by

M2 = 0.8 ∗ 25 + 0.15 ∗ 100 + 0.05 ∗ 400 = 45

(3 marks)

The waiting time would be

E(R) =

45

2 ∗ 6.5 =

45

13

≈ 3.46minute

(4 marks)

(Total 40 marks)

ECMM424 (2019) 5

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 6

Question 2

(a) Queueing networks are widely applied to model and analyse the performance

of computing and communication systems. Queueing networks can be clas-

sified into two categories: Open Queueing Networks and Closed Queueing

Networks.

(i) Describe what a queueing network is.

(2 marks)

(ii) Explain the differences between Open Queueing Networks and Closed

Queueing Networks.

(3 marks)

Solutions:

(i) Queueing Networks:

A queueing network is a collection of inter-connected nodes that

consist of queues and servers and are all connected to each other.

A queueing network is a model in which jobs departing from one

queue arrive at another queue.

(2 marks)

(ii) Open Queueing Networks:

Open Queueing Networks have external arrivals and departures and

thus the number of jobs in the system varies with time.

Closed Queueing Networks:

A closed network is just a special case of an open network where

there is no exterior, arrival or departure to or from the network.

In Open Queuing Networks, jobs may enter and leave the system.

But in Closed Queueing Networks, a fixed set of jobs circulate

between servers.

(3 marks)

(b) The following figure illustrates an open queueing network with multiple (say

N ) single-server queues in tandem.

(i) Draw the flowchart for the DEPARTURE routine of the n-th queuing

system, where 1 ≤ n ≤ N .

ECMM424 (2019) 6 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 7

(10 marks)

(ii) Describe how the routine works.

(5 marks)

Solutions:

(i) The flowchart for the DEPARTURE routine of the n-th queuing

system, where 1 ≤ n ≤ N :

(5 marks for Arrival, 5 marks for Departure)

(ii) Describe how the routine works:

For the departure, as you can see on this flowchart, the first thing

to do is to check if we have reached the server of the final node

or not. The reason for doing this is that all the first (N-1) nodes

ECMM424 (2019) 7

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 8

have a different departure to the last node. At the time of departure,

the first (N-1) nodes first schedule the arrival to the next connecting

node. The first thing they do is that they check to see if the server of

the next node is busy or not:

1- if the server is busy, the queue of the node is checked. If the

queue is not full the customer is sent into the queue otherwise it is

dropped.

2- if the server is idle then the customer goes directly into the server

for service. After dealing with the next neighboring node, the (N-

1) nodes then start to deal with their own queue. If their queue is

empty and no other customer is waiting then the server goes into an

idle state, otherwise another customer is removed from the queue

and all the relevant statistics are updated.

For the node at the end of the chain, node N, the only part of the

algorithm that is executed is the part where it has to check its own

queue status. So only the second half of the flowchart/ algorithm is

executed.

(5 marks)

(c) Confidence intervals are central to making meaningful inferences from the

results of stochastic simulation experiments.

(i) Explain what is meant by the confidence interval in simulation results.

(2 marks)

(ii) Compute the 95% confidence interval of a network where the 800

packets sent to destinations have the mean packet delay of 15 msec,

while the standard error is 2 msec. (The t distribution value for (30-1)

degrees of freedom and 95% confidence level is 2.0452).

(8 marks)

Solutions:

(i) Explain what is mean by confidence interval

During a simulation experiment, we attempt to generate only limited

ECMM424 (2019) 8 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 9

samples of a large number of representative scenarios for a system.

Therefore a Confidence Interval is a region that contains the "true"

value (the parameter of interest) with a specified probability.

(2 marks)

(ii) Calculate the 95% confidence interval

X(n)± tn−1,1−α2

√

S2(n)

n

= 15± 2.0452

√

22

30

= 15± 0.75

⇒ confidence interval = [15.75, 14.25]

(8 marks, 2 marks for each correct step)

(Total 30 marks)

ECMM424 (2019) 9

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 10

Question 3

(a) Random numbers are necessary ingredients in the simulation of almost all

discrete systems. Explain what are random numbers used in discrete-event

simulation. Describe two important statistical properties (i.e., uniformity

and independence) of random numbers.

(5 marks)

Solutions:

Random numbers in discrete-event simulation is a series of independent

and identically distributed numbers in the range from 0 to 1.

Uniformity: If the interval [0,1] is divided in to n subintervals of equal

length, the expected number of observations in each interval is N/n. The

values are uniformly distributed over a defined interval or set;

Independence: The probability of observing a value in a particular

interval is independent of the previous values drawn. It is impossible

to predict future values based on past or present ones.

(5 marks)

(b) The Linear Congruential Generator (LCG) is a widely applied random

number generator following the equation:

Xi = (aXi−1 + b)mod(m), i = 1, 2, ...

where a, b, and m are appropriate constants. Explain why LCG often has a

looping behaviour.

(5 marks)

Solutions:

When Xi takes on the values that it has had previously, exactly the same

sequence of values is regenerated, and this cycle repeats itself endlessly.

The length of the cycle is called the period of a generator.

(5 marks)

(c) Suppose X is a continuous random variable with a cumulative distribution

function (CDF), F (x) = P (X ≤ x). Describe how to generate random

variates (i.e., samples from statistical distributions) of X by using Inverse

ECMM424 (2019) 10 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 11

Transform Technique.

(5 marks)

Solutions:

Step 1: Calculate F−1 that denotes the inverse of the function F

Step 2: Generate U (0, 1) (random-number generator)

Step 3: Find X such that (X) = F−1(U), and return this value X

(5 marks)

(d) What are the union, superposition, decomposition, and PASTA properties of

Poisson processes?

(15 marks)

Solutions:

Union: If I1 and I2 are two disjoint intervals of lengths x1 and x2

respectively, and I is their union, then the number of arrivals in I from a

Poisson process with rate λ has the Poisson distribution with parameter

λ(x1 + x2).

(3 marks)

Superposition: The superposition property. If B1 and B2 are two

independent Poisson processes with rates λ1 and λ2 respectively, then

the total number of arrivals from B1 and B2 during an interval of length

x has the Poisson distribution with parameter (λ1 + λ2)x.

(3 marks)

Decomposition: If a Poisson process, A, with rate λ, is decomposed

into processes B1, B2, ..., Bn, by assigning each arrival in A to Bi with

probability qi(q1 + q2 + ... + qn = 1), then B1, B2, ..., Bn are Poisson

processes with rates q1λ, q2λ, ..., qnλ respectively, and are independent

of each other.

(4 marks)

PASTA: In the long-term, the system state seen by an arrival from a

Poisson process has the same distribution as the state seen by a ‘random

observer’, i.e. at a point in time chosen at random.

ECMM424 (2019) 11

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 12

(5 marks)

(Total 30 marks)

ECMM424 (2019) 12 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 13

Question 4

Consider the Markovian queueing system shown below. Branch labels are arrival

and service rates. Node labels give the number of customers in the system.

(a) Solve for steady state probabilities pk(k = 0, 1, 2, 3).

(10 marks)

(b) Find the average number of customers in the system and the average

response time of a customer.

(6 marks)

(c) Write down the transition rate matrix (i.e., generator) Q for this problem and

give the matrix equation relating Q to the steady state probabilities.

(4 marks)

(d) Work out the average first passage times from the state 1 to the set of states

{2, 3}.

(10 marks)

Solutions:

(a) Balance equations:

λp0 = µp1

(λ+ µ)p1 = λp0 + µp2

λp2 = µp3

(6 marks)

Normalization equation:

p0 + p1 + p2 + p3 = 1

ECMM424 (2019) 13

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 14

(1 mark)

Solving the above questions, we have

p0 =

1

1 + ρ+ ρ2 + ρ3

pi = ρ

ip0, i = 1, 2, 3

where ρ = λ

µ

.

(3 marks)

(b) The average number of customers in the system, L, is given by

1 ∗ p1 + 2 ∗ p2 + 3 ∗ p3 = ρ+ 2ρ

2 + 3ρ3

1 + ρ+ ρ2 + ρ3

(3 marks)

Using Little’s Law, the average response time, W , is given by

W =

L

λ

=

ρ+ 2ρ2 + 3ρ3

λ(1 + ρ+ ρ2 + ρ3)

(3 marks)

(c)

Q =

−λ λ

µ −λ− µ λ

µ −λ− µ λ

µ −µ

(2 marks)

pQ = 0, where p = (p0, p1, p2, p3).

(2 marks)

(d) Let the set of state S = {2, 3}

The average first passage time from 1 to S, m1,S , is given by

m1,S =

1

λ+ µ

+m0,S

µ

λ+ µ

(4 marks)

And the average first passage time from 0 to S, m0,S , is given by

m0,S =

1

λ

+m1,S

ECMM424 (2019) 14 Please Turn Over

AN

SW

ER

S

ECMM424 – 01/Mar/2019 – with answers Page 15

(4 marks)

Solving the above equation, we have

m1,S =

1

λ

+

µ

λ2

(2 marks)

(Total 30 marks)

ECMM424 (2019) 15 End of Paper

学霸联盟

- 留学生代写
- Python代写
- Java代写
- c/c++代写
- 数据库代写
- 算法代写
- 机器学习代写
- 数据挖掘代写
- 数据分析代写
- Android代写
- html代写
- 计算机网络代写
- 操作系统代写
- 计算机体系结构代写
- R代写
- 数学代写
- 金融作业代写
- 微观经济学代写
- 会计代写
- 统计代写
- 生物代写
- 物理代写
- 机械代写
- Assignment代写
- sql数据库代写
- analysis代写
- Haskell代写
- Linux代写
- Shell代写
- Diode Ideality Factor代写
- 宏观经济学代写
- 经济代写
- 计量经济代写
- math代写
- 金融统计代写
- 经济统计代写
- 概率论代写
- 代数代写
- 工程作业代写
- Databases代写
- 逻辑代写
- JavaScript代写
- Matlab代写
- Unity代写
- BigDate大数据代写
- 汇编代写
- stat代写
- scala代写
- OpenGL代写
- CS代写
- 程序代写
- 简答代写
- Excel代写
- Logisim代写
- 代码代写
- 手写题代写
- 电子工程代写
- 判断代写
- 论文代写
- stata代写
- witness代写
- statscloud代写
- 证明代写
- 非欧几何代写
- 理论代写
- http代写
- MySQL代写
- PHP代写
- 计算代写
- 考试代写
- 博弈论代写
- 英语代写
- essay代写
- 不限代写
- lingo代写
- 线性代数代写
- 文本处理代写
- 商科代写
- visual studio代写
- 光谱分析代写
- report代写
- GCP代写
- 无代写
- 电力系统代写
- refinitiv eikon代写
- 运筹学代写
- simulink代写
- 单片机代写
- GAMS代写
- 人力资源代写
- 报告代写
- SQLAlchemy代写
- Stufio代写
- sklearn代写
- 计算机架构代写
- 贝叶斯代写
- 以太坊代写
- 计算证明代写
- prolog代写
- 交互设计代写
- mips代写
- css代写
- 云计算代写
- dafny代写
- quiz考试代写
- js代写
- 密码学代写
- ml代写
- 水利工程基础代写
- 经济管理代写
- Rmarkdown代写
- 电路代写
- 质量管理画图代写
- sas代写
- 金融数学代写
- processing代写
- 预测分析代写
- 机械力学代写
- vhdl代写
- solidworks代写
- 不涉及代写
- 计算分析代写
- Netlogo代写
- openbugs代写
- 土木代写
- 国际金融专题代写
- 离散数学代写
- openssl代写
- 化学材料代写
- eview代写
- nlp代写
- Assembly language代写
- gproms代写
- studio代写
- robot analyse代写
- pytorch代写
- 证明题代写
- latex代写
- coq代写
- 市场营销论文代写
- 人力资论文代写
- weka代写
- 英文代写
- Minitab代写
- 航空代写
- webots代写
- Advanced Management Accounting代写
- Lunix代写
- 云基础代写
- 有限状态过程代写
- aws代写
- AI代写
- 图灵机代写
- Sociology代写
- 分析代写
- 经济开发代写
- Data代写
- jupyter代写
- 通信考试代写
- 网络安全代写
- 固体力学代写
- spss代写
- 无编程代写
- react代写
- Ocaml代写
- 期货期权代写
- Scheme代写
- 数学统计代写
- 信息安全代写
- Bloomberg代写
- 残疾与创新设计代写
- 历史代写
- 理论题代写
- cpu代写
- 计量代写
- Xpress-IVE代写
- 微积分代写
- 材料学代写
- 代写
- 会计信息系统代写
- 凸优化代写
- 投资代写
- F#代写
- C#代写
- arm代写
- 伪代码代写
- 白话代写
- IC集成电路代写
- reasoning代写
- agents代写
- 精算代写
- opencl代写
- Perl代写
- 图像处理代写
- 工程电磁场代写
- 时间序列代写
- 数据结构算法代写
- 网络基础代写
- 画图代写
- Marie代写
- ASP代写
- EViews代写
- Interval Temporal Logic代写
- ccgarch代写
- rmgarch代写
- jmp代写
- 选择填空代写
- mathematics代写
- winbugs代写
- maya代写
- Directx代写
- PPT代写
- 可视化代写
- 工程材料代写
- 环境代写
- abaqus代写
- 投资组合代写
- 选择题代写
- openmp.c代写
- cuda.cu代写
- 传感器基础代写
- 区块链比特币代写
- 土壤固结代写
- 电气代写
- 电子设计代写
- 主观题代写
- 金融微积代写
- ajax代写
- Risk theory代写
- tcp代写
- tableau代写
- mylab代写
- research paper代写
- 手写代写
- 管理代写
- paper代写
- 毕设代写
- 衍生品代写
- 学术论文代写
- 计算画图代写
- SPIM汇编代写
- 演讲稿代写
- 金融实证代写
- 环境化学代写
- 通信代写
- 股权市场代写
- 计算机逻辑代写
- Microsoft Visio代写
- 业务流程管理代写
- Spark代写
- USYD代写
- 数值分析代写
- 有限元代写
- 抽代代写
- 不限定代写
- IOS代写
- scikit-learn代写
- ts angular代写
- sml代写
- 管理决策分析代写
- vba代写
- 墨大代写
- erlang代写
- Azure代写
- 粒子物理代写
- 编译器代写
- socket代写
- 商业分析代写
- 财务报表分析代写
- Machine Learning代写
- 国际贸易代写
- code代写
- 流体力学代写
- 辅导代写
- 设计代写
- marketing代写
- web代写
- 计算机代写
- verilog代写
- 心理学代写
- 线性回归代写
- 高级数据分析代写
- clingo代写
- Mplab代写
- coventorware代写
- creo代写
- nosql代写
- 供应链代写
- uml代写
- 数字业务技术代写
- 数字业务管理代写
- 结构分析代写
- tf-idf代写
- 地理代写
- financial modeling代写
- quantlib代写
- 电力电子元件代写
- atenda 2D代写
- 宏观代写
- 媒体代写
- 政治代写
- 化学代写
- 随机过程代写
- self attension算法代写
- arm assembly代写
- wireshark代写
- openCV代写
- Uncertainty Quantificatio代写
- prolong代写
- IPYthon代写
- Digital system design 代写
- julia代写
- Advanced Geotechnical Engineering代写
- 回答问题代写
- junit代写
- solidty代写
- maple代写
- 光电技术代写
- 网页代写
- 网络分析代写
- ENVI代写
- gimp代写
- sfml代写
- 社会学代写
- simulationX solidwork代写
- unity 3D代写
- ansys代写
- react native代写
- Alloy代写
- Applied Matrix代写
- JMP PRO代写
- 微观代写
- 人类健康代写
- 市场代写
- proposal代写
- 软件代写
- 信息检索代写
- 商法代写
- 信号代写
- pycharm代写
- 金融风险管理代写
- 数据可视化代写
- fashion代写
- 加拿大代写
- 经济学代写
- Behavioural Finance代写
- cytoscape代写
- 推荐代写
- 金融经济代写
- optimization代写
- alteryxy代写
- tabluea代写
- sas viya代写
- ads代写
- 实时系统代写
- 药剂学代写
- os代写
- Mathematica代写
- Xcode代写
- Swift代写
- rattle代写
- 人工智能代写
- 流体代写
- 结构力学代写
- Communications代写
- 动物学代写
- 问答代写
- MiKTEX代写
- 图论代写
- 数据科学代写
- 计算机安全代写
- 日本历史代写
- gis代写
- rs代写
- 语言代写
- 电学代写
- flutter代写
- drat代写
- 澳洲代写
- 医药代写
- ox代写
- 营销代写
- pddl代写
- 工程项目代写
- archi代写
- Propositional Logic代写
- 国际财务管理代写
- 高宏代写
- 模型代写
- 润色代写
- 营养学论文代写
- 热力学代写
- Acct代写
- Data Synthesis代写
- 翻译代写
- 公司法代写
- 管理学代写
- 建筑学代写
- 生理课程代写
- 动画代写
- 高数代写
- 内嵌式代写
- Truffles代写
- 地质学代写