🕸️ Scale-Free Network

The Barabási-Albert model (1999) grows a network by preferential attachment: each new node connects to m existing nodes with probability proportional to their current degree — "the rich get richer". This produces a power-law degree distribution P(k) ~ k−γ with γ≈3, where a few highly connected hubs dominate. The same topology appears in the Internet, WWW, citation networks, social media and protein interaction networks. Click Grow to add nodes one by one, or Auto to watch continuous growth. Drag nodes to rearrange. 🇺🇦 Українська

Growth Controls

Layout

Colour

Nodes
Edges
Max degree
Avg degree
Clustering coeff

Power-Law and Real Networks

In an Erdős-Rényi random graph, edges are placed uniformly at random — the degree distribution is Poisson and nodes are largely interchangeable. In a scale-free network, the degree distribution follows a power law: P(k) ∝ k−γ, meaning very high-degree hubs exist with far higher probability than a Poisson distribution would predict. This makes scale-free networks robust against random failures (rare that a hub fails by chance) but vulnerable to targeted attacks (removing a few hubs fragments the network). The WWW (web pages → links), actor collaboration networks, and metabolic networks all show γ ≈ 2–3. The BA model gives γ = 3 exactly for any m.

About the Scale-Free Network Simulation

This simulation grows a network using the Barabási-Albert (1999) preferential-attachment model. Starting from a small seed of m+1 fully connected nodes, each new node attaches m edges to existing nodes chosen with probability proportional to their current degree — the "rich get richer". The result is a power-law degree distribution P(k) proportional to k to the power minus gamma, with gamma equal to 3, dominated by a handful of high-degree hubs.

The controls let you set m (links each new node adds, 1 to 5), the growth speed in nodes per second, and the maximum node count (10 to 200). You can grow nodes one at a time or run continuous Auto growth, switch between force-directed and radial layouts, and colour nodes by degree or age. Live statistics report node and edge counts, maximum and average degree, and the clustering coefficient. The same topology appears in the Internet, the World Wide Web, citation and social networks.

Frequently Asked Questions

What is a scale-free network?

A scale-free network is one whose degree distribution follows a power law, P(k) proportional to k to the power minus gamma, rather than a bell curve. This means most nodes have few connections while a small number of hubs have very many. The term "scale-free" reflects that there is no typical node degree that characterises the whole network.

What is preferential attachment?

Preferential attachment is the rule that drives the Barabási-Albert model: when a new node joins, the chance it links to an existing node is proportional to that node's current degree. Well-connected nodes are therefore more likely to gain new links, an effect often summarised as "the rich get richer". This positive feedback is what produces the hubs you see emerge in the simulation.

What does the m control do?

The m slider sets how many edges each newly added node creates, between 1 and 5 in this simulation. A higher m yields a denser network with a larger average degree and higher clustering. Changing m resets the network, because the seed is a complete graph of m+1 nodes from which growth begins.

Why do hubs form?

Hubs arise from the combination of growth and preferential attachment. Nodes that join early have more time to accumulate links, and once they are well connected they attract even more new edges. This cumulative advantage means a few nodes become disproportionately central, while most stay sparsely connected.

What is the value of the exponent gamma?

For the standard Barabási-Albert model the degree-distribution exponent gamma equals 3 exactly, and this holds for any value of m. Many real-world networks show gamma in the range of roughly 2 to 3, somewhat shallower than the pure BA model, often because of additional effects like node ageing or fitness.

How does this differ from a random (Erdos-Renyi) graph?

In an Erdos-Renyi random graph, edges are placed uniformly at random and the degree distribution is Poisson, so nodes are largely interchangeable and very high-degree hubs are extremely improbable. A scale-free network instead has a heavy-tailed power-law distribution, making large hubs far more likely. The two models therefore behave very differently under failure and attack.

Why are scale-free networks robust yet fragile?

Because most nodes have low degree, a random failure usually hits an unimportant node, so the network stays connected even when many nodes are removed at random. However, deliberately removing the few high-degree hubs quickly fragments the network. This "robust yet fragile" property is a defining and much-studied feature of scale-free topologies.

What do the live statistics mean?

Nodes and Edges count the current network size. Max degree is the highest number of connections held by any single node, and Avg degree is the mean over all nodes, which tends toward 2m. The clustering coefficient measures how often a node's neighbours are also connected to one another, averaged across the network.

Is this simulation physically accurate?

It faithfully implements the core Barabási-Antal growth-plus-preferential-attachment mechanism that defines the model, so the emergent hubs and power-law tendency are genuine. The force-directed layout is purely for visualisation and does not affect the network's structure. With only tens to a couple of hundred nodes, the measured degree distribution is a small-sample approximation of the asymptotic power law.

Where do scale-free networks appear in the real world?

Power-law or near-power-law degree distributions have been reported in the World Wide Web of hyperlinks, the physical Internet, scientific citation networks, actor-collaboration networks, social-media follower graphs and protein-interaction networks. Understanding their hub structure informs the design of resilient infrastructure and strategies for slowing epidemics by targeting highly connected nodes.