Giter VIP home page Giter VIP logo

explosive-immunization's Introduction

Explosive immunization

Explosive immunization algorithm for network fragmentation, introduced in the article Pau Clusella, Peter Grassberger, Francisco J. Pérez-Reche, and Antonio Politi Phys. Rev. Lett. 117, 208301.

Please, refer to the paper for details of the algorithm.

Compiling

The codes are in the Library folder. Download the Library on your workspace and compile using

$ make -C Library

Upon success, the executable exploimmun will be created in you workspace

Using the algorithm

To run the code use

$ ./exploimmun <m> <network.txt>

where

  • m is a positive integer stating the number of candidates to select at each step of the algorithm. The smaller the m, the fastest is the algorithm. However, a too small number might result on a bad performance. For networks with a million nodes, m=1000 might be a reasonable option.

  • network.txt is the file where the network is stored. The first line must be just a single number, N the number of network nodes. The following lines must contain the list of edges. An edge written as i j means that there is a link between node i and j. The proper format of the file is not checked by the code so the user should ensure everything is set appropiately. A exemplary file is given in the repository as ER1e5.txt.

Outputs generated by the algorithm

All the output files are generated in the workspace

  • output_sigma1.dat contains the outcome of using the first score as pairs of numbers q G(q) where q is the fraction of vaccinated nodes, and G(q) the relative size of the largest network component.
  • output_sigma2.dat same, but using the second score.
  • threshold_conditions.dat contains the list of vaccinated nodes at the approximated percolation threshold (computed as 1/sqrt(N)). A 1 means vaccinated, and a 0 means unvaccinated.

Algorithm parameters

The only parameter the program requires is m. The effective degree cut-off is set to 6. The threshold where the second score is invoked is set to $1/\sqrt{N}$. These two parameters can be easily changed from the source file Library/exploimmun.c

explosive-immunization's People

Contributors

pclus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

cevenchin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.