Vous êtes sur la page 1sur 14

Stochastic Processes and Modeling (MATH 6660)

Assignment 1
Gourav Saha (RIN: 661539866)

PLEASE NOTE: I was attending a conference from 29th September to 2nd October. Hence I could
not submit the assignment on 2nd October. I was given time till 5th October (Midnight) to submit
the assignment. Please accept the submission.
1

The Dreams of the Nineties are Alive...

(a) We would like to rst discuss two subtle but important observations:
1.

Aimee Mann is working on one camera. After that there are

come. Hence our camera is the

2.

(k + 2)

th

more cameras to be xed. Then our turn will

camera of Aimee Mann.

Aimee Mann is still not nished working on the camera she is now reparing. The time required by Aimee

Mann to complete a job can be modelled as an IID exponential distribution. We know that exponential distribution
is

memoryless.

Hence we can equivalently assume that she just started reparing the camera.

The time t between two successive completion of job (reparing of camera) is an exponential distribution with mean

Mathematically,

time

t exp ( ).

Hence, given a time

t,

the number of jobs

N (t)

completed (cameras repaired) till

can be modelled as Posisson Distribution. Mathematically,


t n

We are interested in time


to

p.

to

such that


exp t
P [N (t) = n] =
n!
the probability of completing (k + 2)

(1)
jobs or more is greater than or equal

Mathematically,

P [N (to ) = n]

P [N (to ) = n]

n=k+2

k+1
X
n=0

f (to ) = 1

k+1
X


to n

n=0

exp to
n!

(2)

to which satises Inequality 2 is the optimal waiting time. As f (to ) is a strictly monotonically
increasing function of to , the optimal waiting time to is the solution to the following equation

The least time

k+1
X


to n

n=0

exp to
n!

Please note that equation 3 is a transcendental equation in

f (to )

is a strictly monotonically increasing function of

technique starting with lower bound of

to = 0

to ,

to


=p

(3)

and hence we can only solve it numerically.

and upper bound

1 of t
o

= 10 (k + 2) .

We designed such a solver in

MATLAB. The code of the solver is included in Appendix A.

1 We

choose the initial upper bound as

to = 10 (k + 2)

where

(k + 2)

As

a good way to solve 3 will be to use a binary search like

is the average time to complete

k+2

jobs.

11
10.5
10
9.5
9
8.5

t (in hours)

8
7.5
7
6.5
6
5.5
5
4.5
4
3.5
3
0

Figure 1: Plot of

vs

to

(b) For = 1 hour, p = 0.9, k = 0, 1, 2, 3, 4, 5 we have evaluated the value of to using our solver.

Plot of

vs

to

is

shown below:
The plot shows that

to

is monotonically increasing with

which is expected because more the job in queue, the

longer is the optimal return time.

(c) The question has four parts:


If you follow this strategy, what is the probability that the repair on your camera will be done when you return?
For this question we basically want to evaluate

P [N (to ) = n] = 1

n=0

n=k+2
where

k+1
X


to n

exp to
n!

k = 0, = 1 hour, to = 90 min = 1.5 hour. So we have the required probability as


1
X
1.5n exp (1.5)
1
= 1 (exp (1.5) + 1.5 exp (1.5)) = 1 2.5 exp (1.5) 0.44
n!
n=0

What is the probability that Aimee hasn't even started working on your camera when you return?
When

k=0

our camera is the

2nd

job of Amiee Mann. Probability that she has not started working of our camera

is equal to the probability that she has not even nished the

1st

job. In other words we are interested in

P [N (1.5) = 0] = exp (1.5) 0.22

How long would you have waited before returning according to your optimal strategy worked out above?
This is the value of

to

which we calculated in

Part (b) of this problem for k

= 0.

The optimal waiting time is

3.89 hours.
How much better is your strategy than your companion's simply reasoned strategy?
While my companion's strategy yields a probability if

0.44,

my strategy yields a probability of

0.9.

So as far as

probability of camera getting repaired is concerned, my strategy is twice as good as my companion's. Ocourse for
my strategy there is a higher waiting time.

1.55
1.5
1.45

The Ratio

1.4
1.35
1.3
1.25
1.2
1.15
1.1
0

10

20

30

40

50

60

70

80

90

100

k
Figure 2: Plot of

to
(k+2) .

vs the ratio

(d) This question has three parts:


For your particular

value, describe the behavior of the ratio of your planned time to return to the expected (av-

erage) time for completion of repair on your camera as the number


The expected time to nish

k+2

of cameras waiting to be repaired becomes large.

(k + 2) . So we anaylze the behaviour of the large values of k on the


to
(k+2) . To evaluate to for dierent values of k we use the solver that we

jobs is

to
(k+2) by plotting the graphs
designed.
ratio

vs

Describe more generally how this ratio behaves for a general xed value of
We are interested in solving equation 3 for large values of

k.

as


to n

At this point we use the Stirling's Approximation, i.e. for large

ln (n!) n ln (n) n

becomes large.

We have





to n
X
exp to
exp to

=
1
n!
n!
n=0
n=k+2






to k+2
to k+3
to k+4
exp to
exp to
exp to

+
+
+
(k + 2)!
(k + 3)!
(k + 4)!
"
#
k+2 k+2
k+3 k+3
k+4 k+4
(k + 2)
x
(k + 2)
x
(k + 2)
x
exp ( (k + 2) x)
+
+
+
(k + 2)!
(k + 3)!
(k + 4)!
k+1
X

p
p

where x =

to
(4)
(k + 2)

we have

n! nn en

Using this approximation in Equation 4 yields

"

exp ( (k + 2) x)

xk+2
e(k+2)

We now use the fact that

k+2

xk+2

(k + 2)

k+3

xk+3

(k + 2)

k+4

xk+4

+
+
+
(k+2) (k+2)
(k+3) (k+3)
(k+4) (k+4)
(k + 2)
e
(k + 3)
e
(k + 4)
e
#

k+2

k+3

k+4
0
xk+3
1
xk+4
2
1
+ (k+3) 1
+ (k+4) 1
+
k+2
k+3
k+4
e
e

exp ( (k + 2) x)
"

(k + 2)

lim 1


a n
n

= ea

in equation 5. This gives

(5)
p

xk+2


exp ( (k + 2) x)

For large values of

k,

1
k+2

xk+3

e1 +
(k+3)

0 < x < 1,

and hence

p k+2 1.

=1

p k+2

1
 k+2

=1

(6)

then using Geometric Progression, we can simplify equation 6 as

For large values of

xe

So we are interested in solving the equation

xe1x

1x

e2 +
(k+4)

e(k+2)
e
e

exp ( (k + 2) x) k+2
x
1 + x + x2 +
exp ( (k + 2))
 1
xe1x 1 + x + x2 + k+2

xe1x 1 + x + x2 +
If

xk+4

is

x = 1.

we have

1
1x

1
 k+2

1
1x

1
 k+2

=1

an hence equation 7 reduces to

(7)

xe1x = 1.

The only solution to

2
is the only solution . Now observe that the LHS of

0 < x < 1, x = 1
x. Hence for x > 1, LHS will always be greater than 1. Hence
conclude that as k becomes large, x tends to 1. In other words, the optimal time

Hence in the range

equation 6 is a monotonically increasing function of

x = 1 is the only solution.


to becomes almost equal to

So we

the expected time.

Interpret your ndings, connecting them to any mathematical principles of which you may be aware.
This is basically the Law of Large Number, i.e. the average time to complete a job obtained over a sample space
will tends towards the expected time as the sample space becomes large.

Leaving the Line

Case 1 (Model based on epochs which are regularly spaced intervals of time):
We assume that the queue has a nite length of
space is

S = {0, 1, 2, . . . , M }.

M.

Let the current length ln of the queue be the state. The states

We will use Probability Transition Matrix to model this Markov Chain. The key

statistical parameters required to model this markov chain are:

1.

Probability Distribution of Arrival:

Denitely

j=0
queue size.

2.

pA
j = 1.

 A
pj j=0

where

pA
j

is the probability that

request will arrive to get served.

Please Note: Some of these arrived jobs may decide to leave the queue depending on the

Probability Distribution of Leaving:

 L
pr (l) r=0

pL
r (l) is the probability that r arrived request will decide

P
L
pL
r (l) = 1 ; l. Also pr (l) is a monotonically increasing

where

to leave the queue when the queue length is l. Denitely

r=0
function of l.

3.

pD
i (l)

D
where pi (l) is the probability that i request will depart from
i=0
the queue (after job completion). Please Note: If the current queue length is l then the number of jobs which can
D
depart can not be greater than l. This also suggest that the probability distribution pi is indeed a function of l.
l
P
D
Denitely
pD
i (l) = 1 ; l. It is easy to verify that p0 (0) = 1.
i=0

Probability Distribution of Departure:

Given the Probability Distribution of Arrival and Leaving we can create the Probability Distribution of jobs joining
the queue. We have

pJk

 


X
k L
jk
A j
L
(l) =
pj
1 pjk (l)
pjk (l)
k
j=k

2 Though x = 1

is outside the range

0 < x < 1,

what we want to say is

is almost equal to

1.

(8)

pJk (l) is the probability that k jobs will join the queue. To derive equation 8 what we are basically considering
A
is that j job arrives (which has a probability of pj ), out of which j k jobs decide the leave the queue and k jobs

k 
jk

j
1 pL
pL
decide to wait (which has a probability of
). We then sum this probability over all
jk (l)
jk (l)
k
possible values of j .
where

In the following discussion we will nd the transition probability from queue length

M 1, i.e.
that k jobs

ln

to

ln+1

where

0 ln+1

we will consider all possible columns of the probability transition matrix except the last one. Lets say
decides to join the queue and

jobs departs from the queue. All possible values of

and

which will

support transition from queue length ln to ln+1 is governed by the following equation,

k i = ln+1 ln ; i {0, 1, . . . , ln } ; k 0
Therefore for

0 ln+1 M 1,

(9)

the probability to transition from ln to ln+1 is given by

p (ln , ln+1 ) =

J
pD
i (ln ) pk (ln )

(10)

ki=ln+1 ln ; i{0,1,...,ln } ; k0
For ln+1

ln ,

equation 10 simplies to

ln+1

J
pD
k+ln ln+1 (ln ) pk (ln )

(11)

ln
X
J
p (ln , ln+1 ) =
pD
i (ln ) pi+ln+1 ln (ln )

(12)

p (ln , ln+1 ) =

k=0
For ln+1

> ln ,

equation 10 simplies to

i=0
Now we consider transition from

ln

to

ln+1

where

probability transition matrix should sum upto

1.

ln+1 = M ,

i.e.

the last column.

We know that all rows of a

Using this property we can get the last column of the probability

transition matrix as

p (ln , M ) = 1

M
1
X

p (ln , i)

(13)

i=0

Please Note: We will not draw the probability transition matrix as it will look very complicated. The entire probability transition matrix is completely characterised by equation 11, 12 and 13.

Case 2 (Model based on epochs dened as the moments when a service request is completed):
Here the state space is

S = {0, 1, 2, . . . , M 1}.

The queue length

ln

which is not possible as the maximum queue length is

M . This is because
= M then ln+1 = M + 1

can never be equal to

here the epochs are based on the moments when service request is completed. Hence if ln

M.

The required statistical parameters are the Probability Distribution of Arrival and Probability Distribution of Leaving. We do not need the Probability Distribution of Departure because in this case, in every epoch, only one service
request is completed and hence departs. Probability Distribution of Arrival and Leaving is given in

Case - 1.

Using

the probability distribution of arrival and leaving, we can get the probability distribution of jobs joining the queue
using equation 8.
As before we will rst nd the transition probability from queue length ln to ln+1 where
that there is atleast one job in the queue, i.e.
in the next epoch. Then

ln 1.

In the next epoch,

0 ln+1 M 1. Consider
k job join the queue

job will depart. Let

should satisfy

k 1 = ln+1 ln ; k 0
In equation 14, there exist a solution for

k,

if and only is ln+1

ln 1.

(14)
Hence for

0 ln+1 M 1

and ln

1,

the probability to transition from ln to ln+1 is given by

(
0
; ln+1 < ln 1
p (ln , ln+1 ) =
J
pln+1 ln +1 (ln ) ; ln+1 ln 1
5

(15)

When ln

= 0,

then there is no job to depart in the next epoch. Let

job join the queue in the next epoch. Then

should satisfy

Hence for

0 ln+1 M 1

and ln

=0

k = ln+1 ; k 0

(16)

p (0, ln+1 ) = pJln+1 (ln )

(17)

we have

ln+1 = M ,

The transition probability for the last column, i.e.

can be obtained using equation 13. The probability

transition matrix is shown below

pJ0 (0) pJ1 (0)

2
3

pJ3 (0)

pJ2 (1)

pJ0 (2)

pJ2 (0)

pJ0 (1) pJ1 (1)

pJ3 (1)

pJ1 (2)

.
.
.

.
.
.

.
.
.

.
.
.

M 1

M 1

M
2
P

i=0
M
2
P

i=0
M
3
P

i=0
M
4
P

i=0
.
.
.
pJ0 (M

pJ2 (2)

pJ0 (3)

pJ1 (3)

.
.
.

..

pJ0 (M 1)

pJi (0)
pJi (1)
pJi (2)
pJi (3)

1)

What Disease is in Your Network?

In this question we will be dealing a lot with binary variables and binary operations.
the binary variable

x.

We will use

and

means the complement of

to denote the Binary AND and Binary OR respectively.

The recovery process of an individual can follow two models as follows:

1. Optimistic Recovery Model:

In this model a recovery, if an infected individual recovers in the

then he/she cannot get infected again in the

2. Pessimistic Recovery Model:

th

then he/she may get infected again in the

day,

k th

day,

day.

In this model a recovery, if an infected individual recovers in the

th

k th

day.

Please Note: In this entire question we will consider the Optimistic Recovery Model.

(a) For this part of the questions we would like to consider the Dynamic Meeting Model, i.e.
r

Every day, each pair of the three people has a probability

of interacting that day, independently of how they have

interacted in the past.


As we mentioned before we will consider the Optimistic Recovery Model. For such a model, everyday dynamics
consist of four mutually exclusive possibilities:
not recover.

3.

1.

An infected individual recovers.

An non-infected individual gets infected.

Let the state of the system be denoted by


individual is infected in the

th

day and


X = x1n

4.

x2n

2.

An infected individual does

An non-infected individual does not get infected.

x3n

where

xin

is a boolean variable which is

if the

ith

if he/she is not. The noise acting of the system consist of three random

variables:

1.

Rni

2.

Mnij

which is

which is

if the

if the

ith
ith

individual recovers in the


and the

j th

Inij

with

1 if
probability p.
which is

the

ith

day and

individual meet in the

r. Please Note: The random variables Mnij

3.

nth

nth

otherwise.

day and

Rni = 1

otherwise. .

Mnji .

individual gets infected by the

j th

with probability

individual in the

nth

Mnij = 1

day and

q.

with probability

otherwise. .

Inij = 1

Under this formulation we can have the following Stochastic Update Rule :

x1n+1

(
J
J L
J
J
Mn12 In12 x2n Mn13 In13 x3n
=
Rn1

; x1n = 0
; x1n = 1

(18)

1st individual is not infected in the nth day, i.e. x1n = 0.


J 12 J 2
12
st
nd
Then Mn
In
xn captures
of the 1
individual getting infected by the 2
J 13 the
J process
J 12 J 2
J 13 J 3 individual. Similar
13
3
1
12
13
explanation holds for Mn
In
xn . xn+1 = 1 if Mn
In
xn = 1 OR Mn
In
xn = 1. Next consider
st
th
1
1
st
the case where the 1
individual is infected in the n
day, i.e. xn = 1. xn+1 = 0 if the 1
individual recovers, i.e.
Rn1 = 1. x1n+1 = 1 if the 1st individual does not recover, i.e. Rn1 = 0. Using Sum of Products we can equivalently
write Equation 18 as follows
Equation 18 can be uderstood as follows. Say that the

x1n+1

Mn12

In12

x2n

Mn13

In13

x3n

K

x1n

Rn1

x1n

(19)

Mn21

In21

x1n

Mn23

In23

x3n

K

x2n

Rn2

x2n

(20)

Mn31

In31

x1n

Mn32

In32

x2n

K

x3n

Rn3

x3n

(21)

Similarly we can write

x2n+1
x3n+1

N individuals

X
=

For a generalized network with

xin+1

we can write the Stochastic Update Rule as

Mnij

Inij

xjn

xin

Rni

xin

(22)

j{1,2,...,N } ; j6=i

Please Note: In equation 22,

Ai = A1

A2

AN .

Stochastic Update Rule given by equation 22 will be used to simulate a large scale epidemic model in

Part (f) of

this question.

(b)

Dynamic Meeting Model

We are considering

for this part of the question.

Our strategy to answer this

question is as follows:

1.

We will consider our state as the number of infected people

We will nd the probability transition matrix

2.

4.

th

day and

Only one person is infected in the

n = 1 P n1 where n
st
the 1
day respectively.

Given

1st

xn

day. Hence,

one can calculate the average number


1 = 0

En

and

is the probability distribution of the number

of infected people in the

the nal formula to calculate the average number of infected people in the


En = 0

We will now nd


in the

ith

P.

S = {0, 1, 2, 3}.
xn to xn+1 infected people.

and hence the state space is

governing the transition probability from

By Chapman-Kolmogorov equation,

of infected people in the

3.

nth

nth

day as,


0
1

En = n
2.
3

day is


0
 n1 1

0 P
2
3

In this regard consider the following. Let the total number of individuals be

day there are

The probability that

infected individuals and

individuals out of the

(N y)

(N y)

(23)

N.

Consider that

non-infected individuals.

non-infected individuals will get infected by the

individuals is given by

Hence

infected

pI (y, k) =



N y
y k
y N yk
(1 (1 rp) ) ((1 rp) )
k

(24)

k {0, 1, 2, . . . , N y}. Equation 24 is the direct consequence of the binomial distribution.


y
(1 rp) is the probability that an individual will not get infected by any one of the y infected individual. Hence
y
(1 (1 rp) ) is the probability that an individual will get infected by atleast one of the y infected individual.
In equation 24,

The probability that out of the

In equation 25,

m individuals will
 
y m
m
pR (y, m) =
q (1 q)
m

infected individuals,

recover is given by

(25)

k {0, 1, 2, . . . , y}.

Say that we want to transition from

xn

infected individual to

the non-infected individual gets infected while


which will support transition from

xn

to

xn+1

xn+1

of

is governed by the following equation,

k m = xn+1 xn ; k {0, 1, . . . , N y} ; m {0, 1, . . . , y}


Therefore the probability to transition from

and

infected individual. During this transition,

of the infected individual recover. All possible values of

xn

p (xn , xn+1 ) =

to

xn+1 is
X

(26)

given by

pI (y, k) pR (y, m)

(27)

km=xn+1 xn ; k{0,1,...,N y} ; m{0,1,...,y}


To formulate equation 24, 25, 26 and 27 we took help from the following URL (PAGE: 2):

http://www.math.umd.edu/~mariakc/teaching/hw4.pdf
However our calculation is more involved given that we also have to handle the meeting dynamics. Let

s = rp.

Then using equation 27 we can get the following probability transition matrix.

(1 s)2 q

P =

2
(1 s) q 2

0
2

(1 s) (1 q)
+2s (1 s) q
2
2 (1
 s) q (1 q)
2

+ 1 (1 s)

q2

0
2s (1 s) (1 q)
+s2 q
2
2
 (1 s) (1
 q)
2

+2 1 (1 s)

q (1 q)

3q (1 q)

s2 (1 q)



2
2
1 (1 s) (1 q)

(28)

3q (1 q)

(1 q)
nth day,
s = rp which

En (r, p, q).

We can use equation 23 and 28 to calculate average infected individual in the

ie.

r and p
En (r, p, q) is

eects the average. Hence

that

does not individually eect the average. It is the product


equivalent to

Please note

En (s, q). Rather than calculating En (s, q) for individual values of s and q we rather
En (s, q) for dierent n. We wrote a MATLAB code for the same which is included

considered plotting the graph of

in Appendix B. The plots are shown below.

Figure 3: Plot of

Logically speaking, we thought that for all


decrease with

q.

En (s, q)

n, En (s, q)

for dierent values of

n.

should monotonically increase with

and monotonically

However such a behaviour is not observed.

(c) For this part of the questions we would like to consider the Static Meeting Model, i.e.
For each pair of the three people in question, that pair has a probability

of being an interacting pair, meaning

they interact with each other every day.


In this question the Interacting Pair gets decided in Day 1, i.e.

n=1

and this remains same throughout the entire

experiment. Other pairs do not meet. Hence this model is almost same as the model proposed in
for the fact that the random variable
at

n = 1.

Again note that,

Mnij

M ij = M ji .

is no more changing with

n.

We have

Mnij = M ij

where

Part (a) except

M ij

gets decided

So the Markov Model is

x1n+1

M 12

In12

x2n

M 13

In13

x3n

K

x1n + Rn1

x1n

x2n+1

M 21

In21

x1n

M 23

In23

x3n

K

x2n + Rn2

x2n

x3n+1

M 31

In31

x1n

M 32

In32

x2n

K

x3n + Rn3

x3n

A more generalized version of the above Stochastic Update Rule can be written as

xin+1 =

M ij

Inij

xjn

xin

Rni

xin

(29)

j{1,2,...,N } ; j6=i
We will use this model for our simulation however, strictly speaking, this is not exactly a Markov Model. This point
will be discussed in

(d)

Part (d).

The Markov Chain Model proposed in

stochastic update rule of

Part (c)

Part (c)

is akward in the sense that, when closely examined, the

does not exactly t the denition of Markov Chain Model.

For a Markov

Xn+1 = f (Xn , Zn ) where Xn is the state and Zn is the noise/random


ij
variable. It is must that the random variables Zn are independent. In the model proposed in Part (c), M
is a
ij
noise. Rather than directly entering the variable M
in the stochastic update rule, we can as well write,
Chain model, the Stochastic Update Rule is

x2n+1

Mn21

In21

x1n

Mn23

In23

x3n+1

Mn31

In31

x1n

Mn32

In32

x1n+1

Mn12

In12

x2n

Mn13

In13

x3n

K

x1n + Rn1

x1n

x3n

K

x2n + Rn2

x2n

x2n

K

x3n + Rn3

x3n

where,

M1ij = M2ij = M3ij = Mnij = M ij i, j


In this way we see that the random variables
strictly speaking, the model proposed in

Mnij

are not independent. They are indeed strongly dependent. Hence

Part (c) is not a Markov Model.

For the model proposed in

Part (c) to be

Xn+1 = f (Xn , Zn , Y )
ij
make the variables M
a

a Markov Model, the denition of Stochastic Update Rule has to be made a little broad, i.e. is
where

is a constant random variable. Another way to deal with this scenario is if we

state of the system. In that case the Stochastic Update Rule will look like

x1n+1

Mn12

In12

x2n

Mn13

In13

x3n

K

x1n + Rn1

x1n

x2n+1

Mn12

In21

x1n

Mn23

In23

x3n

K

x2n + Rn2

x2n

x3n+1

Mn13

In31

x1n

Mn23

In32

x2n

K

x3n + Rn3

x3n

12
Mn+1

= Mn12

13
Mn+1

= Mn13

23
Mn+1

= Mn23

(f) We have performed the following simulations studies:


Study 1: Comparative Study to see the eect of parameters on Scenario 2 meeting model
p = 0.8, q = 0.5

We rst got the simulation result for

and

r = 0.6.

This is shown below:

Individual 1

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 2

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 3

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day

Figure 4: Disease propogation among individuals following Scenario 2 meeting model with parameters

q = 0.5

and

r = 0.6.

We then got the simulation result for

p = 0.5, q = 0.5

and

10

r = 0.5.

p = 0.8,

Individual 1

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 2

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 3

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day

Figure 5: Disease propogation among individuals following Scenario 2 meeting model with parameters

q = 0.5

and

p = 0.5,

r = 0.5.

To compare both the simulation observe that the recovery probability remains the same while the probability of
getting infected

and probability of meeting

decreases. As probability of meeting and the probability of getting

infected decreases it is obvious that the number of infected people will reduce. This is exactly what we observe in
the above two graphs.

Study 2: Simulating Scenario 2 meeting model for large network


N = 15

This study was performed for the bonus points. We simulated Scenario 2 meeting model for
and

p = 0.8, q = 0.5

and

r = 0.6.

Individual 1

Individual 2

10

15

20

25

30

35

0
0

40

Day
Individual 4

10

15

20

25

30

35

40

Day
Individual 5

10

15

20

25

Day
Individual 7

30

35

40

10

15

20

25

Day
Individual 10

30

35

40

10

15

20

10

15

20

25

30

35

40

Day
Individual 13

10

15

20

25

30

35

40

Day

30

35

p = 0.8, q = 0.5

10

15

10

15

10

15

25

30

35

40

20

25

30

35

40

20

25

30

35

40

Day
Individual 9

0
0

10

15

20

25

30

35

40

Day
Individual 11

Day
Individual 12

0
0

10

15

20

25

30

35

40

10

15

10

15

Day
Individual 14
1

20

25

30

35

40

20

25

30

35

40

Day
Individual 15

0
0

10

15

20

25

30

35

40

Day

Day

and

20

Day
Individual 6

Figure 6: Disease propogation among individuals on a large network (N


with parameters

40

25

Day
Individual 8

0
0

0
1

0
0

Individual 3

0
0

individuals

The graph is shown below

= 15)

following Scenario 2 meeting model

r = 0.6.

Study 3: Comparative Study to see the eect of parameters on Scenario 1 meeting model
We rst got the simulation result for

p = 0.8, q = 0.5

and

r = 0.6.

11

This is shown below:

Individual 1

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 2

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 3

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day

Figure 7: Disease propogation among individuals following Scenario 1 meeting model with parameters

q = 0.5

and

p = 0.8,

r = 0.6.

We then got the simulation result for

p = 0.5, q = 0.5

and

r = 0.5.

Individual 1

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 2

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day
Individual 3

0
1

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Day

Figure 8: Disease propogation among individuals following Scenario 1 meeting model with parameters

q = 0.5

and

p = 0.5,

r = 0.5.

To compare both the simulation observe that the recovery probability remains the same while the probability of
getting infected

and probability of being a interacting pair

decreases. So both interaction and the probability

of getting infected decreases. Therefore it is obvious that the number of infected people will reduce. This is exactly
what we observe in the above two graphs.

Study 4: Simulating Scenario 1 meeting model for large network


This study was performed for the bonus points. We simulated Scenario 1 meeting model for
and

p = 0.8, q = 0.5

and

r = 0.6.

The graph is shown below

12

N = 15

individuals

Individual 1

Individual 2

0
0

10

15

20

25

30

35

40

Day
Individual 4

10

15

20

10

15

20

Day
Individual 7

25

30

35

25

30

35

40

10

15

20

Day

25

30

35

40

25

30

35

40

30

35

40

30

35

40

30

35

40

Individual 6

40

Day
Individual 5

Individual 3

10

15

20

25

30

35

40

Day
Individual 8

10

15

20

Day
Individual 9

0
0

10

15

20

25

30

35

40

Day

10

15

20

25

30

35

40

Day
Individual 11

Individual 10
1

10

15

20

Day

25

30

35

40

10

15

20

25

30

35

10

15

20

25

30

35

40

10

15

20

25

Day

30

35

Figure 9: Disease propogation among individuals on a large network (N


and

10

15

20

25

Individual 15

0
0

p = 0.8, q = 0.5

Day

with parameters

25

Day

0
5

20

Day
Individual 12

40

Day
Individual 14

15

Individual 13

10

0
0

40

10

15

20

25

Day

= 15)

following Scenario 1 meeting model

r = 0.6.

(g) Let En (r, p, q) be the expected mean of the non-immunity based model and EnI (r, p, q) represent the expected
mean of the immunity based model. Then we make the follwoing remarks:

1.

En (r, p, q) EnI (r, p, q) 0.

This basically means that for any day

n,

we have the expected mean of the

immunity model lesser than expected mean of the non-immunity model. This is obvious because in the immunity
based model more and more people will get immuned to the disease and hence will not get infected thereby reducing
the average mean.

2.

The dierence

En (r, p, q) EnI (r, p, q)

will increase with

n.

This is because as days pass by more people get

immuned.

3.

En (r, p, q) EnI (r, p, q) with respect to n will increase with increase in q .

The rate of increase of

with increase in

q,

will be faster and hence it will show up in the dierence

4.

This is because

the individuals will have higher chance to get immuned. In other words the rate of immunity

En (r, p, q) EnI (r, p, q).

En (r, p, q) EnI (r, p, q) with respect to n will increase with increase in p and r. This is
because with increase in p and r , more people will get infected. However this larger volume of infected people will
I
get immuned an hence reduce the average mean En (r, p, q) faster.
The rate of increase of

We also designed the Stochastic Update Rule when immunity is taken into account. Without immunity the stochastic
update rule is

x1n+1

Mn12

In12

x2n

Mn13

In13

x3n

K

x1n + Rn1

x1n

x2n+1

Mn21

In21

x1n

Mn23

In23

x3n

K

x2n + Rn2

x2n

x2n

K

x3n + Rn3

x3n

x3n+1

Mn31

In31

x1n

Mn32

In32

To consider immunity we have to introduce one more state per individual which tells if that individual has immunity
or not at a given epoch.
generalize. Let

th

In1

We will consider formulating the immunity based model for one individual and then

denote the immunity status of

1
day. Otherwise In

1st

individual.

In1 = 1

if the

1st

individual has immunity in the

0. Then the stochastic update rule for In1 is


1
In+1
= In1

M

13

x1n

Rn1

(30)

which basically states that the individual will have immunity in the next day if it already has immunity today OR
it infected today AND recovers today. The update rule for

x1n+1

x1n

will modify as


K
K M
K
K K
K K
= Mn12
In12
x2n
Mn13
In13
x3n
x1n + Rn1
x1n
In1

which states that the individual can get infected only of it does not have immunity. Therefore a more generalized
model is

xin+1

Mnij

Inij

j{1,2,...,N } ; j6=i
i
In+1

Ini

M

xin

Rni

; i

14

xjn

xin

Rni

xin

Ini

; i

Vous aimerez peut-être aussi