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

  Variables constants and data types

The following M.U.S.E. materials may help you with this assignment: Sequential Logic Structures and Variables, Constants, and Data Types

  Dscribes the table created from each entity and the column

You are a database consultant with Ace Software, Inc. and have been assigned to develop a database for the Mom and Pop Johnson video store in town.

  Create program algorithm in pseudocode to store quiz grades

The elementary school for which you are doing development work has asked you to create a program algorithm in pseudocode to store quiz grades for the students of a class

  Write a suitable logical description of the robot.

Write a sentence describing the Go action. Use a successor-state axiom.

  Explain the splay tree algorithm

If the decrease Key operation is not supported, parent links are not necessary. Implement the pairing heap algorithm without parent links and compare.

  Find the spanning tree for the graph

Apply depth-first-search to find the spanning tree for the following graph with vertex d as the starting vertex

  Search the web to find out at least 2 examples of web sites

Also find out 2 examples of websites that do not follow the 3 rules of error messaging

  What is the smallest aa-tree

Suppose that the level data member in an AA-tree is represented by an 8-bit byte. What is the smallest AA-tree that would overflow the level data member.

  Write a method that takes two doubly linked lists

Write a method (merge) that takes two doubly linked lists

  Implement a prototype that uses a linked list

Develop a prototype solution to test the performance of different data structures and algorithms - develop some software to manage student enrolments. You decide to develop a prototype solution to test the performance of different data structures a..

  Computing entropy of plaintext message

Compute the entropy of the plaintext message?

  Compute the conditional probability

About how many records would you expect would be removed - Compute the conditional probability P(Outlook='Sunny'|PLAY='Yes').

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