MTC Chapter 16 — Equilibrium and the Frontier Registry¶

Part V · Week 15 · Seed 20261601

The dynamic frontier. The self-similar network has fractal dimension $d_f=\log 3/\log 2\approx 1.585$; the formation map period-doubles into chaos.

In [1]:
import sys, os
sys.path.insert(0, r"/home/claude/mtc/mtc-course/downloads/engine_lib")
sys.path.insert(0, r"/home/claude/mtc/nbbuild")
from mtcplot import apply_style, MTC_RED, BRASS, SLATE, MTC_RED_LITE, MTC_RED_DARK
import matplotlib.pyplot as plt
import numpy as np
apply_style()

The logistic bifurcation into chaos¶

The formation intensity $r$ drives a period-doubling cascade; the Lyapunov exponent turns positive at the onset of chaos.

In [2]:
from engines import mtc_engine_ch16 as e
rs = np.linspace(2.5, 4.0, 300)
lyap = [e.logistic_lyapunov(r, iters=600, burn=200) for r in rs]
fig, ax = plt.subplots()
ax.plot(rs, lyap, color=MTC_RED, lw=1.4)
ax.axhline(0, color=SLATE, ls="--")
ax.fill_between(rs, lyap, 0, where=[l>0 for l in lyap], color=BRASS, alpha=0.3, label="chaos ($\\lambda>0$)")
ax.set_xlabel("formation intensity $r$"); ax.set_ylabel("Lyapunov exponent $\\lambda$")
ax.set_title(f"Onset of chaos; fractal dimension $d_f = \\log 3/\\log 2 = {e.fractal_dimension():.3f}$")
ax.legend()
plt.tight_layout(); plt.show()
print("d_f =", round(e.fractal_dimension(),4), " (pruned:", e.fractal_after_pruning(), ")")
print("coordination gap ratio (n=4):", e.smallest_gap_ratio(4))
No description has been provided for this image
d_f = 1.585  (pruned: 1.0 )
coordination gap ratio (n=4): 0.25

Validation¶

Every number above is reproduced by the seeded engine; the checks below must all pass.

In [3]:
from engines import mtc_engine_ch16 as _e
v = _e.validation_checks(); v.pop("_values", None)
for k, val in v.items():
    print(f"  {k}: {val}")
assert v["ALL_PASS"], "validation failed"
print("\nALL_PASS — matches notebook + workbook + API")
  V1_d_f_log3log2: True
  V2_d_f_approx_1p585: True
  V3_pruned_d_f_1: True
  V4_coordination_gap_ratio_n4: True
  V5_gap_opens_above_threshold: True
  V6_chaos_positive_lyapunov: True
  V7_stable_negative_lyapunov: True
  V8_maintenance_reduces_avalanches: True
  ALL_PASS: True

ALL_PASS — matches notebook + workbook + API