WOLFRAM

Tackling a Pandemic: A Computer-Based Maths Approach

How did the Department of Health and Social Care (DHSC) come up with their multi-phase response to tackle COVID-19? In this post, I investigate how the UK government’s original plan against the coronavirus aligns with the four-step computational thinking process. Teachers are welcome to use this post as a free resource.

Please note: where possible, I have taken data from before the DHSC’s plan was published.

The Computational Thinking Process

What is the computational thinking process? Simply put, it is a sequence of four steps that you can take in order to solve a problem. The aim is not just to obtain a solution, but to ensure that the right choices were made, the right tools were used and the right outcomes were achieved along the way. The steps are as follows: you define explicitly the problem you wish to solve, abstract it to a computational form, compute an answer, then interpret the result:


Four steps to computational thinking—click to enlarge

If, upon interpretation, the result does not meet your initial requirements, you then repeat the process—climbing the solution helix—until you are satisfied with the result:

Computational thinking process

The Plan

In early March, the DHSC published a coronavirus action plan (“A Guide to What You Can Expect across the UK”). The plan has three main phases: contain, delay and mitigate, with each new phase superseding the last. There is also a background project ongoing. At the time of writing this post, the UK has progressed to the delay phase.

Phase I: Contain

Problem: how can we prevent the infection from spreading?

Defining the Problem

The first phase makes the assumptions that cases are few and scattered (as indeed they were at the time) and that transmissions must be made through close contact (i.e. minimal airborne transmission). It also assumes that the virus has an incubation period of up to two weeks.

Abstracting to a Computational Form

Once an infected person has been identified, the spread of infection can be monitored by means of contact tracing (finding out whom the person has been in contact with and, if necessary, isolating them). This can be modelled with a transmission model.

Computing an Answer

Here’s an example of a stochastic transmission model:

Interpreting the Result

This model suggests that contact tracing and isolation are enough to contain a new outbreak, but that the likelihood of succeeding decreases if new cases aren’t detected and isolated quickly. This matches what the DHSC recommends:

  • Detect and isolate cases as they emerge
  • Repatriate British nationals and their dependants from affected areas overseas (and isolate, if infected)
  • Enforce health measures at ports; ask for declaration from incoming planes or vessels that all passengers are well
  • Give medical professionals and police the power to detain and direct individuals at risk
  • Inform all medical professionals of the steps they should take if they identify an infected patient
  • Inform the public of the steps they should take if they suspect they have become infected (wash hands, cough into elbow, etc.)
  • Strategically stockpile medicines and protective equipment

If outbreaks aren’t contained and the basic reproduction number (the average number of people infected by a typical individual with the infection) is sufficiently high, widespread infection may be unavoidable. This brings us to phase two: delay.

Phase II: Delay

Problems: How can we reduce pressure on the NHS? How can we delay the peak of infections?

Defining the Problem

The second phase assumes that isolating infected individuals hasn’t worked; the spread of the virus is inevitable. With infections set to rise, hospitals are going to see a far higher intake of patients with respiratory problems. If this occurs during the winter months—where such problems are already more common—it could overrun the system. Finding a vaccine is critical if the burden on the system is to be relieved entirely.

Abstracting to a Computational Form

Modelling how the virus spreads is now critical. With little hard data to go on, it makes sense to look at how similar viruses such as seasonal influenza or SARS have been modelled in the past. Typical models include:

(Please note: model types are not mutually exclusive.)

Computing an Answer

Here are a few examples from Wolfram Community:

Here’s an excellent analysis of epidemics with SIR models from 3Blue1Brown:

Interpreting the Result

Together, these models suggest that isolation strategies can reduce the peak infection rate—or “flatten the curve”—and that many small meetings are better than a few large ones. This matches what the DHSC recommends:

  • Continue detecting and isolating cases as they emerge
  • Enforce social distancing (close public places, encourage working from home, cancel large gatherings, advise against all but essential travel)
  • Increase publicity of advice to individuals about protecting themselves and others

Many businesses depend on customer travel (e.g. the tourism industry) or have procedures that cannot be carried out from home (e.g. retail, dining). With social distancing enforced, a prolonged pandemic could lead to a significant proportion of the population being unemployed. This brings us to phase three: mitigation.

Phase III: Mitigate

Problems: How can we save as many lives as possible? How can we ensure the country keeps running?

Defining the Problem

The third phase assumes that the virus is now widely established, or is continuing for longer than initially anticipated. The government must now decide on their priorities for the health of the country, both medically and economically.

Hospitals, for example, must work out how they can use their resources strategically to minimise the number of casualties. HM Revenue and Customs (HMRC) must decide how to tackle wide-scale unemployment.

Being up to date with the latest data is now essential: How do age and health correlate with susceptibility to the virus or its severity? Who is most at risk? Which industries will be most affected by unemployment? Which areas of the country?

Abstracting to a Computational Form

Optimisation methods such as linear programming can be used to help assign medical equipment to the right places. Existing income schemes can be modified to work on a wider scale.

Computing an Answer

Here are some data visualisations comparing age and income with fatalities:

Here’s an example supply strategy by the US Department of Health and Human Services:

Interpreting the Result

These studies suggest that fatalities increase with age and low median household income, implying that medical care should be concentrated on the elderly, and that a temporary income scheme may be needed. This matches what the DHSC recommends:

  • Delay non-urgent care; direct emergency services to concentrate on most urgent cases only
  • Support businesses facing short-term cash flow issues
  • Support early discharge from hospitals; encourage home care
  • Further increase publicity of advice to individuals about protecting themselves and others
  • Draw on existing stockpiles of medicines, medical devices and clinical consumables, and employ a distribution strategy
  • Call medical leavers and retirees back to duty
  • Reduce focus on wide-scale measures (such as intensive contact tracing)

Concluding Remarks

This post has demonstrated how the DHSC’s plan aligns with the computational thinking process. Most important of all, it has shown how getting the right assumptions before tackling a problem is essential to getting a meaningful answer. For more information about how the process can be applied at the industry, government, education or individual level, go to computationalthinking.org.

If you’d like to try out the process for yourself, a number of high-school problem-solving modules are available at this Wolfram Community page.

Comments

Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.