seeking_critical_nodes_digraphs
SEEKING CRITICAL NODES IN DIGRAPHS
https://github.com/iac-cranic/seeking_critical_nodes_digraphs
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: sciencedirect.com -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.3%) to scientific vocabulary
Keywords
Repository
SEEKING CRITICAL NODES IN DIGRAPHS
Basic Info
Statistics
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Seeking Critical Nodes in Digraphs
The Repository (top)
The src directory contains 3 directories called: bf, cnh and igraph-centralities. Inside bf and cnh you will find the Makefile files used to compile the code of the brute force (BF) algorithm and the Critical Node Heuristic (CNH) respectivally. Inside igraph-centralities you will find the directories iterative and standard containing the Makefile files to compile the code of the random, standard and iterative strategies.
src/
|-- bf/
|-- include/
|-- src/
|-- Makefile
|-- cnh
|-- include/
|-- src/
|-- Makefile
|-- igraph-centralities
| -- common/
| -- include/
| -- iterative/
|-- Makefile
| -- standard/
|-- Makefile
BF (top)
You can compile it using the command make all, afterword the executable digraphCriticalNodesBF is created inside the directory bin and you can run it as follows:
sh
./bin/digraphCriticalNodesBF --graph <FILE_NAME> --format <TYPE> --stop <NODES_NUMBER>
Below there is a short description of the parameters read by the program.
```
Usage: digraphCriticalNodesBF --graph
Starting from size 1, we remove incremental sets of critical nodes from the graph, we stop when:
1) we reach a 0 connectivity value or 2) we reach the size defined by the <stop> parameter.
The procedure computes the critical nodes of the graph based on the formula:
f(G) = \sum_{i=1}^{l}inom{C_i}{2}
Where C_i are the strongly connected components of G, and a node x is a critical node
of G if it minimizes f(G\x), i.e x = arg min_{v \in V} f(G\v)
-s, --stop <NODES_NUMBER>
Maximum size of the critical nodes set to remove, 0 is interpreted as all.
-f, --graph <FILE_NAME>
Read the graph from file <FILE_NAME>.
-t, --format <TYPE>
The format of the file containing the graph, admitted types are:
- 0 (Edges List) The first line of the file is expected to contain the number of nodes
and edges of the graph in the following format: "# Nodes: <NUMBER> Edges: <NUMBER>"
```
CNH (top)
You can compile it using the command make all, afterword executables cnh and cnh_large are created inside the directory bin and you can run them as follows:
sh
./bin/cnh -f <INPUT_FILE> -t <FILE_TYPE> -o <OUTPUT_FILE> [-r <ROOT>] [-k <NUMBER>] [-h]
Below there is a short description of the parameters read by the program.
```
Usage: cnh -f
-f <INPUT_FILE>
Read the graph from file <INPUT_FILE>.
-t <FILE_TYPE>
The supported file types are 0 or 1; 0 for the DIMACS format and 1 for the RMAT format.
-o <OUTPUT_FILE>
Write the results in the file <OUTPUT_FILE>.
-r <ROOT>
Specify the source vertex
-k <NUMBER>
Specify the number of vertex to remove. It should be 0 < NUMBER < #Vertices. The default value is 1.
-h prints this short help
```
Standard (top)
You can compile the code using the command make all, afterword executables igraph_random and igraph_standard are created in the local directory.
In order to compile the code you need the C igraph library, see the -ligraph directive and the variable IGRAPH_HEADERS in the Makefile. IGRAPH_HEADERS is supposed to contain the path to the headers of the igraph library. Moreover you will probably need to set LD_LIBRARY_PATH and LIBRARY_PATH accordingly.
igraph_random
You can run igraph_random as follows:
sh
./igraph_random --graph <FILE_NAME> --format <TYPE> --outfile <FILE_NAME> --percentage <PERCENTAGE>
Below there is a short description of the parameters read by the program.
```
Usage: igraphrandom --graph <FILENAME> --format
-f, --graph <FILE_NAME>
Read the graph from file <FILE_NAME>.
-o, --outfile <FILE_NAME>
The name of the output file.
-p, --percentage <PERCENTAGE>.
The percentage of nodes to remove.
-t, --format <TYPE>
The format of the file containing the graph, supported types are:
- 0 (DIMACS)
- 1 (Edges List) The first line of the file is expected to contain the number of nodes
and edges of the graph in the following format: "# Nodes: <NUMBER> Edges: <NUMBER>"
```
igraph_standard
You can run igraph_standard as follows:
sh
./igraph_standard --graph <FILE_NAME> --format <TYPE> --outfile <FILE_NAME> --metric <METRIC_TYPE> --percentage <PERCENTAGE>
Below there is a short description of the parameters read by the program.
```
Usage: igraphstandard --graph <FILENAME> --format
-f, --graph <FILE_NAME>
Read the graph from file <FILE_NAME>.
-m, --metric <METRIC_TYPS>
Supported metrics are:
- 1 Betwenness centrality
- 2 Closeness (all)
- 21 Closeness (in)
- 22 Closeness (out)
- 3 Degree (all)
- 31 Degree (in)
- 32 Degree (out)
- 4 Pagerank
-o, --outfile <FILE_NAME>
The name of the output file.
-p, --percentage <PERCENTAGE>.
The percentage of nodes to remove.
-t, --format <TYPE>
The format of the file containing the graph, supported types are:
- 0 (DIMACS)
- 1 (Edges List) The first line of the file is expected to contain the number of nodes
and edges of the graph in the following format: "# Nodes: <NUMBER> Edges: <NUMBER>"
```
Iterative (top)
You can compile the code using the command make all, afterword executable igraph_iterative is created in the local directory.
In order to compile the code you need the C igraph library, see the -ligraph directive and the variable IGRAPH_HEADERS in the Makefile. IGRAPH_HEADERS is supposed to contain the path to the headers of the igraph library. Moreover you will probably need to set LD_LIBRARY_PATH and LIBRARY_PATH accordingly.
You can run igraph_iterative as follows:
sh
./igraph_iterative --graph <FILE_NAME> --format <TYPE> --outfile <FILE_NAME> --metric <METRIC_TYPE> --percentage <PERCENTAGE>
Below there is a short description of the parameters read by the program.
```
Usage: igraphiterative --graph <FILENAME> --format
-f, --graph <FILE_NAME>
Read the graph from file <FILE_NAME>.
-m, --metric <METRIC_TYPS>
Supported metrics are:
- 1 Betwenness centrality
- 2 Closeness (all)
- 21 Closeness (in)
- 22 Closeness (out)
- 3 Degree (all)
- 31 Degree (in)
- 32 Degree (out)
- 4 Pagerank
-o, --outfile <FILE_NAME>
The output filename <FILE_NAME>.
-p, --percentage <PERCENTAGE>.
The percentage of nodes to output.
-t, --format <TYPE>
The format of the file containing the graph, admitted types are:
- 0 (DIMACS)
- 1 (Edges List) The first line of the file is expected to contain the number of nodes
and edges of the graph in the following format: "# Nodes: <NUMBER> Edges: <NUMBER>"
```
Cite the Paper (top)
Seeking critical nodes in digraphs
@article{BERNASCHI2023102012,
title = {Seeking critical nodes in digraphs},
journal = {Journal of Computational Science},
volume = {69},
pages = {102012},
year = {2023},
issn = {1877-7503},
doi = {https://doi.org/10.1016/j.jocs.2023.102012},
url = {https://www.sciencedirect.com/science/article/pii/S1877750323000728},
author = {Massimo Bernaschi and Alessandro Celestini and Marco Cianfriglia and Stefano Guarino and Giuseppe F. Italiano and Enrico Mastrostefano and Lena Rebecca Zastrow},
keywords = {Critical nodes, Networks connectivity, Centrality measures, Network analysis},
abstract = {The Critical Node Detection Problem (CNDP) consists in finding the set of nodes, defined critical, whose removal maximally degrades the graph. In this work we focus on finding the set of critical nodes whose removal minimizes the pairwise connectivity of a direct graph (digraph). Such problem has been proved to be NP-hard, thus we need efficient heuristics to detect critical nodes in real-world applications. We aim at understanding which is the best heuristic we can apply to identify critical nodes in practice, i.e., taking into account time constrains and real-world networks. We present an in-depth analysis of several heuristics we ran on both real-world and on synthetic graphs. We define and evaluate two different strategies for each heuristic: standard and iterative. Our main findings show that an algorithm recently proposed to solve the CNDP and that can be used as heuristic for the general case provides the best results in real-world graphs, and it is also the fastest. However, there are few exceptions that are thoroughly analyzed and discussed. We show that among the heuristics we analyzed, few of them cannot be applied to very large graphs, when the iterative strategy is used, due to their time complexity. Finally, we suggest possible directions to further improve the heuristic providing the best results.}
}
Owner
- Login: iac-cranic
- Kind: user
- Location: Rome
- Company: Institute for Applied Computing
- Website: https://www.cranic.it
- Repositories: 2
- Profile: https://github.com/iac-cranic
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Bernaschi" given-names: "Massimo" orcid: "https://orcid.org/0000-0003-3661-9836" - family-names: "Celestini" given-names: "Alessandro" orcid: "https://orcid.org/0000-0002-8493-4550" - family-names: "Cianfriglia" given-names: "Marco" orcid: "https://orcid.org/0000-0002-6775-7804" - family-names: "Guarino" given-names: "Stefano" orcid: "https://orcid.org/0000-0002-1545-7711" - family-names: "Italiano" given-names: "Giuseppe F." orcid: "https://orcid.org/0000-0002-9492-9894" - family-names: "Mastrostefano" given-names: "Enrico" orcid: "https://orcid.org/0000-0002-0023-7943" - family-names: "Zastrow" given-names: "Lena" orcid: "https://orcid.org/0000-0000-0000-0000" title: "Seeking Critical Nodes in Digraphs" version: 1.0.4 doi: 10.5281/zenodo.1234 date-released: 2022-08-07 url: "https://github.com/github/iac-cranic/seeking_critical_nodes_digraphs"
GitHub Events
Total
Last Year
Dependencies
- python-igraph *