本文主要是介绍Network robustness,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
活动地址:CSDN21天学习挑战赛
Define
——网络的稳健性/鲁棒性
Network robustness:
the ability of a network to maintain its general structural properties when it faces failures or attacks
——网络在面临故障或攻击时保持其一般结构属性的能力
Type of attacks:
removal of nodes or edges
structural properties:(结构特性)
connectivity
——Robustness is going to be the network’s ability to maintain its connectivity
And so you would like for the transportation network to be robust to closures of airports, so that the general connectivity or the general function of the network is still maintained even after it might have lost one particular airport.
——因此,您希望交通网络对机场关闭具有鲁棒性,以便网络的一般连通性或一般功能即使在可能失去一个特定机场后仍能保持。
Disconnecting a Graph
Undirected Graph
What is the smallest number of nodes that can be removed from this graph in order to disconnect it?
nx.node_connectivity(G_un)
#>>1
'''And it says that if I just remove one node, I would be able to disconnect the graph completely.'''nx.minimum_node_cut(G_un)
#>>{'A'}
'''切除A结点就能得到不连通的图'''
What is the smallest number of edges that can be removed from this graph in order to disconnect it?
nx.edge_connectivity(G_un)nx.minimum_edge_cut(G_un)
Directed Graph
Simple Paths
Imagine node G wants to send a message to node L by passing it along to other nodes in this network
sorted(nx.all_simple_paths(G,source='G',target='L'))
Node Connectivity
If we wanted to block the message from G to L by removing nodes from the network, how many nodes would we need to remove?
nx.node_connectivity(G,'G','L')
#>>2
'''至少要删除两个点'''nx.minimum_node_cut(G,'G','L')
#>>{'N','O'}
Edge Connectivity
If we wanted to block the message from G to L by removing edges from the network, how many nodes would we need to remove?
nx.edge_connectivity(G,'G','L')
#>>2nx.minimum_edge_cut(G,'G','L')
#>>{('A','N'),('J','O')}
这篇关于Network robustness的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!