Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Math 232 – Computing Assignment 3

Due Date: March 24th, at 11:00pm.

You must upload to Crowdmark both your code (as a .pdf file) (to Code - Computing Assignment 3) and your report (to Report - Computing Assignment 3).  The assignment is due at 11:00 pm. If Crowdmark indicates that you submitted late, you will be given 0 on the assignment.  Your computing report must be exactly 1 page.  There will be a penalty given if your report is longer than one page.

• Please read the Guidelines for Computing Assignments in Canvas first.

• Keep in mind that Canvas discussions are open forums.

• Acknowledge any collaborations and assistance from colleagues/TAs/instructor.

Programming Preamble:

Matlab: You need to be able to enter column vectors and matrices.

Matlab: You need to be able to multiply a matrix by a vector.

Matlab: You need to be able to draw lines on the same figure.

Matlab: help  plot gives you all the information you need to make your plots look good - labelling the axes, putting on a title etc.

Matlab:  You could use a for loop (see Matlab documentation) to repeatedly multiply your day 1 vector by your transition matrix for a specified number of times and adjust the number of times you do the multiplication until you get good results.

Matlab: You could use a while loop (see Matlab documentation) to continue to multiply your day 1 vector by your transition matrix until your output vector contains numbers that indicate that the epidemic has concluded.

Computing Assignment

Required submission:  1 page PDF report and Matlab or Python code  (.m or  .py respectively, exported as a .pdf) uploaded to Canvas.

Epidemic Dynamics

This assignment is designed to show you a basic and common model (discrete SEIR) used to model an epidemic - a very timely topic! Please read pages 168 and 169 of the secondary textbook (Boyd and Vandenberghe, available as a .pdf from Canvas).

1. Assume the following day 1 distribution in the population: 85% of the population is suscep- tible to infection, 10% of the population is infected, 4% of the population is immune, and 1% of the population is dead.

2.  Then assume the following disease progression. Each day the following will happen:

• 4% of the susceptible population will acquire the disease.

• 2% of the infected population will die of the disease.

•  15% of the infected population will recover AND acquire immunity.

• 3% of the infected population will recover AND NOT acquire immunity.

• 80% of the infected population will remain infected.

3.  Plot the disease progression in the population for a long enough time (so you can see what the long term asymptotic solution looks like).  After how many days (approximately) are there nearly no infected individuals?  On this day, what percentage of the population is recovered and what percentage is dead?.  Produce a graph like the one on page 169 to include in your report and justify your conclusions. Also include in your report the matrix that you used in these calculations.

4. Next, leave the day  1 distribution in the population the same as in item  1.   And do the following two things:  1) First adjust the numbers in item 2 (you will have to play around a bit) so that the epidemic is basically over in 100 days.  Report your numbers and provide the accompanying graph and 2) Adjust the numbers in item 2 so that the epidemic lasts for approximately 300 days. And again report your numbers and provide the accompanying graph.

While adjusting your numbers to change the length of the epidemic notice which changes really shorten an epidemic and which number cause it to substantially lengthen. Comment on what you observe.