Skip to content

Commit 16daafb

Browse files
authored
Merge pull request #1 from Xiejiadong/main
Data and Codes of "Influence Minimization via Blocking Strategies"
2 parents 0512d95 + ec04408 commit 16daafb

18 files changed

+9409394
-1
lines changed

AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Jiadong Xie <jdxie@se.cuhk.edu.hk>
2+
Fan Zhang <zhangf@gzhu.edu.cn>
3+
Kai Wang <w.kai@sjtu.edu.cn>
4+
Jialu Liu <jialuliu@sjtu.edu.cn>
5+
Xuemin Lin <xuemin.lin@sjtu.edu.cn>
6+
Wenjie Zhang <wenjie.zhang@unsw.edu.au>

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Jiadong XIE
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,96 @@
1-
# 2024.0591
1+
[![INFORMS Journal on Computing Logo](https://INFORMSJoC.github.io/logos/INFORMS_Journal_on_Computing_Header.jpg)](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

Comments
 (0)