You are on page 1of 4

Project 2 (Total: 20 points)

Deadline: Wed 11:59 pm, 15 November 2023 (Week 13)

 Work in groups of 3. Submit your solutions as a single .ipynb file and upload it
to Canvas by the deadline. Note that only one member in each group needs to
submit it. Name the file as your matric number or name, but include all names
and matriculation numbers of your group members at the top of the Jupyter
document. Please ensure that the file is not corrupt before you upload.

 At the end of your solutions, please include a section that describes the contributions
from each group member. This would help me to allocate fairer marks to students
based on their contributions.

 To be fair to all students, late submissions will be penalized. 1 point will be deducted
for every two hours that the submission is late. You are therefore strongly advised
not to submit very close to the deadline as you risk being marked (by the system) as
late.

 Please do not plagiarise. There are serious consequences if caught. Read the NUS
Code Of Student Conduct.

1
Problem 1
Disease epidemics often contain asymptomatic individuals who infect others at a different
rate. We hence extend the SIR model to the so-called SIRC model, which consists of a
carrier (C) population, in addition to the usual susceptible (S), infected (I) and recovered
(R) populations. Here, (I) refers to symptomatic infected individuals, and carriers (C) are
defined as asymptomatic individuals who can nevertheless still infect others. However,
because they do not fall ill, they do not directly strain the healthcare system. The SIRC
model is defined by the following differential equations:
dS
D .ˇ C ı/SI .˛ C /SC
dt
dI
D ˛SC C ˇSI rI
dt
dC
D SC C ıSI rC
dt
dR
D rI C rC
dt
Here, ˛ controls the rate by which carriers (C ) infect susceptible (S ) individuals and make
them symptomatic (I ). ˇ controls the rate by which infected symptomatic individuals (I )
infect susceptible (S) individuals and make them symptomatic (I ). We have assumed that
both I and C have identical recovery rates r. The total population is normalized to one, i.e.
S C I C R C C D 1. For all simulations, assume the initial conditions that when t D 0,
I D 0:001 and C D R D 0.

(a) Draw the flowchart of this SIRC model, analogous to that of the SIR model from the
lecture notes. Create the flowchart image with any preferred software, but that im-
age has to be embedded within your .ipynb file (via the Insert command on Jupyter
Notebook).
[1 point]

(b) Whether the infected (I ) or carriers (C ) give rise to more symptomatic infections de-
pends on the nature of the disease and human behaviour. Describe a possible scenario
where ˇ > ˛, and another possible scenario where ˇ < ˛.
[2 points]

2
(c) The evolution of the epidemic depends strongly on the values of the parameters. By
experimenting with different sets of parameters and solving the differential equation,
find two sets of parameters ˛, ˇ, , ı and r such that the maximum of dI dt
is 0.050 and
0.450 respectively. For each case, plot the population fractions S , I , R, C against time
t on the same plot. Print out the maximum value of dI dt
to 4 decimal places.
[2 points]

(d) Find a combination of parameters such that the peak for C is 11 times higher than the
peak for I . Print out the ratio of the two peaks to 2 decimal places. Is that necessarily
good from a public health perspective?
[1.5 points]

(e) Is it true that at the beginning of an epidemic outbreak, the time taken for infections to
double is generally the shortest? Support your answer with reference to actual COVID-
19 data. Curve-fitting is not required.
[1.5 points]

Problem 2
Consider a closed curve given by the equation
p 2  p 2
3x C y x 3y
C D1
4 16
(a) Find the area enclosed by the curve via Monte Carlo method and print out the answer
to 4 decimal places. Solve the problem as it is without transforming the original equa-
tion. Discuss and explain the numerical approach used and identify possible errors that
might arise.
[4 points]

(b) In the above problem, the calculation is only for a 2D shape. What if you have a per-
fectly spherical 3D ball? Explain, without writing any code, how you would generalize
the above Monte Carlo estimation approach to find the volume of the spherical ball.
Do mention all additional functions and features needed.
[2 points]

3
Problem 3
(a) Modify the Python code for 1D random walk (which was previously uploaded to
Canvas) and reproduce the following figure for a random walk of 100 steps.
0.08

0.07

0.06

Propability of landing at n
0.05

0.04

0.03

0.02

0.01

0.00
40 20 0 20 40
Final position after 100 steps

(Taken from lecture note)


That is, find the probability of landing at n after 100 random steps. Determine
also the probability of landing at least 14 steps from the original starting position.
Express your answer to 4 decimal places.
[2 points]

(b) An old man is standing on a slope of a hill. He is bored and lonely and is looking
for someone to talk to. He can’t decide if he should go up the hill to a place where
Wu Kong (who has just made his way back from the West) lived, which is 5 steps
away from where he is standing, or go downhill to Ji Gong’s place, which is 15
steps away. He finally decided to do a random walk but, being old and weakly, he
is more inclined to walk downhill with a probability of 0.60. Note that he is doing
a random walk along a linear trail (up or down with equal length).
i. Using a random walk model, calculate the probability that he would end up at
Wu Kong place (up the hill). Express your answer to 4 decimal places.
ii. His journey ends when he reached either place. Calculate the expected length
of his journey in terms of the number of random walks taken. Express your
answer to 4 decimal places.
Briefly discuss and explain the numerical approaches used.
[4 points]
Note: Problem 3 is to be solved using random walk and Monte Carlo simulations
(and not done analytically).

You might also like