Skip to content

preferential_attachment_network

Syntax

preferential_attachment_network(network_name, trials, samples_per_trial)

Parameters

network_name
The name of a network defined in the model.
trials
An expression that evaluates to the number of trials in the process.
samples_per_trial
An expression that evaluates to the number of samples to take to replace the original edge.

Description

Adjust the edges in a network to create a new, scale-free network. This action must be performed by the meta-agent.

The process is to repeatedly select a source node in the network and one outward edge from the source node (one source node per trial), and then to pick a number of sample nodes as possible destinations for the original edge. The original edge is replaced by an edge from the source node to the sample node with the largest in-degree, if the in-degree of the sample if larger than the in-degree of the original destination node.

This "rewiring" procedure has been shown by Barabasi et al. (1999) to result in scale-free networks. The larger the number of trials, the more the degree distribution tends to a power-law distribution.

This action leaves the mean degree of the network unchanged; that is, the total number of edges in the network does not change. To set the mean degree distribution, see randomize_network.

Note

preferential_attachment_network sets all edge weights in a network to 1.

Examples

The following performs 10,000 trials in which a source node is picked at random, and one of its outgoing edges is changed to one of 100 sampled nodes:

preferential_attachment_network(Some_network, 10000, 100)

See Also