5D Library › Five-Node Cyclic Network Dynamics, Solar-Longitude Ephemeris and Multi-Scale Oscillator Perturbations · 中文
Chapter 2. The Five-Node Cyclic Digraph: Circulant Spectrum, Hopf Bifurcation and the Log-Sum
A model with nothing but structure
Five nodes stand in a ring. Each gains from the node before it (generation) and is held back by the node two places before it (skip-one inhibition). In Chinese tradition the shape of this directed graph is known as “mutual generation” and “mutual restraint”; this book uses only its graph structure and makes no claim about its interpretation in any field — there is no medicine, divination or prediction of the physical world here, only a fifth-order circulant matrix and its dynamics.
A better-known five-node ring is “rock-paper-scissors-lizard-Spock”: each option beats two and loses to two, a zero-sum (antisymmetric) tournament. It is a special case of this chapter’s model, and, as we shall see, it is precisely that special case that has a conserved quantity.
Circulant matrices: symmetry gives the whole spectrum
Calculation
The generation-inhibition ring. Let the cyclic shift be . Node gains from , is inhibited by from and limits itself by : Every circulant has the Fourier vectors () as eigenvectors. Since , the same set of numbers as (relabelling ) (Davis 1979; Gray 2006).
Calculation
Replicator dynamics and the Hopf condition. On the simplex consider The uniform state is an equilibrium, and its Jacobian on the simplex’s tangent space is exactly , with eigenvalues , (Hofbauer and Sigmund 1998). The real part crosses zero first, at the critical value . If there, it is a Hopf bifurcation (Kuznetsov 2004).
Calculation
# Chapter 2. p04: The five-node generation-inhibition ring as a circulant.
# Node i receives c1 from its predecessor i-1 (generation) and loses c2
# to node i-2 (inhibition, skipping one); mu is self-limitation. With
# the cyclic shift (S x)_i = x_{i-1}, the interaction matrix is
# A = c1 S - c2 S^2 - mu I .
# Every circulant has the Fourier vectors v_k = (w^{jk}), w = e^{2 pi i/5},
# as eigenvectors; S v_k = w^{-k} v_k, so
# lambda_k = c1 w^{-k} - c2 w^{-2k} - mu, k = 0..4
# (the same set as c1 w^k - c2 w^{2k} - mu, relabelled k -> -k).
# For the replicator dynamics on the simplex, the uniform state is an
# equilibrium and its Jacobian on the simplex has eigenvalues lambda_k/5,
# k = 1..4. Modes 1 and 4 cross the imaginary axis first, at
# mu_c = c1 cos 72 + c2 cos 36 (degrees),
# a Hopf bifurcation unless Im lambda_1 = 0, i.e. c2 / c1 = sin 72 /
# sin 36 = 1.618 (the golden ratio), where the crossing is real.
import cmath
import math
W = cmath.exp(2j * math.pi / 5)
def matrix(c1, c2, mu):
a = [[0.0] * 5 for _ in range(5)]
for i in range(5):
a[i][(i - 1) % 5] += c1
a[i][(i - 2) % 5] -= c2
a[i][i] -= mu
return a
def lam(c1, c2, mu, k):
return c1 * W ** (-k) - c2 * W ** (-2 * k) - mu
if __name__ == "__main__":
c1, c2, mu = 1.0, 0.5, 0.5
a = matrix(c1, c2, mu)
print("c1 = {}, c2 = {}, mu = {}".format(c1, c2, mu))
print(" k lambda_k (formula) |A v - lambda v|")
for k in range(5):
v = [W ** (j * k) for j in range(5)]
av = [sum(a[i][j] * v[j] for j in range(5)) for i in range(5)]
lk = lam(c1, c2, mu, k)
err = max(abs(x - lk * y) for x, y in zip(av, v))
print(" {} {:+.4f} {:+.4f}i {:.1e}".format(
k, lk.real, lk.imag, err))
print("\nHopf threshold and period at threshold:")
print(" c1 c2 mu_c Im lambda_1 period (time units)")
for c1, c2 in ((1.0, 0.0), (1.0, 0.5), (1.0, 1.0), (1.0, 1.618),
(0.5, 1.0)):
muc = (c1 * math.cos(math.radians(72))
+ c2 * math.cos(math.radians(36)))
im = lam(c1, c2, muc, 1).imag
per = 2 * math.pi * 5 / abs(im) if abs(im) > 1e-3 else float("inf")
print(" {:4.2f} {:5.3f} {:6.4f} {:+9.4f} {:>9}".format(
c1, c2, muc, im, "{:.2f}".format(per) if per < 1e9 else
"none"))
print(" golden ratio sin 72 / sin 36 = {:.6f}".format(
math.sin(math.radians(72)) / math.sin(math.radians(36))))
print("\nReading: the whole spectrum follows from the ring's symmetry -")
print("no eigen-solver is needed. Generation and skip-one inhibition")
print("both destabilise mode 1; self-limitation above mu_c restores")
print("the uniform state. At c2/c1 = 1.618 the two couplings cancel in")
print("the imaginary part and no oscillation is born.")
# c1 = 1.0, c2 = 0.5, mu = 0.5
# k lambda_k (formula) |A v - lambda v|
# 0 +0.0000 +0.0000i 0.0e+00
# 1 +0.2135 -0.6572i 1.6e-16
# 2 -1.4635 -1.0633i 3.1e-16
# 3 -1.4635 +1.0633i 5.0e-16
# 4 +0.2135 +0.6572i 5.6e-16
#
# Hopf threshold and period at threshold:
# c1 c2 mu_c Im lambda_1 period (time units)
# 1.00 0.000 0.3090 -0.9511 33.03
# 1.00 0.500 0.7135 -0.6572 47.81
# 1.00 1.000 1.1180 -0.3633 86.48
# 1.00 1.618 1.6180 -0.0000 none
# 0.50 1.000 0.9635 +0.1123 279.86
# golden ratio sin 72 / sin 36 = 1.618034
#
# Reading: the whole spectrum follows from the ring's symmetry -
# no eigen-solver is needed. Generation and skip-one inhibition
# both destabilise mode 1; self-limitation above mu_c restores
# the uniform state. At c2/c1 = 1.618 the two couplings cancel in
# the imaginary part and no oscillation is born.The program substitutes each of the five eigenvalues given by the formula back into the matrix; every residual is of order 1e-16. No numerical eigen-solver is needed: the ring’s symmetry has already given the whole spectrum. With , and , modes 1 and 4 have real part +0.2135 and the uniform state is unstable.
Here a correction to the outline is needed: without self-limitation () the uniform state is always unstable as long as , because . Generation and skip-one inhibition both push mode 1 towards instability; a Hopf bifurcation needs the third parameter to appear at all. The threshold table gives and the period of the oscillation at threshold: with generation alone and the period is 33.03; with , and the period 47.81; with , .
When — the golden ratio — the two couplings cancel exactly in the imaginary part: , the eigenvalue that crosses the threshold is real, no oscillation is born, and the table’s period column reads “none”. The golden ratio is no ornament here: it follows directly from how and are related in the geometry of the regular pentagon.
The kind of bifurcation, and the conserved quantity
Calculation
# Chapter 2. p05: Replicator dynamics on the ring: Hopf and the log-sum.
# dx_i/dt = x_i ((A x)_i - x.A x), A = c1 S - c2 S^2 - mu I
# integrated in log coordinates u_i = ln x_i (x = softmax u), RK4, step
# 0.1, which keeps every x_i positive however close it comes to 0.
# A. c1 = 1, c2 = 0.5, so mu_c = 0.7135 (p04). For mu below mu_c the
# uniform state loses stability; the oscillation's size (max x - min
# x over the cycle) is measured after 4,000 time units, from a small
# and a large starting perturbation. A supercritical Hopf has
# size^2 / (mu_c - mu) tending to a constant.
# B. The quantity H = sum_i ln x_i. Its rate is
# dH/dt = sum_i (A x)_i - 5 x.A x .
# For an antisymmetric (zero-sum) ring, A = c1 (S - S^T) - c2 (S^2 -
# S^2T), both terms vanish and H is conserved. For the ring above it
# is not.
import math
def soft(u):
m = max(u)
e = [math.exp(a - m) for a in u]
s = sum(e)
return [a / s for a in e]
def ring(c1, c2, mu, anti=False):
a = [[0.0] * 5 for _ in range(5)]
for i in range(5):
a[i][(i - 1) % 5] += c1
a[i][(i - 2) % 5] -= c2
a[i][i] -= mu
if anti:
a[i][(i + 1) % 5] -= c1
a[i][(i + 2) % 5] += c2
return a
def rhs(u, a):
x = soft(u)
ax = [sum(a[i][j] * x[j] for j in range(5)) for i in range(5)]
m = sum(p * q for p, q in zip(ax, x))
return [v - m for v in ax]
def step(u, a, h):
k1 = rhs(u, a)
k2 = rhs([p + h / 2 * q for p, q in zip(u, k1)], a)
k3 = rhs([p + h / 2 * q for p, q in zip(u, k2)], a)
k4 = rhs([p + h * q for p, q in zip(u, k3)], a)
return [p + h / 6 * (q + 2 * r + 2 * s + t)
for p, q, r, s, t in zip(u, k1, k2, k3, k4)]
def settle(a, eps, burn=4000.0, look=400.0, h=0.1):
u = [eps * math.cos(2 * math.pi * i / 5) for i in range(5)]
for _ in range(int(burn / h)):
u = step(u, a, h)
size, low = 0.0, 1.0
for _ in range(int(look / h)):
u = step(u, a, h)
x = soft(u)
size, low = max(size, max(x) - min(x)), min(low, min(x))
return size, low
if __name__ == "__main__":
c1, c2 = 1.0, 0.5
muc = (c1 * math.cos(math.radians(72))
+ c2 * math.cos(math.radians(36)))
print("A. mu_c = {:.4f}".format(muc))
print(" mu_c - mu size (start 0.01) size (start 0.5)"
" size^2/(mu_c-mu) min x")
for d in (0.2, 0.1, 0.05, 0.02, 0.01, -0.02):
s1, _ = settle(ring(c1, c2, muc - d), 0.01)
s2, low = settle(ring(c1, c2, muc - d), 0.5)
ratio = "{:8.3f}".format(s1 * s1 / d) if d > 0 else " -"
print(" {:+8.3f} {:9.5f} {:9.5f} {}"
" {:.4f}".format(d, s1, s2, ratio, low))
print("\nB. H = sum ln x_i along 2,000 time units (step 0.02)")
for name, a in (("antisymmetric ring", ring(1.0, 0.5, 0.0, True)),
("ring, mu = mu_c - 0.1", ring(c1, c2, muc - 0.1))):
u = [0.4 * math.cos(2 * math.pi * i / 5 + 0.3) for i in range(5)]
hs = []
for n in range(100000):
u = step(u, a, 0.02)
if n % 50 == 0:
hs.append(sum(math.log(v) for v in soft(u)))
r = max(hs) - min(hs)
print(" {:<22} H in [{:+.6f}, {:+.6f}], range {}".format(
name, min(hs), max(hs),
"{:.2f}".format(r) if r >= 0.01 else "{:.2e}".format(r)))
print("\nReading: below mu_c a stable oscillation is born whose size")
print("does not depend on the start, and size^2 / (mu_c - mu) settles")
print("near a constant: a supercritical Hopf bifurcation. The log-sum")
print("H is conserved only by the zero-sum (antisymmetric) ring; the")
print("generation-inhibition ring with self-limitation does not keep")
print("it.")
# A. mu_c = 0.7135
# mu_c - mu size (start 0.01) size (start 0.5) size^2/(mu_c-mu) min x
# +0.200 0.51596 0.51596 1.331 0.0029
# +0.100 0.40632 0.40632 1.651 0.0201
# +0.050 0.31492 0.31492 1.984 0.0513
# +0.020 0.21251 0.21251 2.258 0.0957
# +0.010 0.15298 0.15299 2.340 0.1236
# -0.020 0.00000 0.00000 - 0.2000
#
# B. H = sum ln x_i along 2,000 time units (step 0.02)
# antisymmetric ring H in [-8.245226, -8.245226], range 4.71e-11
# ring, mu = mu_c - 0.1 H in [-10.137253, -8.245356], range 1.89
#
# Reading: below mu_c a stable oscillation is born whose size
# does not depend on the start, and size^2 / (mu_c - mu) settles
# near a constant: a supercritical Hopf bifurcation. The log-sum
# H is conserved only by the zero-sum (antisymmetric) ring; the
# generation-inhibition ring with self-limitation does not keep
# it.Part A starts from a small perturbation (0.01) and a large one (0.5); below both end on the same oscillation, whose size does not depend on the start: an attracting limit cycle. The squared size divided by tends to a constant as the threshold approaches (from 1.331 to 2.340), the signature of a supercritical Hopf bifurcation: the amplitude grows from zero like . With 0.020 above the threshold the oscillation is gone and the uniform state, 0.2000, is stable again. The further from threshold, the closer the smallest comes to zero (0.0029 at ); Chapter 3 shows what that means.
Part B checks the log-sum . Its rate of change is For a zero-sum (antisymmetric) ring both terms vanish identically and is conserved: over 2,000 time units it drifts only within a range of 4.71e-11, which is numerical error. For this chapter’s generation-inhibition ring, changes by 1.89 within a cycle. Hence the second correction: is a conserved quantity of the zero-sum ring only, not of the generation-inhibition ring in general. Rock-paper-scissors-lizard-Spock belongs to the first kind; a generation-inhibition ring with self-limitation to the second.
Note
What is not claimed here. The replicator equation describes how the shares of the nodes interact; the parameters in this book have no units and correspond to no real system. The model shows what one graph structure can do mathematically: lose stability, oscillate, conserve or fail to conserve. It does not show that any real “five-element” system has these properties.
Hypothesis · not established
The author’s hypothesis (not yet tested): for any ring of nodes with only cyclic generation and skip- inhibition, there is a coupling ratio, fixed by and , at which the first mode to lose stability has zero imaginary part; for , that ratio is exactly the golden ratio. What would show it wrong: for some and , the first unstable mode has non-zero imaginary part at every coupling ratio, or the zero imaginary part occurs on another mode.
Summary
The interaction matrix of the five-node generation-inhibition ring is a circulant, and its whole spectrum can be written down from the ring’s symmetry. Without self-limitation the uniform state is always unstable; the Hopf threshold is , the bifurcation is supercritical, and the limit cycle attracts, with an amplitude independent of the start. When equals the golden ratio no oscillation is born. The log-sum is conserved only in the zero-sum ring.
References
Fan, Y. (2026). Five-Node Cyclic Network Dynamics, Solar-Longitude Ephemeris and Multi-Scale Oscillator Perturbations: Rock-Paper-Scissors-Lizard-Spock Lotka-Volterra Graphs, Equation-of-Time Keplerian Mechanics and Jacobian Sensitivity Bounds [五节点循环网络动力学、黄经历表与多尺度振子扰动] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090168 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).