Real world application of DSA to model and monitor corona-virus.
Tags: Covid 19, Algorithms, Trees, Data Structures, Coronavirus

Real world application of DSA to model and monitor corona-virus. Jyotsna Follow Apr 22 · 3 min read

I am sure every beginner computer science student would have once wondered why do we find shortest path in graph or what is the use of trees, are we going to play josephus circle using circular linked list?

So, this article talks about the importance of data structures and algorithms in real world, with the reference of COVID-19.

The present outbreak of a coronavirus- acute respiratory disease called COVID-19 has resulted in a major epidemic. The main reason why coronavirus is a major problem is because it’s spread can be modelled by a tree.

Before the world took lockdown measures, estimates stated that each infected person was infecting between two and four other people.

In the study of infectious disease, this number is called R0 (R-naught), a mathematical denotation that indicates how contagious an infectious disease is. For instance, if a disease has an R0 of 15, a person who has the disease will transmit it to an average of 15 other people.

Three possibilities exist for the transmission or decline of a disease, depending on its R0 value:

· If R0 is less than 1, each existing infection causes less than one new infection. In this case, the disease will eventually die out.

· If R0 equals 1, each existing infection causes one new infection. The disease will stay alive and stable, but there won’t be an outbreak.

· If R0 is more than 1, each existing infection causes more than one new infection. The disease will be transmitted, and there may be an outbreak or epidemic.

Importantly, a disease’s R0 value only applies when everyone in a population is completely vulnerable to the disease, as in the case of COVID-19 where no one has been vaccinated, no one has had the disease before and there’s no way to control the spread of the disease.

In our model — R0 is the average number of children each node in the tree has. This means — each node in our tree has (on average) between two and four children.

If you’ve studied trees to any depth, you know this is going to get very large, very quickly.

The early objective of health organisations worldwide was to reduce R0 to around one (or less). If R0= 1, then each leaf node in our tree now becomes the head of a linked list. Each person is infecting exactly one other person, in the same way that a (singly) linked list has a reference to the next node in the list.

If R0< 1, then at some point a person will infect no-one else, and the line of infection (for that leaf) is broken. We can model that in code but having the node point to a null reference, meaning it is the ultimate node in the linked list.

One way to “solve” the coronavirus situation is to change the behaviour of the virus so it can be modelled by a collection of (eventually finite) linked lists, rather than a tree.

Well, I am no medical expert. I am here just to make you realise that Trees, Graphs & Linked Lists aren’t only used in FAANG interviews, but are actually very useful in modelling and solving real world phenomena.