Open In App

How Coronavirus outbreak can end | Visualize using Data structures

Improve
Improve
Like Article
Like
Save
Share
Report

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 in the reference of COVID-19

The present outbreak of a corona-virus 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 to four other people. 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 organizations 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 by having the node point to a null reference, meaning it is the ultimate node in the linked list. 

One way to “solve” the corona-virus 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. Trees, Graphs & Linked Lists aren’t only used in FAANG interviews, but are actually very useful in modelling and solving real-world phenomenon.

Therefore, Stay Safe and Stay inside to break the chain of Corona-virus.
 


Last Updated : 18 Apr, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads