Contemplating recursion and why test and trace isn't working

Back in the day I was involved in a couple of projects that modelled the financial strength of local and national governments for a rating agency. We built a system that on the face of it looked like Excel but did a lot of other stuff in the background to produce a detailed assessment of each entity. The system used something called a recursive algorithm to calculate the formulas.

A recursive algorithm effectively calls itself over and over again to process data. So in the case of formula calculation it would find all the components of a formula, then look for the components of the components, then carry on down the tree until the final set of components that don’t have other components is reached.

recursive_tree.JPG

What exactly is a recursive algorithm ?

If you have a set of formulas

a=b+c, b=d+e, c=f+g, d=z-q

You need to create something that will crawl the tree and evaluate all the things you need to get the answer to. That's a recursive algorithm. It finds all the things related to A, then all the things related to the things related to A.... and so on until it runs out of related things.


shutterstock_1734128516.jpg

Why is test and trace like a recursive algorithm ?

The logic to test and trace is similar.

If Person A has lunch with 6 people; .

a=b+c+d+e+f+g

Those six people then have dinner with 6 other people. That’s 36 new people

b=h+i+j+k+l+m+n, c=o+p+q+r+s+t, d=u+v+w+x+y+z, etc ....

So two meals in you have 1+6+36 potential contacts. If they then all go out to breakfast; 1+6+36+216 …..and so on. You are finding the connected/related people in the same way that you would evaluate a formula.


This is obviously a slightly extreme example for a number of reasons;

  • b,c,d,e,f,g might go out to breakfast as well as lunch with Person A so there would potentially be fewer new connections.

  • Maybe a few of the original lunchtime dinners eat their cornflakes alone at home.

But the principle fundamentally remains the same. You work your way down the tree until you reach the connections that have no further connections.


How does this relate to test and trace ?

Yesterday in the UK (13th October 2020) there were 17,000 reported COVID-19 infections.

The image below from the UK Government DHSC website shows the process followed to reach the Contact Tracing stage. The tracing process is effectively the boxes in blue.

track_and_trace_process.JPG

So why are we suggesting contact tracing won’t work ?

Simple; The government doesn’t have enough tracing staff to track all the potential connections.

If those 17,000 infected people only had 6 contacts that would be a further 102,000 potentially infected people that needed to be traced.

If you allow a fairly stingy 15 minutes to contact each of those 102,000 people; that’s 1,530,000 minutes in total to contact that days potentially infected people.

Of course that assumes the people involved handed over their correct details. To the average individual there is very little incentive to be tracked by test and trace; being traced raises the possibility that they will have to spend a period in isolation; unable to go to work or socialise.

Assuming the average test and trace worker does 450 minutes work a day (not allowing for gossip, meetings, toilet breaks and so forth); meaning they can, with a following wind, track down 30 connections.

Remember they are tracking down connections not infected people. They don’t know who is infected until they get tested and that’s an altogether different stage in the process that we will talk about later.

So tracking down those 102,000 people is going to take the equivalent of 3,400 person days.

In June the UK Government aimed to recruit 25,000 contact tracers. That would give them the ability to trace 750,000 connections a day. However, skimming the Test and Trace job adverts on the internet would suggest that a significant proportion of the roles are home based and part-time; not really surprising in the current environment. Plus a significant proportion of those will be in management roles rather than solely there to track people down. Add to that weekends, sickness and holiday it seems reasonable to assume that 25,000 tracers equates to a capacity to trace significantly less that 25,000x30 connections a day.

Lets be generous and call it 13,000 full time equivalents which gives you the capacity to track down about 385,000 connections a day.


Rnumber.JPG

Going back to our recursive model assuming the arbitrary 6 connections; Realistically some people will have more than 6 some will have less than 6.

17, 000 => 102,000 connections

Only a proportion of those 102,000 people will actually have the virus; but ultimately their connections will also need to be traced. How do we estimate how many are likely to be infected ?

The R number that gets talked about gives an idea of how many of those 102,000 connections will actually get infected. The R number in the UK on the 9th October 2020 was in the range 1.2-1.5 which equates to a growth rate of between 4 and 9% a day. The image on the left is from the UK Government COVID-19 stats website.

Lets call that 7% which basically means that the 17,000 people will have infected roughly 18,190. The 18,190 will then go on to infect 19,463. etc…


What does this all mean ?

Carrying on with the rule of 6 and the 7% growth rate in terms of infected people;

Tomorrow : 18,190 => 109,140 potential connections

The day after tomorrow : 19,463 => 116,779 potential connections

As you can see with the image on the right if you put all this into Excel you can calculate the point at which the tracing service will be overwhelmed, unable to keep pace with the number of connections it needs to trace each day.

So somewhere around the 2nd November the test and trace service will reach capacity…..

That all of course assumes that the tracking process is capable of tracking down all the infections that occur on a given day. If it doesn’t do that the point at which it becomes overwhelmed arrives a lot sooner.

According to ITV News the tracking service has consistently only managed to reach 70-80% of each infected persons contacts since its inception.


As a footnote to this section.

Since I wrote the original piece its been pointed out to me that the NHS Tracing service has made a lot of the staff it originally recruited redundant; so there may only be about 10,000 staff now. If you apply the same logic as above that’s about 5,000 FTE’s. Which means that at this point they may only be able to trace about 150,000 connections a day.

https://www.dailymail.co.uk/news/article-8829397/NHS-axes-2-000-test-trace-jobs-Contact-tracers-cut-despite-coronavirus-infections-soaring.html


So what can you conclude from this ?

Tracking peoples movements clearly raises a lot of privacy issues.

In the West we naturally react negatively to the idea that our governments know where we are and who we are talking to. But that is essentially the process that is at the heart of any effective track and trace process.

The UK Government has created a track and trace system that doesn’t rely on technology; but uses people to bring various pieces of information together.

The Government has created a tracing system around an app and QR codes; but the guidelines actually suggest more location types are not required to display the QR code than are.

We have all added our contact details to a paper list when we have entered a venue not displaying a QR code. Collating paper records from venues to determine who was there when adds time to the process and reduces the number of contacts traced in a given day.

Remember, we talked about how many people the service can trace in a day above; its a finite number directly linked to the number of people the service employs.

I learned a number of things about recursive algorithms back in the day the main one being that the time it took to run a series of calculations was directly related to the power of the computer doing the maths and how complex each calculation was.

Test and Trace is the same; if you want to trace more people you need to either get a bigger computer or work out a way to shorten how long each element of the tracing process takes.

QR-code.jpg

Increasing the number of venues that are required to display the QR code would increase the number of connections that will be automatically connected, directly increasing the capacity of the tracing service. Not displaying the QR code should be the exception.

You could also improve the NHS App. Yes; we all have the NHS App installed on our phones but its clearly a bit of a compromise. Its not tracking our location so if you don’t sign in at a location it won’t know you have been there; and obviously if you have an old phone or a new phone with Bluetooth turned off to preserve the battery its not going to work at all.

You could create a system based around GPS locations and fences to identify who has been where when. Though that would be far from fool proof and still have adoption problems for people with older (or no) smart phone technology.


singapore_tag.jpg

A lot of reference is made to the tracing systems used in places like Singapore. Singapore has developed a bespoke tagging system that tracks the interactions between devices. If your tag comes into contact with another tag it records that fact. Th tags cost about 20 each. They don’t record location, just proximity. If you then test positive for COVID-19 the list of contacts can be downloaded and traced by the Singapore health authorities. Contacts older than 25 days are deleted from the device automatically.

Building a simple bespoke tag is potentially a lot cheaper than trying to use existing mobile devices to collect the contact information; many of which have features that actively block what you are trying to record..

Its an interesting question as to which has the most privacy issues.

But at least the people of Singapore can have a really big COVID-19 tracing tag smashing session when this is all over…..


Bill Stock/15th October 2020

Bill Stock