5D Library › 五节点循环网络动力学、黄经历表与多尺度振子扰动 · English
第二章 五节点循环有向图:循环矩阵谱、Hopf 分岔与对数和
一个只有结构的模型
五个节点排成一个环。每个节点从它的前一个节点获得增长(生成),被隔一个位置的节点抑制(隔一抑制)。这个有向图的形状在中国传统中被称为「相生」与「相克」;本书只使用它的图结构,不对它在任何领域的解释作任何主张——这里没有医学、命理或物质世界的预言,只有一个五阶循环矩阵及其动力学。
另一个更为人熟知的五节点环是「石头-剪刀-布-蜥蜴-史波克」:每个选项胜两个、负两个,是一个零和(反对称)的锦标赛。它是本章模型的一个特例,后面会看到,正是这个特例才拥有守恒量。
循环矩阵:对称性直接给出全部特征值
推导
生成-抑制环。 设循环移位算子 。节点 从 获得 ,被 抑制 ,自身饱和 : 任何循环矩阵都以傅里叶向量 ()为特征向量。由 得 与 是同一组数( 重新编号)(Davis 1979; Gray 2006)。
推导
复制子动力学与 Hopf 条件。 在单纯形上考虑 均匀状态 是平衡点,它在单纯形切空间上的雅可比矩阵恰为 ,特征值 , (Hofbauer and Sigmund 1998)。实部 最先越过零,临界值 。若此时 ,就是 Hopf 分岔 (Kuznetsov 2004)。
推导
# 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.程序把公式给出的五个特征值逐一代回矩阵核对,残差都在 1e-16 量级:不需要任何数值特征值算法,环的对称性已经给出了全部谱。、、 时,模 1 与模 4 的实部是 +0.2135,均匀状态不稳定。
这里有一处需要对提纲作的修正:没有自身饱和()时,只要 ,均匀状态总是不稳定的,因为 。生成与隔一抑制都推动模 1 失稳;Hopf 分岔需要第三个参数 才会出现。阈值表给出 与阈值处的振荡周期:只有生成时 ,周期 33.03; 时 ,周期 47.81; 时 。
当 ——黄金比——时,两种耦合在虚部中恰好抵消:,越过阈值的是一个实特征值,没有振荡诞生,表中周期一栏为「none」。黄金比在这里不是装饰:它是正五边形几何中 与 的关系的直接后果。
分岔的类型与守恒量
推导
# 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.A 段从小扰动(0.01)与大扰动(0.5)两种初值出发,在 低于 时都落到同一个振荡上:振荡幅度与初值无关,是一个吸引的极限环。幅度的平方除以 随着靠近阈值趋于常数(从 1.331 到 2.340),这是超临界 Hopf 分岔的标志:振幅按 从零长出。 高于阈值 0.020 时振荡消失,均匀状态 0.2000 重新稳定。离阈值越远,最小的 越接近零( 时为 0.0029),第三章会看到这意味着什么。
B 段检查对数和 。它的变化率是 对零和(反对称)的环,两项都恒为零, 守恒:2,000 个时间单位里它只在 4.71e-11 的范围内漂移,即数值误差。对本章的生成-抑制环, 在一个周期里变化 1.89。所以第二处修正是: 只是零和环的守恒量,不是一般生成-抑制环的守恒量。「石头-剪刀-布-蜥蜴-史波克」属于前者;带自身饱和的生成-抑制环属于后者。
注
这里没有说的事。 复制子方程描述的是各节点所占份额的相互作用,书中的参数没有单位,也不对应任何真实系统。模型说明的是一种图结构在数学上能做什么:失稳、振荡、守恒或不守恒。它不说明任何真实的「五元」系统具有这些性质。
假说 · 尚未验证
作者的假说(尚未验证): 对任意 节点、只含循环生成与隔 抑制的环,存在一个由 与 决定的耦合比,使首先失稳的模的虚部为零;、 时这个比恰为黄金比。什么结果会证明它错:对某个 与 ,首先失稳的模在所有耦合比下都有非零虚部,或零虚部出现在另一个模上。
小结
五节点生成-抑制环的相互作用矩阵是循环矩阵,全部特征值由环的对称性直接写出。没有自身饱和时均匀状态总不稳定;Hopf 阈值是 ,分岔是超临界的,极限环吸引且振幅与初值无关。当 等于黄金比时没有振荡诞生。对数和 只在零和环中守恒。
参考文献
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).