Project - simulating covid 19

Assignment Help Data Structure & Algorithms
Reference no: EM132521142

Project: Simulating Covid 19

To do this project, we need to learn some prerequisites first :-)

Priority Queues

This project involves you to do some "extracurricular" reading about priority queues. A priority queue is like a regular queue that we discussed in the class, except that there is a "priority" associated with each element. There is also a notion of serving the elements in the queue, with higher priority elements being served first. There are several ways of implementing this ADT-I will not worry about how you implement it. A naive implementation using linked lists is also fine. Often, a data structure called the heap is used. I strongly urge you to read this as well.

In particular, and relevant to us, priority queues are useful in implementing "discrete event simulations";

We will use this application of the priority queue to study the epidemic.

Graphs and Adjacency Matrices

The next thing that you would need to learn to do this project is a very basic idea of graphs or networks. A network is a collection of nodes or vertices, which are connected by edges. Therefore, if we want to model individuals in a population and their contacts, one way to do is to model a person using a node and if two persons are in close contact with each other, we will model that by placing an edge between them. If they are not, then there is no edge between them. Obviously, if two nodes are connected by an edge, they are said to be adjacent to each other. Such a structure of nodes and edges is called an (undirected) graph. Never mind about the undirected part for this project. One way of representing a graph in a computer is using an adjacency matrix. This can be implementing using linked lists.

Some Computational Epidemiology

An epidemic like Covid-19 is an SIR epidemic. An individual is initially Sus- ceptible (S). Then s/he might get Infected (I) and finally Recover (R). However, as one can expect, each transition is probabilistic.

You have to implement a simple variant of the algorithm in section of A.1.2 of:

and obtain the infection curves1.

Reproduced here is a part of the algorithm, with some modifications.
Algorithm 1 Part of Fast SIR
while Q is not empty do do
Event earliest remaining event in Q
if Event.action is transmit then
if Event.node.status is susceptible then
process trans SIR(G, Event.node, τ , γ) [See Below]
else Event is Recovery
process rec SIR(Event.node, Event.time) [See Below]
end if
end if end while

An event struct in the priority queue has to necessarily have the following fields- a) the time when the event occurs, b) the type of event (transmit or re- cover) and c) which node it concerns. Other fields are as per your programming convenience. Also, maintain lists of S, I and R people.

process trans SIR

If the event is a transmit event and the corresponding node v is susceptible, delete v from the S list and add it to the I list. Create events for The source code is available in python in this document. You are encouraged to read that code (learn python in the process if you haven't already.

With the time at which this happens. You can use the following subroutine to determine these times. For each neighbor, toss a coin with The node v transmitting the infection to its neighbors, along probability τ for each day until you get a heads. For the day you get a heads, put a transmit event for that neighbor. (Think how you can (biased) toss coins in C).

v's recovery. Toss a biased coin with γ probability of it showing heads. Keep tossing until you get a heads. If you get a heads on the ith trial, v will recover after i days. (So, we create an event for that and insert in the priority queue.)
process rec SIR

If the event is a recover event, then remove that node from the I list and add it to the R list.
So what do we have to do?

Perform this simulation for a maximum of 300 days, use τ as 0.5 and γ as

0.2. Construct a graph of 10000 nodes with MAX VERTICES as 10000 and MAX EDGES as 3000

Attachment:- Project.rar

Reference no: EM132521142

Questions Cloud

Upward direction as positive and the downward direction : If the speed of the ball at the bottom of the circle is v, what is the expression for the centripetal force on the ball in terms of its speed v and the length
What amount should be recognized as accrued liability : Marian Company was sued by a competitor for P5,000,000 for infringement of patent. What amount should be recognized as accrued liability
What are the stages of blockchain maturity : What are the stages of Blockchain maturity and explain which stages have the most potential for human resource management application?
Rest energy in the special relativistic expression : What is the significance of the rest energy in the special relativistic expression?
Project - simulating covid 19 : Project - Simulating Covid 19 - implementing discrete event simulations - Graphs and Adjacency Matrices - Perform this simulation for a maximum of 300 days
How each party can be discharged from the liabilities : Explain the difference between a minor breach and a material breach to your client. how each party can be discharged from their liabilities.
Non-relativistic expression for the kinetic energy : What is the connection with the non-relativistic expression for the kinetic energy E=1/2mv^2?
What federal laws influence employer pension and health plan : What policy issues must employers address when developing benefit plans? What federal laws influence employers' pension and health plans?
Rest energy in the special relativistic expression : What is the significance of the rest energy in the special relativistic expression?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd