MakarovSuites
English
EnglishDeutschРусскийУкраїнськаFrançaisEspañolItalianoPolski
Contact & licences

Math

Random walks and PageRank

Follow probability mass through a directed graph and compare power iteration with a crowd of random walkers. Teleportation can make PageRank converge to a unique distribution. Compare a periodic cycle with a graph whose unpatched dangling nodes leak mass.

Random walks and PageRank — Actual application image
Actual application image

What happens

The bars show the distribution at the current step; the thin bars show an ensemble of walkers. These are not the fraction of time spent at each node by one walker. On a directed cycle, a distribution concentrated at one node keeps circulating, while long-run occupation fractions can still approach the uniform stationary distribution.
With positive teleport probability and patched dangling rows, the transition matrix is stochastic and all nodes communicate: the stationary distribution is unique and the iterates converge. Leaving a dangling row empty creates a leaking, sub-stochastic model. Its reference solution is disabled here; this does not mean that every sub-stochastic graph lacks a stationary distribution.
The subdominant eigenvalue modulus describes the asymptotic exponential decay rate when convergence occurs. Individual steps can oscillate, and special initial states can miss the slowest mode. Try a point start, a uniform start and different damping values.

Equations used in the module
Equations
walk:  P[i][j] = w[i][j] / (sum over j of w[i][j]);  a row of zeros is a DANGLING node
Google matrix:  G = d·P + (1 − d)/n, with a dangling row replaced by the uniform row
stationary:  pi·G = pi with sum(pi) = 1;  reached by power iteration, and solved directly as the check
convergence:  the error falls like |lambda_2|^n, so |lambda_2| IS the rate - but the step size only tracks it on average, because a complex subdominant pair makes the decay ROTATE (the geometric mean of the step ratios recovers it, the arithmetic mean sits 1.5 % high)
damping bound:  |lambda_2| = d·|mu_2(P)| exactly, so |lambda_2| ≤ d is an INEQUALITY - measured to 5.0e-16, loose by the factor 0.667 on the small web, tight on a cycle where |mu_2| = 1
rank sink:  with the dangling row left empty the total mass decays to zero - the rank leaks out of the system entirely
periodic:  a directed n-cycle has the n-th roots of unity for eigenvalues, all of modulus 1;  from a point start it returns to that point every n steps and never settles
undirected:  the walk is reversible and pi is just degree / 2|E| - one line of arithmetic, and the check that the iteration solves what it claims to

Related experiments

Back to catalogue
The cusp catastrophe — Actual application image

Math

The cusp catastrophe

Drag one knob and the state slides until its branch runs out, then snaps - and dragging back does not undo it. Turn the second knob above the cusp and the snap vanishes entirely: the hysteresis loop is not small there, it is exactly zero. Loop width 4·(−a/3)^(3/2), jump height 3·√(−a/3), both checkable against the picture.

Why maps lie — Actual application image

Math / Earth

Why maps lie

Small circles drawn on the globe, and the same circles on the map: Tissot's indicatrix, which is the whole measurement. Mercator keeps every circle round and swells them past thirty times; Lambert keeps the areas and squashes the shapes; nothing keeps both, and that is Gauss. Greenland is fourteen times smaller than Africa and Mercator draws it 10.47 times too big.

Curvature and parallel transport — Actual application image

Math

Curvature and parallel transport

Carry an arrow around a loop without ever turning it, and it comes back turned. The angle is the curvature the loop enclosed - Gauss–Bonnet - and it is why a Foucault pendulum knows its latitude. Circles of latitude, geodesic triangles, a plane and a saddle, each with its closed form beside the measured turn.