What Is It?

This model demonstrates Stuart Kauffman's "buttons and threads" thought experiment, one of the simplest illustrations of a phase transition in a random network.

Imagine N buttons scattered on a floor. You pick two at random and tie a thread between them. Repeat. At first, you get isolated pairs and small clusters. Then, around the moment when the number of threads reaches half the number of buttons, something dramatic happens: a single giant cluster emerges and rapidly absorbs most of the network.

This is the same mathematics behind Erdos-Renyi random graphs. The transition at threads/N = 0.5 is sharp, sudden, and universal. It does not depend on which buttons you pick. It depends only on the ratio.

How It Works

N buttons are arranged in a circle. At each step, two buttons are chosen uniformly at random and connected by a thread. A union-find data structure tracks which buttons belong to the same connected component.

The largest connected component is colored green. All other components are colored red. The chart below the network plots the fraction of buttons in the largest component as threads accumulate.

How To Use It

Things To Notice

Things To Try

Extending The Model

Why It Matters

Kauffman used buttons and threads to argue that the origin of life may not require an astronomically unlikely event. Instead, once molecular diversity crosses a threshold, a connected web of mutual catalysis becomes virtually inevitable. Order, in this view, is free.

The same phase transition appears in epidemiology (disease outbreaks), social networks (information cascades), ecology (food web stability), and percolation physics (fluid flow through porous rock). The math is identical. Only the substrate changes.

Related Models

Erdos-Renyi random graphs. Percolation on lattices. Kauffman's NK fitness landscapes and autocatalytic sets. Barabasi-Albert preferential attachment networks (a different growth rule that produces scale-free rather than random topology).

Based on Stuart Kauffman, At Home in the Universe (1995) and The Origins of Order (1993). Random graph theory from Paul Erdos and Alfred Renyi (1959).

Buttons & Threads

Stuart Kauffman's random graph phase transition

Speed Buttons 100
Threads: 0 Threads/N: 0.00 Largest: 1 / 100 Components: 100

Space = play/pause · → = step · R = reset