swan_combinatory assesses network vulnerability and the resistance of networks to node removals, whether due to random failures or intentional attacks.
swan_combinatory(g, k)
Arguments
g: An igraph object representing the graph to analyze.
k: The number of iterations for assessing the impact of random failures.
Returns
A matrix with five columns:
Column 1: Fraction of nodes removed.
Column 2: Connectivity loss from betweenness-based attack.
Column 3: Connectivity loss from degree-based attack.
Column 4: Connectivity loss from cascading failure.
Column 5: Connectivity loss from random failures (averaged over k iterations).
Details
Many complex systems display a surprising degree of tolerance against random failures. However, this resilience often comes at the cost of extreme vulnerability to targeted attacks, where removing key nodes (high-degree or high-betweenness nodes) can severely impact network connectivity.
swan_combinatory simulates different attack strategies:
Random failure: Nodes are removed randomly over multiple iterations.
Degree-based attack: Nodes are removed in decreasing order of their degree.
Betweenness-based attack: Nodes are removed in decreasing order of their betweenness centrality.
Cascading failure: Nodes are removed based on recalculated betweenness after each removal.
The function returns a matrix showing the connectivity loss for each attack scenario.
The code is an adaptation from the NetSwan package that was archived on CRAN.