|
1 |
| -# 2024.0591 |
| 1 | +[](https://pubsonline.informs.org/journal/ijoc) |
| 2 | + |
| 3 | +<!-- # 2024.0591 --> |
| 4 | + |
| 5 | +# Influence Minimization via Blocking Strategies |
| 6 | + |
| 7 | +This archive is distributed in association with the [INFORMS Journal on Computing](https://pubsonline.informs.org/journal/ijoc) under the [MIT License](LICENSE). |
| 8 | + |
| 9 | +The software and data in this repository are a snapshot of the software and data that were used in the research reported in the paper [Influence minimization via blocking strategies](https://doi.org/10.1287/ijoc.2024.0591) by Jiadong Xie, Fan Zhang, Kai Wang, Jialu Liu, Xuemin Lin, and Wenjie Zhang. |
| 10 | + |
| 11 | +## Cite |
| 12 | + |
| 13 | +To cite the contents of this repository, please cite both the paper and this repo, using their respective DOIs. |
| 14 | + |
| 15 | +[https://doi.org/10.1287/ijoc.2024.0591](https://doi.org/10.1287/ijoc.2024.0591) |
| 16 | + |
| 17 | +[https://doi.org/10.1287/ijoc.2024.0591.cd](https://doi.org/10.1287/ijoc.2024.0591.cd) |
| 18 | + |
| 19 | +Below is the BibTex for citing this snapshot of the repository. |
| 20 | + |
| 21 | +``` |
| 22 | +@article{IM2024, |
| 23 | + author = {Jiadong Xie and |
| 24 | + Fan Zhang and |
| 25 | + Kai Wang and |
| 26 | + Jialu Liu and |
| 27 | + Xuemin Lin and |
| 28 | + Wenjie Zhang}, |
| 29 | + publisher = {INFORMS Journal on Computing}, |
| 30 | + title = {Influence Minimization via Blocking Strategies}, |
| 31 | + year = {2024}, |
| 32 | + doi = {10.1287/ijoc.2024.0591.cd}, |
| 33 | + url = {https://github.com/INFORMSJoC/2024.0591}, |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +## Datasets |
| 40 | + |
| 41 | +The experiments are performed on 8 datasets sourced from [SNAP](http://snap.stanford.edu), also accessible through the files under [/data/](/data/). |
| 42 | + |
| 43 | +In dataset files, the first line specifies the vertex count `n` and edge count `m`. Each subsequent line features two integers `u v` representing a directed edge $(u,v)$. |
| 44 | + |
| 45 | +Prior to executing our algorithms, it is essential to first process the downloaded datasets from [SNAP](http://snap.stanford.edu) using the provided data processing scripts at [/scripts/DataProcess.cpp](/scripts/DataProcess.cpp). |
| 46 | +Specifically, utilize `g++ -o DataProcess DataProcess.cpp -std=c++11 -O3` for compilation, run the code with `./DataProcess`, and input the dataset name when run. |
| 47 | + |
| 48 | + |
| 49 | +## Run Algorithms |
| 50 | + |
| 51 | +### Compile |
| 52 | + |
| 53 | +Compile the codes either by utilizing the scripts under [/scripts/compile.sh](./scripts/compile.sh) or by directly employing the subsequent commands. |
| 54 | + |
| 55 | +```shell |
| 56 | +g++ -o AdvancedGreedy AdvancedGreedy.cpp -std=c++11 -O3 |
| 57 | +g++ -o GreedyReplace GreedyReplace.cpp -std=c++11 -O3 |
| 58 | +``` |
| 59 | + |
| 60 | +### Algorithms |
| 61 | + |
| 62 | +* **AdvancedGreedy (AG)**: Algorithm 3 that contains Algorithm 2 to accelerate the baseline greedy algorithm. |
| 63 | + |
| 64 | +* **GreedyReplace (GR)**: Our GreedyReplace algorithm (Algorithm 4). |
| 65 | + |
| 66 | +All the algorithms can be run as follows. |
| 67 | + |
| 68 | +For example, we use `./GreedyReplace` to run the code, and then input the name of the dataset, the influence model, the propagation model, the number of sources and the budget by the keyboard. |
| 69 | + |
| 70 | +```shell |
| 71 | +dataset: sample_graph.txt |
| 72 | +influence model (0: IC model; 1: LT model): 0 |
| 73 | +propagation model (0: TR model; 1: WC model): 0 |
| 74 | +number of sources : 3 |
| 75 | +budget: 3 |
| 76 | +``` |
| 77 | +Note that we use the same rand parameter to ensure all the algorithms have the same seed set: `mt19937 rand_num(20220708)`. |
| 78 | + |
| 79 | +### Results |
| 80 | + |
| 81 | +The program will print the sources which are chosen randomly and the time for loading the dataset. |
| 82 | + |
| 83 | +```shell |
| 84 | +source: 24 28 36 |
| 85 | +Finish loading dataset. time : 0.000569s. |
| 86 | +``` |
| 87 | + |
| 88 | +The experiment results will be saved in [/results](/results/), e.g., [/results/GR-IC-TR-sample_graph.txt](/results/GR-IC-TR-sample_graph.txt). |
| 89 | + |
| 90 | +Three numbers in the results mean `budget`, `expected spread` and `running time (s)`, respectively. |
| 91 | + |
| 92 | +Detailed results for all the tested instances can be found in [/results/results.pdf](/results/results.pdf). |
| 93 | + |
| 94 | +#### Environment |
| 95 | + |
| 96 | +The experiments in our paper are performed on a CentOS Linux serve (Release 7.5.1804) with Quad-Core Intel Xeon CPU (E5-2640 v4 @ 2.20GHz) and 128G memory. All the algorithms are implemented in C++. The source code is compiled by GCC(7.3.0) under O3 optimization. |
0 commit comments