03-ilang-space / 23-random-arrangements
23random arrangementsverified
Summary A precommitted numerical run on random arrangements of places in two dimensions: is the large-scale chain geometry isotropic, and how robust is it?
arrangements.py28 KB · raw
"""Package 23-random-arrangements, code v2: parts T1, T1b, T2, T3, T4 of question.md.
Run from the project root:
.venv/Scripts/python.exe 03-ilang-space/23-random-arrangements/code/v2/arrangements.py [T1 T1b T2 T3 T4]
(no argument: all parts in this order; T4 reads output/T3.json for its reference value).
Outputs: compact JSON summaries in code/v2/output/<part>.json.
Changes from v1 (validation and reporting only; models, parameters, seeds, windows, decision rules and
the decision routine rng_decide are unchanged):
- edge_check: all-witness certification of every edge (every y checked against its error allowance);
- graph_summary: smallest nonzero absolute margin reported separately from the smallest margin/error ratio;
- table_checks: difference-aware error bound for D2 and 50-digit recomputation of sampled D2 entries;
- part_audit: per-part minima of the margins and certification counts.
Exactness (common setting of question.md):
- kernel values exp(-arg) are correctly rounded (50-digit Decimal);
- on the grid, overlaps S(D) and d0^2-values D2(D) are tabulated once per canonical displacement
D = (d1, d2), 0 <= d2 <= d1 <= L/2, as math.fsum sums of positive terms (correctly rounded sums);
D4-equivalent displacements share the entry, so their overlaps are bitwise identical;
- every neighbour decision compares only the small parts of d0^2: with d0^2 = C + w_h + w_h' + eta_hh'
(C common), the constant C and the common place term never enter a comparison.
"""
import json
import math
import sys
import time
from decimal import Decimal, getcontext
from pathlib import Path
import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components, dijkstra
OUT = Path(__file__).parent / "output"
UR = 2.0 ** -53 # unit roundoff of float64
XI = 2 # kernel range xi
P_INC = 0.1 # inclusion probability p
LONG_R2 = 160 # r > 4/sqrt(p) <=> r^2 > 16/p = 160
EPS_LIST = [0.0, 1e-12, 1e-9, 1e-6, 1e-4, 1e-2]
getcontext().prec = 50
# ---------------------------------------------------------------- kernel and tables
def minimg(d, L):
"""Minimal-image absolute value of integer coordinate differences on Z/LZ."""
d = np.mod(d, L)
return np.minimum(d, L - d)
def kernel(L, kind):
"""kappa(v), v in (Z/LZ)^2, as float K[v1, v2] (correctly rounded) and as Decimal array."""
m = minimg(np.arange(L), L)
cache, K, Kd = {}, np.empty((L, L)), np.empty((L, L), dtype=object)
for i in range(L):
for j in range(L):
a, b = int(m[i]), int(m[j])
key = a + b if kind == "sep" else a * a + b * b
if key not in cache:
arg = (Decimal(key) if kind == "sep" else Decimal(key).sqrt()) / XI
e = (-arg).exp()
cache[key] = (float(e), e)
K[i, j], Kd[i, j] = cache[key]
return K, Kd
def tables(K):
"""S(D) = sum_l K(l) K(l-D) and D2(D) = sum_l (K(l) - K(l-D))^2 on canonical D (math.fsum)."""
H = K.shape[0] // 2
S, D2 = np.full((H + 1, H + 1), np.nan), np.full((H + 1, H + 1), np.nan)
for d1 in range(H + 1):
for d2 in range(d1 + 1):
Ks = np.roll(K, (d1, d2), axis=(0, 1)) # Ks[l] = K[l - D]
S[d1, d2] = math.fsum((K * Ks).ravel().tolist())
D2[d1, d2] = math.fsum(((K - Ks) ** 2).ravel().tolist())
return S, D2
def d2_bound_UR(S0, S, D2):
"""Difference-aware relative error bound of a D2 entry, in units UR (v2):
|D2^ - D2| <= 2u sum_l |d_l| (k_l + k'_l) + 4u D2 <= 2u sqrt(D2) sqrt(2 S0 + 2 S) + 4u D2 (Cauchy-Schwarz),
from correctly rounded kernel values, one rounding each in the difference and the square, and fsum."""
return 2.0 * np.sqrt(2.0 * (S0 + S) / D2) + 4.0
def table_checks(S, D2, Kd):
"""Distinctness of table values; 50-digit check of selected entries (relative error in units UR).
v2: also the D2 table: difference-aware bound (d2_bound_UR) and 50-digit recomputation of the picks."""
H = S.shape[0] - 1
srt = np.sort(S[~np.isnan(S)])
dup = [v for v in np.unique(srt) if np.count_nonzero(S == v) > 1]
dups = [[[int(p), int(q)] for p, q in np.argwhere(S == v)] for v in dup[:10]]
picks = [(0, 0), (1, 0), (1, 1), (2, 1), (H // 4, H // 8), (H // 2, H // 4), (H // 2, H // 2),
(3 * H // 4, H // 3), (H, 0), (H, H // 2), (H, H - 1), (H, H)]
flat, worst = Kd.ravel().tolist(), Decimal(0)
worstD, worstDb, S0 = Decimal(0), 0.0, float(S[0, 0])
for d1, d2 in picks:
sh = np.roll(Kd, (d1, d2), axis=(0, 1)).ravel().tolist()
ex = sum(x * y for x, y in zip(flat, sh))
worst = max(worst, abs((Decimal(float(S[d1, d2])) - ex) / ex))
if (d1, d2) != (0, 0): # D2(0) = 0 exactly (fsum of exact zeros)
exD = sum((x - y) * (x - y) for x, y in zip(flat, sh))
eD = abs((Decimal(float(D2[d1, d2])) - exD) / exD)
worstD = max(worstD, eD)
worstDb = max(worstDb, float(eD) / UR / float(d2_bound_UR(S0, S[d1, d2], D2[d1, d2])))
pos = ~np.isnan(D2) & (D2 > 0)
return dict(n_entries=int(srt.size), all_values_distinct=bool(np.all(np.diff(srt) > 0)),
n_coinciding_values=len(dup), coinciding_entries_first10=dups,
min_rel_gap_between_distinct_values=float(np.min((np.diff(srt) / srt[1:])[np.diff(srt) > 0])),
decimal_check_max_rel_err_in_UR=float(worst) / UR, assumed_rel_err_in_UR=4.0,
S0=float(S[0, 0]), S_min=float(srt[0]),
D2_zero_entry_exact=bool(D2[0, 0] == 0.0),
D2_bound_rel_err_in_UR_max=float(d2_bound_UR(S0, S[pos], D2[pos]).max()),
D2_decimal_check_n=len(picks) - 1,
D2_decimal_check_max_rel_err_in_UR=float(worstD) / UR,
D2_decimal_check_max_err_over_bound=worstDb)
def canon(c1, c2, L):
"""Canonical displacement indices (max, min of minimal-image |D1|, |D2|) for all pairs."""
m1 = minimg(c1[None, :] - c1[:, None], L)
m2 = minimg(c2[None, :] - c2[:, None], L)
return np.maximum(m1, m2), np.minimum(m1, m2)
def places(L, seed):
"""T2 places: grid point (l1, l2) included iff rng.random((L, L))[l1, l2] < p."""
mask = np.random.default_rng(seed).random((L, L)) < P_INC
return np.nonzero(mask)
# ---------------------------------------------------------------- neighbour graph (4.3)
def rng_decide(sig, z, w, cid, Esig, Ez, Ew):
"""d0^2(h,h') = C + sig_hh' + (w_h + w_h' + z_hh'): C common constant, sig = -2 S (overlap part),
w (per place) and z (per pair, symmetric) the small parts. y blocks {x,x'} iff
T1 = (sig_xy - sig_xx') + ((w_y + z_xy) - (w_x' + z_xx')) < 0 and
T2 = (sig_yx' - sig_xx') + ((w_y + z_yx') - (w_x + z_xx')) < 0,
i.e. iff max(d0(x,y), d0(y,x')) < d0(x,x'). C and the common place term never enter; overlap parts
are compared among themselves (difference exactly 0 for the same table entry), small parts among
themselves. m[x,x'] = min_{y != x,x'} max(T1, T2): edge iff m >= 0 (a tie m == 0 keeps the edge).
Em: error estimate of m at the minimizing y: err of the larger of T1, T2 if they are separated by more
than err T1 + err T2, else the larger error (cid: table-entry id of each pair, None: all distinct)."""
n = len(w)
sig = sig.copy()
np.fill_diagonal(sig, np.inf) # excludes y = x and y = x'
if z is not None:
W1T = z + w[None, :] # W1T[x', y] = w_y + z_yx'
m, ys = np.empty((n, n)), np.empty((n, n), dtype=np.intp)
b1, b2, b3, cols = np.empty((n, n)), np.empty((n, n)), np.empty((n, n)), np.arange(n)
with np.errstate(invalid="ignore"):
for x in range(n):
s = sig[x]
np.subtract(s[None, :], s[:, None], out=b1) # b1[x', y] = sig_xy - sig_xx'
np.subtract(sig, s[:, None], out=b2) # b2[x', y] = sig_x'y - sig_xx'
if z is not None:
v, t = w + z[x], w[x] + z[x]
np.subtract(v[None, :], v[:, None], out=b3) # (w_y + z_xy) - (w_x' + z_xx')
b1 += b3
np.subtract(W1T, t[:, None], out=b3) # (w_y + z_yx') - (w_x + z_xx')
b2 += b3
np.maximum(b1, b2, out=b1)
b1[x, :] = np.inf
y = np.argmin(b1, axis=1)
ys[x], m[x] = y, b1[cols, y]
np.fill_diagonal(m, np.nan)
I, J = cols[:, None], cols[None, :]
same1 = (cid[I, ys] == cid) if cid is not None else False
same2 = (cid[ys, J] == cid) if cid is not None else False
E1 = np.where(same1, 0.0, Esig[I, ys] + Esig)
E2 = np.where(same2, 0.0, Esig[ys, J] + Esig)
if Ez is not None:
E1 = E1 + Ez[I, ys] + Ez + Ew[ys] + Ew[J]
E2 = E2 + Ez[ys, J] + Ez + Ew[ys] + Ew[I]
with np.errstate(invalid="ignore"): # T1, T2 at the minimizing y (same operations as above)
T1 = sig[I, ys] - sig
T2 = sig[ys, J] - sig
if z is not None:
T1 += (w[ys] + z[I, ys]) - (w[J] + z)
T2 += (w[ys] + z[ys, J]) - (w[I] + z)
Es = E1 + E2
Em = np.where(T1 - T2 > Es, E1, np.where(T2 - T1 > Es, E2, np.maximum(E1, E2)))
return m, ys, Em
def edge_check(m, ei, ej, wit, c1, c2, batch=128, limit=40):
"""v2: all-witness certification of every edge {x,x'} (m >= 0). For every y != x,x', T1 and T2 are
recomputed with the same operations as in rng_decide (hence the same computed values), with the error
allowances E1, E2 of the same model as Em. y cannot block if T1 >= E1 or T2 >= E2 (then the exact T1 or
T2 is >= 0); E = 0 occurs only for identical table entries, where the computed difference is the exact 0.
q(x,x') := min_y max(T1/E1, T2/E2); the edge is certified iff q >= 1."""
sig, z, w, cid, Esig, Ez, Ew = wit
ne = len(ei)
q, yq = np.empty(ne), np.empty(ne, dtype=np.intp)
det = np.empty((ne, 4))
reproduces_m = True
for s0 in range(0, ne, batch):
X, Xp = ei[s0:s0 + batch], ej[s0:s0 + batch]
rows = np.arange(len(X))
sxx = sig[X, Xp][:, None]
with np.errstate(invalid="ignore"):
T1 = sig[X] - sxx # sig_xy - sig_xx'
T2 = sig[Xp] - sxx # sig_x'y - sig_xx'
Exx = Esig[X, Xp][:, None]
if cid is not None:
cxx = cid[X, Xp][:, None]
E1 = np.where(cid[X] == cxx, 0.0, Esig[X] + Exx)
E2 = np.where(cid[Xp] == cxx, 0.0, Esig[Xp] + Exx)
else:
E1, E2 = Esig[X] + Exx, Esig[Xp] + Exx
if z is not None:
T1 += (w[None, :] + z[X]) - (w[Xp] + z[X, Xp])[:, None]
T2 += (z[Xp] + w[None, :]) - (w[X] + z[X, Xp])[:, None]
E1 = E1 + Ez[X] + Ez[X, Xp][:, None] + Ew[None, :] + Ew[Xp][:, None]
E2 = E2 + Ez[Xp] + Ez[X, Xp][:, None] + Ew[None, :] + Ew[X][:, None]
T1[rows, X] = T1[rows, Xp] = np.inf # y = x, x' excluded
T2[rows, X] = T2[rows, Xp] = np.inf
reproduces_m &= bool(np.array_equal(np.min(np.maximum(T1, T2), axis=1), m[X, Xp]))
with np.errstate(divide="ignore", invalid="ignore"):
r1 = np.where(E1 > 0, T1 / E1, np.where(T1 >= 0, np.inf, -np.inf))
r2 = np.where(E2 > 0, T2 / E2, np.where(T2 >= 0, np.inf, -np.inf))
qy = np.maximum(r1, r2)
k = np.argmin(qy, axis=1)
q[s0:s0 + batch], yq[s0:s0 + batch] = qy[rows, k], k
det[s0:s0 + batch] = np.stack([T1[rows, k], E1[rows, k], T2[rows, k], E2[rows, k]], axis=1)
def rec(t):
a, b, y = int(ei[t]), int(ej[t]), int(yq[t])
return dict(i=a, j=b, y=y, ci=[float(c1[a]), float(c2[a])], cj=[float(c1[b]), float(c2[b])],
cy=[float(c1[y]), float(c2[y])], q=float(q[t]), T1=float(det[t, 0]), E1=float(det[t, 1]),
T2=float(det[t, 2]), E2=float(det[t, 3]))
t0 = int(np.argmin(q)) if ne else None
bad = np.nonzero(q < 1)[0]
low = np.nonzero(q < 100)[0]
return dict(n_edges=ne, n_edges_certified=int(np.count_nonzero(q >= 1)),
n_edges_q_below_100=int(low.size), min_q=(rec(t0) if ne else None),
n_edges_q_infinite=int(np.count_nonzero(np.isinf(q))),
uncertified_edges=[rec(t) for t in bad[:limit]],
edges_q_below_100=[rec(t) for t in low[:limit]],
recomputed_T_reproduce_m=reproduces_m)
def graph_summary(m, Em, c1, c2, limit=40, wit=None):
n = m.shape[0]
A = m >= 0 # NaN diagonal -> False
iu = np.triu_indices(n, 1)
Au = A[iu]
ei, ej = iu[0][Au], iu[1][Au]
deg = np.bincount(np.concatenate([ei, ej]), minlength=n)
tie = m == 0
nz = (~np.eye(n, dtype=bool)) & ~tie
with np.errstate(divide="ignore", invalid="ignore"):
ratio = np.where(nz, np.abs(m) / Em, np.inf)
k = int(np.argmin(ratio))
i, j = divmod(k, n)
fl = ((ratio < 100) | (ratio.T < 100))[iu]
fi, fj = iu[0][fl], iu[1][fl]
flagged = [dict(i=int(a), j=int(b), ci=[float(c1[a]), float(c2[a])], cj=[float(c1[b]), float(c2[b])],
m=float(m[a, b]), Em=float(Em[a, b]), ratio=float(ratio[a, b]))
for a, b in zip(fi[:limit], fj[:limit])]
summ = dict(n_places=n, n_edges=int(ei.size), mean_degree=2.0 * ei.size / n, max_degree=int(deg.max()),
asymmetric_decisions=int(np.count_nonzero(A != A.T)),
tie_pairs=int(np.count_nonzero((tie | tie.T)[iu])),
smallest_margin=dict(pair=[i, j], m=float(m[i, j]), Em=float(Em[i, j]),
ratio_margin_over_error=float(ratio[i, j])),
pairs_ratio_below_100=int(fl.sum()), flagged_pairs=flagged)
# v2: smallest nonzero absolute margin, separately from the smallest margin/error ratio above
with np.errstate(invalid="ignore"):
absm = np.where(nz, np.abs(m), np.inf)
ka = int(np.argmin(absm))
ia, ja = divmod(ka, n)
summ["smallest_abs_margin"] = dict(pair=[ia, ja], ci=[float(c1[ia]), float(c2[ia])],
cj=[float(c1[ja]), float(c2[ja])], m=float(m[ia, ja]),
Em=float(Em[ia, ja]), ratio_margin_over_error=float(ratio[ia, ja]),
is_edge=bool(A[ia, ja]))
# v2: non-edges are certified by the minimizing witness iff |m| >= Em there (both T1, T2 < 0 exactly)
nonedge = (~A & ~np.eye(n, dtype=bool))[iu]
cert = ((ratio >= 1) | (ratio.T >= 1))[iu]
summ["n_nonedges"] = int(nonedge.sum())
summ["n_nonedges_certified_by_minimizing_witness"] = int(np.count_nonzero(nonedge & cert))
if wit is not None:
summ["edge_check"] = edge_check(m, ei, ej, wit, c1, c2)
return summ, ei, ej, deg
def part_audit(graphs):
"""v2: per-part minima over the graphs (label -> graph summary) of the margins and certification counts."""
lab_a = min(graphs, key=lambda g: abs(graphs[g]["smallest_abs_margin"]["m"]))
lab_r = min(graphs, key=lambda g: graphs[g]["smallest_margin"]["ratio_margin_over_error"])
withq = {g: s for g, s in graphs.items() if s.get("edge_check") and s["edge_check"]["min_q"]}
lab_q = min(withq, key=lambda g: withq[g]["edge_check"]["min_q"]["q"]) if withq else None
return dict(n_graphs=len(graphs),
smallest_abs_margin=dict(graph=lab_a, **graphs[lab_a]["smallest_abs_margin"]),
smallest_ratio=dict(graph=lab_r, **graphs[lab_r]["smallest_margin"]),
smallest_edge_q=(dict(graph=lab_q, **withq[lab_q]["edge_check"]["min_q"]) if lab_q else None),
total_edges=sum(s["n_edges"] for s in graphs.values()),
total_edges_certified=sum(s["edge_check"]["n_edges_certified"] for s in withq.values()),
total_edges_q_below_100=sum(s["edge_check"]["n_edges_q_below_100"] for s in withq.values()),
total_nonedges=sum(s["n_nonedges"] for s in graphs.values()),
total_nonedges_certified=sum(s["n_nonedges_certified_by_minimizing_witness"]
for s in graphs.values()),
all_recomputed_T_reproduce_m=all(s["edge_check"]["recomputed_T_reproduce_m"]
for s in withq.values()))
def chain(n, ei, ej, wt):
G = csr_matrix((wt, (ei, ej)), shape=(n, n))
ncomp = int(connected_components(G, directed=False)[0])
return dijkstra(G, directed=False), ncomp
def window_rho(ell, r2, phi, lo, hi):
"""Mean rho = ell/r over unordered pairs with lo <= r <= hi, and in four phi bins of width pi/16."""
iu = np.triu_indices(ell.shape[0], 1)
R2 = r2[iu]
sel = (R2 >= lo * lo) & (R2 <= hi * hi)
rho = ell[iu][sel] / np.sqrt(R2[sel])
kb = np.minimum((phi[iu][sel] / (np.pi / 16)).astype(int), 3)
bins = [float(rho[kb == q].mean()) for q in range(4)]
return dict(r_window=[lo, hi], n_pairs=int(sel.sum()), mean_rho=float(rho.mean()),
bin_means=bins, bin_counts=[int(np.sum(kb == q)) for q in range(4)],
B=bins[3] / bins[0], n_infinite=int(np.sum(~np.isfinite(rho))))
def equal_norm_case(L, c1, c2, S, D2, lo, hi):
"""Places on grid points (equal norms): d0^2 = 2 S0 - 2 S, i.e. sig = -2 S and no small parts."""
n = len(c1)
a, b = canon(c1, c2, L)
Sp = S[a, b]
wit = (-2.0 * Sp, None, np.zeros(n), a * (L // 2 + 1) + b, 8 * UR * Sp, None, None)
m, ys, Em = rng_decide(*wit)
summ, ei, ej, deg = graph_summary(m, Em, c1, c2, wit=wit)
ell, ncomp = chain(n, ei, ej, np.sqrt(D2[a[ei, ej], b[ei, ej]]))
summ["components"] = ncomp
r2 = (a * a + b * b).astype(float)
win = window_rho(ell, r2, np.arctan2(b, a), lo, hi)
return summ, win, dict(m=m, a=a, b=b, ell=ell, ei=ei, ej=ej, deg=deg)
# ---------------------------------------------------------------- parts
def part_T1():
L = 32
K, Kd = kernel(L, "sep")
S, D2 = tables(K)
c1, c2 = np.divmod(np.arange(L * L), L)
summ, win, d = equal_norm_case(L, c1, c2, S, D2, 8, 14)
A = d["m"] >= 0
grid4 = bool(np.array_equal(A, (d["a"] == 1) & (d["b"] == 0)))
rho = math.sqrt(D2[1, 0])
dev = float(np.max(np.abs(d["ell"] - rho * (d["a"] + d["b"]))))
tol = 1e-9 * rho * L
return dict(L=L, kernel="separable", table_checks=table_checks(S, D2, Kd), graph=summ,
N0_is_4_neighbour_grid=grid4, rho_unit_step=rho, max_abs_dev_ell0_minus_rho_l1=dev,
tolerance=tol, decision="pass" if (grid4 and dev <= tol) else "fail")
def part_T1b():
L = 32
K, Kd = kernel(L, "iso")
S, D2 = tables(K)
c1, c2 = np.divmod(np.arange(L * L), L)
summ, win, d = equal_norm_case(L, c1, c2, S, D2, 8, 14)
offs = {}
for p, q in zip(d["a"][d["ei"], d["ej"]], d["b"][d["ei"], d["ej"]]):
offs[f"({p},{q})"] = offs.get(f"({p},{q})", 0) + 1
return dict(L=L, kernel="isotropic", table_checks=table_checks(S, D2, Kd), graph=summ,
edge_offset_classes_canonical=offs, rho_unit_step=math.sqrt(D2[1, 0]),
window=win, B_per=win["B"])
def part_T2():
res = dict(sizes={})
for L, seeds in ((64, range(2301, 2306)), (128, range(2311, 2316))):
K, Kd = kernel(L, "iso")
S, D2 = tables(K)
reals = []
for seed in seeds:
c1, c2 = places(L, seed)
summ, win, _ = equal_norm_case(L, c1, c2, S, D2, L // 8, L // 4)
reals.append(dict(seed=seed, graph=summ, window=win))
Bs = np.array([r["window"]["B"] for r in reals])
res["sizes"][str(L)] = dict(table_checks=table_checks(S, D2, Kd), realizations=reals,
B_values=Bs.tolist(), B_mean=float(Bs.mean()),
SE=float(Bs.std(ddof=1) / math.sqrt(len(Bs))))
s = res["sizes"]["128"]
dev, se = s["B_mean"] - 1.0, s["SE"]
if abs(dev) < 0.02 and abs(dev) < 2 * se:
dec = "isotropy supported"
elif dev > 0.02 and dev > 3 * se:
dec = "anisotropy detected"
else:
dec = "inconclusive"
res["decision_L128"] = dec
res["margin_audit"] = part_audit({f"L{L}_seed{r['seed']}": r["graph"] for L in (64, 128)
for r in res["sizes"][str(L)]["realizations"]})
return res
def part_T3():
L, N = 128, 128 * 128
K, Kd = kernel(L, "iso")
S, D2 = tables(K)
c1, c2 = places(L, 2311)
n = len(c1)
a, b = canon(c1, c2, L)
Sp, D2p, r2, cid = S[a, b], D2[a, b], a * a + b * b, a * (L // 2 + 1) + b
phi = np.arctan2(b, a)
U = np.empty((n, N))
for h in range(n):
U[h] = np.roll(K, (c1[h], c2[h]), axis=(0, 1)).ravel() # u_h[l] = kappa(l - c_h)
G = np.random.default_rng(2321).standard_normal((n, N))
G /= np.linalg.norm(G, axis=1)[:, None]
nrm = np.array([math.fsum((g * g).tolist()) for g in G])
B = U @ G.T # B[h,h'] = <u_h, g_h'>
Babs = U @ np.abs(G).T # sum of |terms| of each B entry
GG = G @ G.T
samp = [(h, (7 * h + 3) % n) for h in range(0, n, 5)]
errB = max(abs(math.fsum((U[h] * G[k]).tolist()) - B[h, k]) / (math.sqrt(N) * UR * Babs[h, k])
for h, k in samp)
errG = max(abs(math.fsum((G[h] * G[k]).tolist()) - GG[h, k]) / (math.sqrt(N) * UR) for h, k in samp)
del U, G
av, Bs, Gs = np.diag(B).copy(), B + B.T, 0.5 * (GG + GG.T)
Eb = math.sqrt(N) * UR * Babs
Ebs, eG = Eb + Eb.T, math.sqrt(N) * UR
del B, GG, Babs
rows, base_edges, base_rho = [], None, None
for eps in EPS_LIST:
t0 = time.perf_counter()
# d0^2 = [2 S0 + 2 eps^2] + (-2 S) + (w_h + w_h' + z_hh'): constant, overlap part, small parts
w = 2 * eps * av + eps ** 2 * (nrm - 1)
z = -2 * eps * Bs - 2 * eps ** 2 * Gs
Ew = 2 * eps * np.diag(Eb) + eps ** 2 * eG + 4 * UR * np.abs(w)
Ez = 2 * eps * Ebs + 2 * eps ** 2 * eG + 4 * UR * np.abs(z)
if eps == 0:
wit = (-2.0 * Sp, None, np.zeros(n), cid, 8 * UR * Sp, None, None)
else:
wit = (-2.0 * Sp, z, w, cid, 8 * UR * Sp, Ez, Ew)
m, ys, Em = rng_decide(*wit)
summ, ei, ej, deg = graph_summary(m, Em, c1, c2, wit=wit)
del z, Ez, wit
d2e = (D2p[ei, ej] + 2 * eps * (av[ei] + av[ej] - Bs[ei, ej])
+ eps ** 2 * (nrm[ei] + nrm[ej] - 2 * Gs[ei, ej]))
ell, ncomp = chain(n, ei, ej, np.sqrt(d2e))
win = window_rho(ell, r2.astype(float), phi, 16, 32)
edges = set(zip(ei.tolist(), ej.tolist()))
if eps == 0:
base_edges, base_rho = edges, win["mean_rho"]
tz = (m == 0) | (m == 0).T
tie_set = set(zip(*[q.tolist() for q in np.nonzero(np.triu(tz, 1))]))
if eps == 1e-12:
gen_edges = edges
long_mask = r2[ei, ej] > LONG_R2
row = dict(eps=eps, a_new_edges=len(edges - base_edges), removed_edges=len(base_edges - edges),
removed_edges_that_are_eps0_tie_pairs=len((base_edges - edges) & tie_set),
sym_diff_vs_eps_1e12=(len(edges ^ gen_edges) if eps >= 1e-12 else None),
b_long_edges=int(long_mask.sum()), c_max_degree=int(deg.max()),
d_mean_rho=win["mean_rho"], d_ratio=win["mean_rho"] / base_rho,
components=ncomp, graph=summ, n_window_pairs=win["n_pairs"])
if long_mask.any():
k = int(np.argmin(np.where(long_mask, r2[ei, ej], 10 ** 9)))
row["e_shortest_long_edge"] = dict(r=math.sqrt(r2[ei[k], ej[k]]), d0=float(np.sqrt(d2e[k])),
ci=[int(c1[ei[k]]), int(c2[ei[k]])],
cj=[int(c1[ej[k]]), int(c2[ej[k]])])
row["long_edge_r_values"] = sorted(np.sqrt(r2[ei, ej][long_mask]).round(4).tolist())[:200]
else:
row["e_shortest_long_edge"] = None
row["runtime_s"] = time.perf_counter() - t0
rows.append(row)
print(f" T3 eps={eps:g}: new={row['a_new_edges']} long={row['b_long_edges']} "
f"maxdeg={row['c_max_degree']} d={row['d_ratio']:.6f} ({row['runtime_s']:.1f}s)", flush=True)
small = [r for r in rows if 0 < r["eps"] <= 1e-4]
fragile = any(r["b_long_edges"] > 0 and abs(r["d_ratio"] - 1) > 0.05 for r in small)
robust = all(r["b_long_edges"] == 0 and abs(r["d_ratio"] - 1) < 0.01 for r in rows if r["eps"] > 0)
return dict(L=L, seed_places=2311, seed_noise=2321, n_places=n,
validation=dict(max_B_err_over_estimate=errB, max_G_err_over_estimate=errG,
n_samples=len(samp), estimate_B="sqrt(N)*UR*sum|terms|",
estimate_G="sqrt(N)*UR"),
rows=rows, decision="fragile" if fragile else ("robust" if robust else "intermediate"),
margin_audit=part_audit({f"eps={r['eps']:g}": r["graph"] for r in rows}),
margin_audit_eps_positive=part_audit({f"eps={r['eps']:g}": r["graph"] for r in rows
if r["eps"] > 0}))
def part_T4():
L, N = 128, 128 * 128
K, _ = kernel(L, "iso")
S0 = math.fsum((K * K).ravel().tolist())
K2neg = (-(K * K)).ravel()
c1, c2 = places(L, 2311)
n = len(c1)
off = np.random.default_rng(2331).random((n, 2))
f1, f2 = off[:, 0], off[:, 1]
lv = np.arange(L)
def absdisp(dint, f): # |minimal image of dint + f| on the circle of length L
mm = np.mod(dint, L)
v = mm + f
return np.abs(np.where(v > L / 2, (mm - L) + f, v))
U = np.empty((n, N))
for h in range(n):
v1, v2 = absdisp(lv - c1[h], -f1[h]), absdisp(lv - c2[h], -f2[h])
U[h] = np.exp(-np.sqrt(v1[:, None] ** 2 + v2[None, :] ** 2) / XI).ravel()
nu = np.array([math.fsum(np.concatenate([U[h] * U[h], K2neg]).tolist()) for h in range(n)])
S4 = U @ U.T
S4 = np.triu(S4) + np.triu(S4, 1).T
samp = [(h, (7 * h + 3) % n) for h in range(0, n, 5)]
errS = max(abs(math.fsum((U[h] * U[k]).tolist()) - S4[h, k]) / (UR * S4[h, k]) for h, k in samp)
w1 = absdisp(c1[None, :] - c1[:, None], f1[None, :] - f1[:, None])
w2 = absdisp(c2[None, :] - c2[:, None], f2[None, :] - f2[:, None])
r2 = w1 ** 2 + w2 ** 2
phi = np.arctan2(np.minimum(w1, w2), np.maximum(w1, w2))
rmax_half = math.sqrt(2) * (L / 2 + 1) / XI
eS = (rmax_half + 3 + math.sqrt(N)) * UR
# d0^2 = 2 S0 + (-2 S_hh') + (nu_h + nu_h'): constant, overlap part, small (norm-deviation) parts
Ew = np.full(n, (rmax_half + 4) * UR * S0)
zero = np.zeros((n, n))
wit = (-2.0 * S4, zero, nu, None, 2 * (eS + 4 * UR) * S4, zero, Ew)
m, ys, Em = rng_decide(*wit)
summ, ei, ej, deg = graph_summary(m, Em, c1 + f1, c2 + f2, wit=wit)
del wit
d2e = np.array([math.fsum(((U[i] - U[j]) ** 2).tolist()) for i, j in zip(ei, ej)])
del U
ell, ncomp = chain(n, ei, ej, np.sqrt(d2e))
win = window_rho(ell, r2, phi, 16, 32)
ref, ref1 = json.loads((OUT / "T3.json").read_text())["rows"][:2]
assert ref["eps"] == 0.0 and ref1["eps"] == 1e-12
long_mask = r2[ei, ej] > LONG_R2
return dict(L=L, seed_places=2311, seed_offsets=2331, n_places=n,
norms=dict(S0_unshifted=S0, min=S0 + float(nu.min()), max=S0 + float(nu.max()),
spread=float(nu.max() - nu.min())),
validation=dict(max_S_rel_err_in_UR_blas_vs_fsum=errS, assumed_rel_err_in_UR=eS / UR),
graph=summ, components=ncomp,
b_long_edges=int(long_mask.sum()), c_max_degree=int(deg.max()),
d_mean_rho=win["mean_rho"], d_ratio_to_T3_eps0=win["mean_rho"] / ref["d_mean_rho"],
ratio_to_T3_eps_1e12=win["mean_rho"] / ref1["d_mean_rho"],
T3_eps0_mean_rho=ref["d_mean_rho"], n_window_pairs=win["n_pairs"],
long_edge_r_quantiles=(np.quantile(np.sqrt(r2[ei, ej][long_mask]), [0, .25, .5, .75, 1]).tolist()
if long_mask.any() else None))
PARTS = dict(T1=part_T1, T1b=part_T1b, T2=part_T2, T3=part_T3, T4=part_T4)
if __name__ == "__main__":
OUT.mkdir(parents=True, exist_ok=True)
for name in (sys.argv[1:] or list(PARTS)):
t0 = time.perf_counter()
print(f"running {name}", flush=True)
res = PARTS[name]()
res["part"], res["runtime_s"] = name, time.perf_counter() - t0
(OUT / f"{name}.json").write_text(json.dumps(res, indent=1, default=float))
print(f"{name} done in {res['runtime_s']:.1f} s", flush=True)
compare_v1.py2 KB · raw
"""Package 23-random-arrangements, code v2: check that v2 reproduces every number saved by v1.
Run from the project root (after arrangements.py):
.venv/Scripts/python.exe 03-ilang-space/23-random-arrangements/code/v2/compare_v1.py
Compares every leaf of code/v1/output/<part>.json with the same key path in code/v2/output/<part>.json
(exact equality; runtimes excluded). Keys added in v2 are not compared. Output: output/compare_v1.json.
"""
import json
from pathlib import Path
HERE = Path(__file__).parent
V1, V2 = HERE.parent / "v1" / "output", HERE / "output"
def leaves(a, b, path, diffs, count):
if isinstance(a, dict):
for k, v in a.items():
if k == "runtime_s":
continue
if not isinstance(b, dict) or k not in b:
diffs.append(dict(path=f"{path}/{k}", v1=v, v2="missing"))
continue
leaves(v, b[k], f"{path}/{k}", diffs, count)
elif isinstance(a, list):
if not isinstance(b, list) or len(a) != len(b):
diffs.append(dict(path=path, v1=a, v2=b))
return
for i, (x, y) in enumerate(zip(a, b)):
leaves(x, y, f"{path}[{i}]", diffs, count)
else:
count[0] += 1
if a != b:
diffs.append(dict(path=path, v1=a, v2=b))
res = {}
for part in ("T1", "T1b", "T2", "T3", "T4"):
diffs, count = [], [0]
leaves(json.loads((V1 / f"{part}.json").read_text()), json.loads((V2 / f"{part}.json").read_text()),
part, diffs, count)
res[part] = dict(n_leaves_compared=count[0], n_differences=len(diffs), differences=diffs[:50])
print(f"{part}: {count[0]} values compared, {len(diffs)} differences")
res["all_identical"] = all(r["n_differences"] == 0 for r in res.values())
(V2 / "compare_v1.json").write_text(json.dumps(res, indent=1))
output/T1.json2 KB · raw
{
"L": 32,
"kernel": "separable",
"table_checks": {
"n_entries": 153,
"all_values_distinct": false,
"n_coinciding_values": 1,
"coinciding_entries_first10": [
[
[
15,
1
],
[
16,
0
]
]
],
"min_rel_gap_between_distinct_values": 0.0005777819966619354,
"decimal_check_max_rel_err_in_UR": 1.0862556968073394,
"assumed_rel_err_in_UR": 4.0,
"S0": 4.682693322895569,
"S_min": 0.00011523601891252134,
"D2_zero_entry_exact": true,
"D2_bound_rel_err_in_UR_max": 12.165976330147194,
"D2_decimal_check_n": 11,
"D2_decimal_check_max_rel_err_in_UR": 0.9311372373855685,
"D2_decimal_check_max_err_over_bound": 0.15493270743768517
},
"graph": {
"n_places": 1024,
"n_edges": 2048,
"mean_degree": 4.0,
"max_degree": 4,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
0,
1
],
"m": 0.9400146372369198,
"Em": 6.959228228842447e-15,
"ratio_margin_over_error": 135074552281679.62
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
0,
496
],
"ci": [
0.0,
0.0
],
"cj": [
15.0,
16.0
],
"m": -0.0690773877076404,
"Em": 3.09073478880657e-17,
"ratio_margin_over_error": 2234982695953455.0,
"is_edge": false
},
"n_nonedges": 521728,
"n_nonedges_certified_by_minimizing_witness": 521728,
"edge_check": {
"n_edges": 2048,
"n_edges_certified": 2048,
"n_edges_q_below_100": 0,
"min_q": {
"i": 0,
"j": 1,
"y": 34,
"ci": [
0.0,
0.0
],
"cj": [
0.0,
1.0
],
"cy": [
1.0,
2.0
],
"q": 385143655723358.56,
"T1": 2.426121623669937,
"E1": 6.299264151484751e-15,
"T2": 0.9400146372369198,
"E2": 6.959228228842447e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"N0_is_4_neighbour_grid": true,
"rho_unit_step": 1.0295556869943496,
"max_abs_dev_ell0_minus_rho_l1": 0.0,
"tolerance": 3.294578198381919e-08,
"decision": "pass",
"part": "T1",
"runtime_s": 6.301623900188133
}output/T1b.json2 KB · raw
{
"L": 32,
"kernel": "isotropic",
"table_checks": {
"n_entries": 153,
"all_values_distinct": true,
"n_coinciding_values": 0,
"coinciding_entries_first10": [],
"min_rel_gap_between_distinct_values": 1.4810094377361492e-05,
"decimal_check_max_rel_err_in_UR": 0.5227696492993181,
"assumed_rel_err_in_UR": 4.0,
"S0": 6.507236568531855,
"S_min": 0.006814200795355149,
"D2_zero_entry_exact": true,
"D2_bound_rel_err_in_UR_max": 14.721715068233674,
"D2_decimal_check_n": 11,
"D2_decimal_check_max_rel_err_in_UR": 0.893568041041808,
"D2_decimal_check_max_err_over_bound": 0.1488760133016497
},
"graph": {
"n_places": 1024,
"n_edges": 2048,
"mean_degree": 4.0,
"max_degree": 4,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
0,
1
],
"m": 0.6657605270521341,
"Em": 1.0486136947001762e-14,
"ratio_margin_over_error": 63489589199241.86
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
0,
496
],
"ci": [
0.0,
0.0
],
"cj": [
15.0,
16.0
],
"m": -0.48968791156766744,
"Em": 2.3021934659422684e-16,
"ratio_margin_over_error": 2127049350160683.8,
"is_edge": false
},
"n_nonedges": 521728,
"n_nonedges_certified_by_minimizing_witness": 521728,
"edge_check": {
"n_edges": 2048,
"n_edges_certified": 2048,
"n_edges_q_below_100": 0,
"min_q": {
"i": 0,
"j": 1,
"y": 34,
"ci": [
0.0,
0.0
],
"cj": [
0.0,
1.0
],
"cy": [
1.0,
2.0
],
"q": 228280857965597.53,
"T1": 2.2347271103899136,
"E1": 9.789375816726133e-15,
"T2": 0.6657605270521341,
"E2": 1.0486136947001762e-14
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"edge_offset_classes_canonical": {
"(1,0)": 2048
},
"rho_unit_step": 0.9355491765638851,
"window": {
"r_window": [
8,
14
],
"n_pairs": 215040,
"mean_rho": 1.1890717443272938,
"bin_means": [
1.0110605013558125,
1.1633116189317145,
1.2658372900017576,
1.3149937987638876
],
"bin_counts": [
51200,
57344,
57344,
49152
],
"B": 1.3006084175976673,
"n_infinite": 0
},
"B_per": 1.3006084175976673,
"part": "T1b",
"runtime_s": 6.382528200047091
}output/T2.json24 KB · raw
{
"sizes": {
"64": {
"table_checks": {
"n_entries": 561,
"all_values_distinct": true,
"n_coinciding_values": 0,
"coinciding_entries_first10": [],
"min_rel_gap_between_distinct_values": 3.3809799285358804e-07,
"decimal_check_max_rel_err_in_UR": 0.8586841172642885,
"assumed_rel_err_in_UR": 4.0,
"S0": 6.507241686137608,
"S_min": 2.4805672169974506e-07,
"D2_zero_entry_exact": true,
"D2_bound_rel_err_in_UR_max": 14.721715718973543,
"D2_decimal_check_n": 11,
"D2_decimal_check_max_rel_err_in_UR": 0.6464004385056876,
"D2_decimal_check_max_err_over_bound": 0.10773306846168695
},
"realizations": [
{
"seed": 2301,
"graph": {
"n_places": 411,
"n_edges": 588,
"mean_degree": 2.8613138686131387,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 88,
"smallest_margin": {
"pair": [
57,
58
],
"m": 3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
57,
58
],
"ci": [
9.0,
5.0
],
"cj": [
9.0,
10.0
],
"m": 3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581,
"is_edge": true
},
"n_nonedges": 83667,
"n_nonedges_certified_by_minimizing_witness": 83667,
"edge_check": {
"n_edges": 588,
"n_edges_certified": 588,
"n_edges_q_below_100": 0,
"min_q": {
"i": 57,
"j": 58,
"y": 33,
"ci": [
9.0,
5.0
],
"cj": [
9.0,
10.0
],
"cy": [
5.0,
7.0
],
"q": 8562889724.107581,
"T1": -0.8215846097437032,
"E1": 4.634277897681176e-15,
"T2": 3.6558442509715405e-05,
"E2": 4.269404802305276e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
8,
16
],
"n_pairs": 12424,
"mean_rho": 0.9460193404635407,
"bin_means": [
0.9427304152402262,
0.9457148517985611,
0.9468681004995907,
0.9485837475675928
],
"bin_counts": [
2863,
3299,
3286,
2976
],
"B": 1.0062089142693833,
"n_infinite": 0
}
},
{
"seed": 2302,
"graph": {
"n_places": 415,
"n_edges": 573,
"mean_degree": 2.76144578313253,
"max_degree": 4,
"asymmetric_decisions": 0,
"tie_pairs": 79,
"smallest_margin": {
"pair": [
63,
84
],
"m": -3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
63,
84
],
"ci": [
8.0,
43.0
],
"cj": [
11.0,
47.0
],
"m": -3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581,
"is_edge": false
},
"n_nonedges": 85332,
"n_nonedges_certified_by_minimizing_witness": 85332,
"edge_check": {
"n_edges": 573,
"n_edges_certified": 573,
"n_edges_q_below_100": 0,
"min_q": {
"i": 317,
"j": 318,
"y": 294,
"ci": [
48.0,
13.0
],
"cj": [
48.0,
18.0
],
"cy": [
44.0,
16.0
],
"q": 8562889724.107581,
"T1": 3.6558442509715405e-05,
"E1": 4.269404802305276e-15,
"T2": -0.8215846097437032,
"E2": 4.634277897681176e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
8,
16
],
"n_pairs": 12697,
"mean_rho": 0.9788517393940058,
"bin_means": [
0.9796391265281689,
0.9778870357085966,
0.9789886822993232,
0.9790006428982345
],
"bin_counts": [
3011,
3389,
3268,
3029
],
"B": 0.9993482460911937,
"n_infinite": 0
}
},
{
"seed": 2303,
"graph": {
"n_places": 479,
"n_edges": 682,
"mean_degree": 2.847599164926931,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 110,
"smallest_margin": {
"pair": [
206,
260
],
"m": 3.11269022112981e-06,
"Em": 1.5265480235341573e-15,
"ratio_margin_over_error": 2039038519.026429
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
206,
260
],
"ci": [
26.0,
62.0
],
"cj": [
34.0,
61.0
],
"m": 3.11269022112981e-06,
"Em": 1.5265480235341573e-15,
"ratio_margin_over_error": 2039038519.026429,
"is_edge": true
},
"n_nonedges": 113799,
"n_nonedges_certified_by_minimizing_witness": 113799,
"edge_check": {
"n_edges": 682,
"n_edges_certified": 682,
"n_edges_q_below_100": 0,
"min_q": {
"i": 206,
"j": 260,
"y": 250,
"ci": [
26.0,
62.0
],
"cj": [
34.0,
61.0
],
"cy": [
33.0,
58.0
],
"q": 2039038519.026429,
"T1": 3.11269022112981e-06,
"E1": 1.5265480235341573e-15,
"T2": -6.309243655458995,
"E2": 4.328416435550604e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
8,
16
],
"n_pairs": 16665,
"mean_rho": 0.9917986729098381,
"bin_means": [
0.9908418721790643,
0.9863659065417542,
0.9923871402015694,
0.998036380289115
],
"bin_counts": [
3788,
4401,
4485,
3991
],
"B": 1.007261005324925,
"n_infinite": 0
}
},
{
"seed": 2304,
"graph": {
"n_places": 400,
"n_edges": 551,
"mean_degree": 2.755,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 67,
"smallest_margin": {
"pair": [
6,
372
],
"m": 3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
6,
372
],
"ci": [
1.0,
28.0
],
"cj": [
60.0,
28.0
],
"m": 3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581,
"is_edge": true
},
"n_nonedges": 79249,
"n_nonedges_certified_by_minimizing_witness": 79249,
"edge_check": {
"n_edges": 551,
"n_edges_certified": 551,
"n_edges_q_below_100": 0,
"min_q": {
"i": 6,
"j": 372,
"y": 381,
"ci": [
1.0,
28.0
],
"cj": [
60.0,
28.0
],
"cy": [
61.0,
25.0
],
"q": 8562889724.107581,
"T1": 3.6558442509715405e-05,
"E1": 4.269404802305276e-15,
"T2": -3.221044740881789,
"E2": 5.699852251385017e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
8,
16
],
"n_pairs": 11715,
"mean_rho": 0.9711786717770876,
"bin_means": [
0.966778465541751,
0.9733962975167957,
0.9683822129876506,
0.9761813796794517
],
"bin_counts": [
2726,
3153,
3102,
2734
],
"B": 1.0097260277021496,
"n_infinite": 0
}
},
{
"seed": 2305,
"graph": {
"n_places": 429,
"n_edges": 606,
"mean_degree": 2.825174825174825,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 90,
"smallest_margin": {
"pair": [
59,
84
],
"m": 3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
59,
84
],
"ci": [
9.0,
63.0
],
"cj": [
14.0,
63.0
],
"m": 3.6558442509715405e-05,
"Em": 4.269404802305276e-15,
"ratio_margin_over_error": 8562889724.107581,
"is_edge": true
},
"n_nonedges": 91200,
"n_nonedges_certified_by_minimizing_witness": 91200,
"edge_check": {
"n_edges": 606,
"n_edges_certified": 606,
"n_edges_q_below_100": 0,
"min_q": {
"i": 59,
"j": 84,
"y": 66,
"ci": [
9.0,
63.0
],
"cj": [
14.0,
63.0
],
"cy": [
11.0,
3.0
],
"q": 8562889724.107581,
"T1": -0.8215846097437032,
"E1": 4.634277897681176e-15,
"T2": 3.6558442509715405e-05,
"E2": 4.269404802305276e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
8,
16
],
"n_pairs": 13544,
"mean_rho": 0.9664982471326504,
"bin_means": [
0.9601288352475,
0.9658519757558744,
0.9696572684412685,
0.9699263356158497
],
"bin_counts": [
3144,
3601,
3549,
3250
],
"B": 1.0102043600907207,
"n_infinite": 0
}
}
],
"B_values": [
1.0062089142693833,
0.9993482460911937,
1.007261005324925,
1.0097260277021496,
1.0102043600907207
],
"B_mean": 1.0065497106956744,
"SE": 0.0019484433097950006
},
"128": {
"table_checks": {
"n_entries": 2145,
"all_values_distinct": true,
"n_coinciding_values": 0,
"coinciding_entries_first10": [],
"min_rel_gap_between_distinct_values": 1.5148984368889734e-08,
"decimal_check_max_rel_err_in_UR": 0.9983057811893657,
"assumed_rel_err_in_UR": 4.0,
"S0": 6.5072416861384035,
"S_min": 1.0648636812575773e-16,
"D2_zero_entry_exact": true,
"D2_bound_rel_err_in_UR_max": 14.721715718973648,
"D2_decimal_check_n": 11,
"D2_decimal_check_max_rel_err_in_UR": 0.9642254824874824,
"D2_decimal_check_max_err_over_bound": 0.1555409056986756
},
"realizations": [
{
"seed": 2311,
"graph": {
"n_places": 1629,
"n_edges": 2285,
"mean_degree": 2.805402087170043,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 316,
"smallest_margin": {
"pair": [
357,
450
],
"m": 3.1126383734925156e-06,
"Em": 1.5265480234623767e-15,
"ratio_margin_over_error": 2039004555.1483626
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
583,
1393
],
"ci": [
45.0,
57.0
],
"cj": [
109.0,
122.0
],
"m": -9.609494985967251e-08,
"Em": 4.267473055415762e-23,
"ratio_margin_over_error": 2251799803111126.8,
"is_edge": false
},
"n_nonedges": 1323721,
"n_nonedges_certified_by_minimizing_witness": 1323721,
"edge_check": {
"n_edges": 2285,
"n_edges_certified": 2285,
"n_edges_q_below_100": 0,
"min_q": {
"i": 357,
"j": 450,
"y": 371,
"ci": [
28.0,
29.0
],
"cj": [
36.0,
30.0
],
"cy": [
29.0,
34.0
],
"q": 2039004555.1483626,
"T1": -2.9443099995139534,
"E1": 2.8340857069892826e-15,
"T2": 3.1126383734925156e-06,
"E2": 1.5265480234623767e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
16,
32
],
"n_pairs": 195144,
"mean_rho": 0.9215186098864104,
"bin_means": [
0.9216350496638491,
0.9214324802760249,
0.921224042265163,
0.9217996493435446
],
"bin_counts": [
47772,
49724,
49900,
47748
],
"B": 1.0001785952907885,
"n_infinite": 0
}
},
{
"seed": 2312,
"graph": {
"n_places": 1707,
"n_edges": 2430,
"mean_degree": 2.8471001757469243,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 388,
"smallest_margin": {
"pair": [
258,
353
],
"m": 8.01097552427521e-06,
"Em": 2.166848349609347e-15,
"ratio_margin_over_error": 3697063306.585105
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
664,
1513
],
"ci": [
50.0,
98.0
],
"cj": [
113.0,
33.0
],
"m": -9.807544995562651e-08,
"Em": 4.355424928885374e-23,
"ratio_margin_over_error": 2251799802705488.2,
"is_edge": false
},
"n_nonedges": 1453641,
"n_nonedges_certified_by_minimizing_witness": 1453641,
"edge_check": {
"n_edges": 2430,
"n_edges_certified": 2430,
"n_edges_q_below_100": 0,
"min_q": {
"i": 258,
"j": 353,
"y": 295,
"ci": [
19.0,
18.0
],
"cj": [
26.0,
19.0
],
"cy": [
21.0,
14.0
],
"q": 3697063306.585105,
"T1": -3.1888669976944524,
"E1": 3.582993332520208e-15,
"T2": 8.01097552427521e-06,
"E2": 2.166848349609347e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
16,
32
],
"n_pairs": 215166,
"mean_rho": 0.9198327318065592,
"bin_means": [
0.917997656209916,
0.9188635290320423,
0.9199488795259653,
0.9225852723628906
],
"bin_counts": [
53445,
54659,
54484,
52578
],
"B": 1.0049974159758917,
"n_infinite": 0
}
},
{
"seed": 2313,
"graph": {
"n_places": 1655,
"n_edges": 2330,
"mean_degree": 2.8157099697885197,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 344,
"smallest_margin": {
"pair": [
1038,
1098
],
"m": -8.01097552427521e-06,
"Em": 2.166848349609347e-15,
"ratio_margin_over_error": 3697063306.585105
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
151,
1006
],
"ci": [
13.0,
12.0
],
"cj": [
76.0,
76.0
],
"m": -9.609494985967251e-08,
"Em": 4.267473055415762e-23,
"ratio_margin_over_error": 2251799803111126.8,
"is_edge": false
},
"n_nonedges": 1366355,
"n_nonedges_certified_by_minimizing_witness": 1366355,
"edge_check": {
"n_edges": 2330,
"n_edges_certified": 2330,
"n_edges_q_below_100": 0,
"min_q": {
"i": 354,
"j": 355,
"y": 314,
"ci": [
27.0,
97.0
],
"cj": [
27.0,
102.0
],
"cy": [
24.0,
98.0
],
"q": 8562888440.557144,
"T1": -3.2210447408924097,
"E1": 5.699852251379773e-15,
"T2": 3.6558437029654556e-05,
"E2": 4.269404802297749e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
16,
32
],
"n_pairs": 202230,
"mean_rho": 0.9282036560331791,
"bin_means": [
0.9318728151487703,
0.9290984218007807,
0.9264249856606768,
0.925383025711179
],
"bin_counts": [
50212,
51419,
51354,
49245
],
"B": 0.993035756240453,
"n_infinite": 0
}
},
{
"seed": 2314,
"graph": {
"n_places": 1706,
"n_edges": 2388,
"mean_degree": 2.799531066822978,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 317,
"smallest_margin": {
"pair": [
23,
1650
],
"m": 3.6558437029654556e-05,
"Em": 4.269404802297749e-15,
"ratio_margin_over_error": 8562888440.557144
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
776,
1598
],
"ci": [
57.0,
13.0
],
"cj": [
121.0,
78.0
],
"m": -9.609494985967251e-08,
"Em": 4.267473055415762e-23,
"ratio_margin_over_error": 2251799803111126.8,
"is_edge": false
},
"n_nonedges": 1451977,
"n_nonedges_certified_by_minimizing_witness": 1451977,
"edge_check": {
"n_edges": 2388,
"n_edges_certified": 2388,
"n_edges_q_below_100": 0,
"min_q": {
"i": 23,
"j": 1650,
"y": 13,
"ci": [
1.0,
67.0
],
"cj": [
124.0,
67.0
],
"cy": [
0.0,
64.0
],
"q": 8562888440.557144,
"T1": -3.2210447408924097,
"E1": 5.699852251379773e-15,
"T2": 3.6558437029654556e-05,
"E2": 4.269404802297749e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
16,
32
],
"n_pairs": 214125,
"mean_rho": 0.9227888640298961,
"bin_means": [
0.9222288044269621,
0.9216163484759132,
0.9227588975791122,
0.9246124807940338
],
"bin_counts": [
52794,
54640,
54451,
52240
],
"B": 1.0025846908658995,
"n_infinite": 0
}
},
{
"seed": 2315,
"graph": {
"n_places": 1624,
"n_edges": 2286,
"mean_degree": 2.815270935960591,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 333,
"smallest_margin": {
"pair": [
472,
483
],
"m": 8.01097552427521e-06,
"Em": 2.166848349609347e-15,
"ratio_margin_over_error": 3697063306.585105
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
151,
1012
],
"ci": [
13.0,
30.0
],
"cj": [
78.0,
94.0
],
"m": -9.463698810702544e-08,
"Em": 4.202726547143297e-23,
"ratio_margin_over_error": 2251799802948223.5,
"is_edge": false
},
"n_nonedges": 1315590,
"n_nonedges_certified_by_minimizing_witness": 1315590,
"edge_check": {
"n_edges": 2286,
"n_edges_certified": 2286,
"n_edges_q_below_100": 0,
"min_q": {
"i": 472,
"j": 483,
"y": 550,
"ci": [
37.0,
7.0
],
"cj": [
38.0,
0.0
],
"cy": [
43.0,
5.0
],
"q": 3697063306.585105,
"T1": -0.7050150436738054,
"E1": 2.479941480874645e-15,
"T2": 8.01097552427521e-06,
"E2": 2.166848349609347e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
},
"components": 1
},
"window": {
"r_window": [
16,
32
],
"n_pairs": 193922,
"mean_rho": 0.9224337953413012,
"bin_means": [
0.9247303089330606,
0.9224006223667681,
0.9208096920594931,
0.9218632801694084
],
"bin_counts": [
47464,
49542,
49418,
47498
],
"B": 0.9968996055001591,
"n_infinite": 0
}
}
],
"B_values": [
1.0001785952907885,
1.0049974159758917,
0.993035756240453,
1.0025846908658995,
0.9968996055001591
],
"B_mean": 0.9995392127746383,
"SE": 0.002106397427457641
}
},
"decision_L128": "isotropy supported",
"margin_audit": {
"n_graphs": 10,
"smallest_abs_margin": {
"graph": "L128_seed2315",
"pair": [
151,
1012
],
"ci": [
13.0,
30.0
],
"cj": [
78.0,
94.0
],
"m": -9.463698810702544e-08,
"Em": 4.202726547143297e-23,
"ratio_margin_over_error": 2251799802948223.5,
"is_edge": false
},
"smallest_ratio": {
"graph": "L128_seed2311",
"pair": [
357,
450
],
"m": 3.1126383734925156e-06,
"Em": 1.5265480234623767e-15,
"ratio_margin_over_error": 2039004555.1483626
},
"smallest_edge_q": {
"graph": "L128_seed2311",
"i": 357,
"j": 450,
"y": 371,
"ci": [
28.0,
29.0
],
"cj": [
36.0,
30.0
],
"cy": [
29.0,
34.0
],
"q": 2039004555.1483626,
"T1": -2.9443099995139534,
"E1": 2.8340857069892826e-15,
"T2": 3.1126383734925156e-06,
"E2": 1.5265480234623767e-15
},
"total_edges": 14719,
"total_edges_certified": 14719,
"total_edges_q_below_100": 0,
"total_nonedges": 7364531,
"total_nonedges_certified": 7364531,
"all_recomputed_T_reproduce_m": true
},
"part": "T2",
"runtime_s": 147.09149400005117
}output/T3.json18 KB · raw
{
"L": 128,
"seed_places": 2311,
"seed_noise": 2321,
"n_places": 1629,
"validation": {
"max_B_err_over_estimate": 0.019715447737116528,
"max_G_err_over_estimate": 0.001220703125,
"n_samples": 326,
"estimate_B": "sqrt(N)*UR*sum|terms|",
"estimate_G": "sqrt(N)*UR"
},
"rows": [
{
"eps": 0.0,
"a_new_edges": 0,
"removed_edges": 0,
"removed_edges_that_are_eps0_tie_pairs": 0,
"sym_diff_vs_eps_1e12": null,
"b_long_edges": 0,
"c_max_degree": 5,
"d_mean_rho": 0.9215186098864104,
"d_ratio": 1.0,
"components": 1,
"graph": {
"n_places": 1629,
"n_edges": 2285,
"mean_degree": 2.805402087170043,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 316,
"smallest_margin": {
"pair": [
357,
450
],
"m": 3.1126383734925156e-06,
"Em": 1.5265480234623767e-15,
"ratio_margin_over_error": 2039004555.1483626
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
583,
1393
],
"ci": [
45.0,
57.0
],
"cj": [
109.0,
122.0
],
"m": -9.609494985967251e-08,
"Em": 4.267473055415762e-23,
"ratio_margin_over_error": 2251799803111126.8,
"is_edge": false
},
"n_nonedges": 1323721,
"n_nonedges_certified_by_minimizing_witness": 1323721,
"edge_check": {
"n_edges": 2285,
"n_edges_certified": 2285,
"n_edges_q_below_100": 0,
"min_q": {
"i": 357,
"j": 450,
"y": 371,
"ci": [
28.0,
29.0
],
"cj": [
36.0,
30.0
],
"cy": [
29.0,
34.0
],
"q": 2039004555.1483626,
"T1": -2.9443099995139534,
"E1": 2.8340857069892826e-15,
"T2": 3.1126383734925156e-06,
"E2": 1.5265480234623767e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
}
},
"n_window_pairs": 195144,
"e_shortest_long_edge": null,
"runtime_s": 21.762508500134572
},
{
"eps": 1e-12,
"a_new_edges": 0,
"removed_edges": 175,
"removed_edges_that_are_eps0_tie_pairs": 175,
"sym_diff_vs_eps_1e12": 0,
"b_long_edges": 0,
"c_max_degree": 4,
"d_mean_rho": 0.9597198589422564,
"d_ratio": 1.0414546691146638,
"components": 1,
"graph": {
"n_places": 1629,
"n_edges": 2110,
"mean_degree": 2.590546347452425,
"max_degree": 4,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
357,
450
],
"m": 3.1126383812602287e-06,
"Em": 1.5265480234890978e-15,
"ratio_margin_over_error": 2039004560.2010884
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
1007,
1035
],
"ci": [
80.0,
92.0
],
"cj": [
82.0,
91.0
],
"m": -6.9338182985558e-16,
"Em": 2.622749225464797e-26,
"ratio_margin_over_error": 26437214169.13966,
"is_edge": false
},
"n_nonedges": 1323896,
"n_nonedges_certified_by_minimizing_witness": 1323896,
"edge_check": {
"n_edges": 2110,
"n_edges_certified": 2110,
"n_edges_q_below_100": 0,
"min_q": {
"i": 357,
"j": 450,
"y": 371,
"ci": [
28.0,
29.0
],
"cj": [
36.0,
30.0
],
"cy": [
29.0,
34.0
],
"q": 2039004560.2010884,
"T1": -2.944309999513984,
"E1": 2.834085707014805e-15,
"T2": 3.1126383812602287e-06,
"E2": 1.5265480234890978e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
}
},
"n_window_pairs": 195144,
"e_shortest_long_edge": null,
"runtime_s": 44.68810430006124
},
{
"eps": 1e-09,
"a_new_edges": 0,
"removed_edges": 175,
"removed_edges_that_are_eps0_tie_pairs": 175,
"sym_diff_vs_eps_1e12": 0,
"b_long_edges": 0,
"c_max_degree": 4,
"d_mean_rho": 0.9597198589420575,
"d_ratio": 1.0414546691144477,
"components": 1,
"graph": {
"n_places": 1629,
"n_edges": 2110,
"mean_degree": 2.590546347452425,
"max_degree": 4,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
357,
450
],
"m": 3.1126461412054445e-06,
"Em": 1.5265480501836536e-15,
"ratio_margin_over_error": 2039009607.873773
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
1007,
1035
],
"ci": [
80.0,
92.0
],
"cj": [
82.0,
91.0
],
"m": -6.93381826025062e-13,
"Em": 2.6227492339829533e-23,
"ratio_margin_over_error": 26437213937.22724,
"is_edge": false
},
"n_nonedges": 1323896,
"n_nonedges_certified_by_minimizing_witness": 1323896,
"edge_check": {
"n_edges": 2110,
"n_edges_certified": 2110,
"n_edges_q_below_100": 0,
"min_q": {
"i": 357,
"j": 450,
"y": 371,
"ci": [
28.0,
29.0
],
"cj": [
36.0,
30.0
],
"cy": [
29.0,
34.0
],
"q": 2039009607.873773,
"T1": -2.944309999544411,
"E1": 2.8340857325115354e-15,
"T2": 3.1126461412054445e-06,
"E2": 1.5265480501836536e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
}
},
"n_window_pairs": 195144,
"e_shortest_long_edge": null,
"runtime_s": 48.268230999819934
},
{
"eps": 1e-06,
"a_new_edges": 0,
"removed_edges": 175,
"removed_edges_that_are_eps0_tie_pairs": 175,
"sym_diff_vs_eps_1e12": 0,
"b_long_edges": 0,
"c_max_degree": 4,
"d_mean_rho": 0.9597198587434455,
"d_ratio": 1.041454668898921,
"components": 1,
"graph": {
"n_places": 1629,
"n_edges": 2110,
"mean_degree": 2.590546347452425,
"max_degree": 4,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
357,
450
],
"m": 3.120406084224294e-06,
"Em": 1.5265747448244258e-15,
"ratio_margin_over_error": 2044057190.6508107
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
1007,
1035
],
"ci": [
80.0,
92.0
],
"cj": [
82.0,
91.0
],
"m": -6.933779955075719e-10,
"Em": 2.6227577521393785e-20,
"ratio_margin_over_error": 26436982025.579174,
"is_edge": false
},
"n_nonedges": 1323896,
"n_nonedges_certified_by_minimizing_witness": 1323896,
"edge_check": {
"n_edges": 2110,
"n_edges_certified": 2110,
"n_edges_q_below_100": 0,
"min_q": {
"i": 357,
"j": 450,
"y": 371,
"ci": [
28.0,
29.0
],
"cj": [
36.0,
30.0
],
"cy": [
29.0,
34.0
],
"q": 2044057190.6508107,
"T1": -2.944310029971304,
"E1": 2.834111229327302e-15,
"T2": 3.120406084224294e-06,
"E2": 1.5265747448244258e-15
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
}
},
"n_window_pairs": 195144,
"e_shortest_long_edge": null,
"runtime_s": 49.585924400016665
},
{
"eps": 0.0001,
"a_new_edges": 61,
"removed_edges": 175,
"removed_edges_that_are_eps0_tie_pairs": 175,
"sym_diff_vs_eps_1e12": 61,
"b_long_edges": 61,
"c_max_degree": 5,
"d_mean_rho": 0.943559505667215,
"d_ratio": 1.0239180148337117,
"components": 1,
"graph": {
"n_places": 1629,
"n_edges": 2171,
"mean_degree": 2.665438919582566,
"max_degree": 5,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
604,
1537
],
"m": 2.4735145697463645e-09,
"Em": 2.8625025565855812e-18,
"ratio_margin_over_error": 864109121.5991069
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
604,
1537
],
"ci": [
47.0,
2.0
],
"cj": [
121.0,
76.0
],
"m": 2.4735145697463645e-09,
"Em": 2.8625025565855812e-18,
"ratio_margin_over_error": 864109121.5991069,
"is_edge": true
},
"n_nonedges": 1323835,
"n_nonedges_certified_by_minimizing_witness": 1323835,
"edge_check": {
"n_edges": 2171,
"n_edges_certified": 2171,
"n_edges_q_below_100": 0,
"min_q": {
"i": 604,
"j": 1537,
"y": 430,
"ci": [
47.0,
2.0
],
"cj": [
121.0,
76.0
],
"cy": [
35.0,
5.0
],
"q": 864109121.5991069,
"T1": -0.3312687496525936,
"E1": 1.4981806110665862e-16,
"T2": 2.4735145697463645e-09,
"E2": 2.8625025565855812e-18
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
}
},
"n_window_pairs": 195144,
"e_shortest_long_edge": {
"r": 66.40030120413611,
"d0": 3.607554920683681,
"ci": [
12,
55
],
"cj": [
52,
108
]
},
"long_edge_r_values": [
66.4003,
67.7791,
67.9779,
68.5055,
68.6222,
69.3181,
69.4262,
69.7782,
69.8928,
70.0928,
70.4344,
70.4557,
70.4911,
70.7107,
70.7672,
70.8308,
70.8378,
70.8378,
70.8378,
71.2811,
72.0069,
72.0069,
72.0694,
72.0694,
72.2011,
72.5603,
72.6705,
74.411,
74.6257,
74.6324,
74.9533,
75.1665,
75.7166,
75.7166,
76.0592,
76.3675,
76.6942,
76.844,
77.1038,
77.201,
77.4661,
78.2432,
78.7464,
78.7464,
78.7464,
79.196,
79.2023,
79.9062,
80.4301,
80.8084,
81.0555,
81.5659,
81.6884,
81.8352,
82.0731,
82.2192,
83.7377,
84.2912,
87.6812,
87.6812,
89.1067
],
"runtime_s": 50.77329639997333
},
{
"eps": 0.01,
"a_new_edges": 442,
"removed_edges": 187,
"removed_edges_that_are_eps0_tie_pairs": 175,
"sym_diff_vs_eps_1e12": 454,
"b_long_edges": 430,
"c_max_degree": 9,
"d_mean_rho": 0.7602284805556642,
"d_ratio": 0.8249735517000276,
"components": 1,
"graph": {
"n_places": 1629,
"n_edges": 2540,
"mean_degree": 3.118477593615715,
"max_degree": 9,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
828,
1578
],
"m": -3.502685734986216e-08,
"Em": 2.8798132765083376e-16,
"ratio_margin_over_error": 121628918.22045793
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
828,
1578
],
"ci": [
66.0,
3.0
],
"cj": [
124.0,
44.0
],
"m": -3.502685734986216e-08,
"Em": 2.8798132765083376e-16,
"ratio_margin_over_error": 121628918.22045793,
"is_edge": false
},
"n_nonedges": 1323466,
"n_nonedges_certified_by_minimizing_witness": 1323466,
"edge_check": {
"n_edges": 2540,
"n_edges_certified": 2540,
"n_edges_q_below_100": 0,
"min_q": {
"i": 918,
"j": 1578,
"y": 828,
"ci": [
72.0,
115.0
],
"cj": [
124.0,
44.0
],
"cy": [
66.0,
3.0
],
"q": 121628918.22045793,
"T1": -0.04481608319009373,
"E1": 3.052468598768435e-16,
"T2": 3.502685734986216e-08,
"E2": 2.8798132765083376e-16
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
}
},
"n_window_pairs": 195144,
"e_shortest_long_edge": {
"r": 46.04345773288535,
"d0": 3.6071936823181225,
"ci": [
2,
114
],
"cj": [
48,
112
]
},
"long_edge_r_values": [
46.0435,
46.7547,
46.8188,
47.0744,
47.634,
47.8017,
47.8539,
48.1041,
48.2701,
48.3011,
48.7647,
48.8262,
48.8262,
48.8365,
48.9183,
49.0306,
49.0408,
49.163,
49.163,
49.2443,
49.2443,
49.3964,
49.4773,
49.679,
49.7293,
49.7293,
49.7695,
50.0899,
50.1199,
50.2494,
50.4777,
50.4876,
50.5668,
50.5964,
50.6952,
50.774,
50.774,
50.8035,
50.8035,
50.9313,
50.9313,
51.0098,
51.0882,
51.1957,
51.2445,
51.2445,
51.2445,
51.2445,
51.3128,
51.3128,
51.3517,
51.4296,
51.4782,
51.614,
51.6236,
51.6236,
51.6236,
51.6624,
51.7397,
51.8845,
51.8845,
51.8941,
51.9711,
52.0096,
52.0865,
52.2015,
52.2015,
52.345,
52.345,
52.345,
52.345,
52.3546,
52.3546,
52.3927,
52.3927,
52.4976,
52.5547,
52.6308,
52.6308,
53.0377,
53.1601,
53.6004,
53.6004,
53.6004,
53.6004,
53.7587,
53.9351,
54.0093,
54.037,
54.037,
54.1202,
54.1479,
54.2033,
54.231,
54.231,
54.4243,
54.4885,
54.5894,
54.9181,
54.9181,
55.0,
55.0091,
55.0727,
55.0818,
55.0818,
55.109,
55.2268,
55.2268,
55.3173,
55.3173,
55.3624,
55.4707,
55.4707,
55.5428,
55.5428,
55.6058,
55.6597,
55.7136,
55.7315,
55.7853,
55.9017,
55.9017,
55.9732,
55.9732,
56.0089,
56.0803,
56.0892,
56.0892,
56.1427,
56.3028,
56.356,
56.5155,
56.5155,
56.7186,
56.8507,
56.8859,
57.0789,
57.3149,
57.3847,
57.4282,
57.5847,
57.6281,
57.6975,
57.6975,
57.8014,
57.8705,
57.9741,
57.9828,
57.9828,
58.0345,
58.0775,
58.1378,
58.1808,
58.4209,
58.5235,
58.6003,
58.6003,
58.6686,
58.8218,
58.8303,
58.8727,
59.0,
59.0339,
59.0339,
59.1354,
59.1692,
59.4138,
59.4138,
59.5399,
59.5483,
59.6154,
59.6657,
59.6657,
59.6825,
59.6825,
59.7746,
59.808,
59.8164,
59.9083,
59.9083,
60.0,
60.0083,
60.1664,
60.208,
60.208,
60.2163,
60.3738,
60.3738,
60.407,
60.4649,
60.8769,
60.959,
61.0328,
61.0983,
61.0983,
61.131,
61.131,
61.131,
61.131,
61.131
],
"runtime_s": 49.93682619999163
}
],
"decision": "intermediate",
"margin_audit": {
"n_graphs": 6,
"smallest_abs_margin": {
"graph": "eps=1e-12",
"pair": [
1007,
1035
],
"ci": [
80.0,
92.0
],
"cj": [
82.0,
91.0
],
"m": -6.9338182985558e-16,
"Em": 2.622749225464797e-26,
"ratio_margin_over_error": 26437214169.13966,
"is_edge": false
},
"smallest_ratio": {
"graph": "eps=0.01",
"pair": [
828,
1578
],
"m": -3.502685734986216e-08,
"Em": 2.8798132765083376e-16,
"ratio_margin_over_error": 121628918.22045793
},
"smallest_edge_q": {
"graph": "eps=0.01",
"i": 918,
"j": 1578,
"y": 828,
"ci": [
72.0,
115.0
],
"cj": [
124.0,
44.0
],
"cy": [
66.0,
3.0
],
"q": 121628918.22045793,
"T1": -0.04481608319009373,
"E1": 3.052468598768435e-16,
"T2": 3.502685734986216e-08,
"E2": 2.8798132765083376e-16
},
"total_edges": 13326,
"total_edges_certified": 13326,
"total_edges_q_below_100": 0,
"total_nonedges": 7942710,
"total_nonedges_certified": 7942710,
"all_recomputed_T_reproduce_m": true
},
"margin_audit_eps_positive": {
"n_graphs": 5,
"smallest_abs_margin": {
"graph": "eps=1e-12",
"pair": [
1007,
1035
],
"ci": [
80.0,
92.0
],
"cj": [
82.0,
91.0
],
"m": -6.9338182985558e-16,
"Em": 2.622749225464797e-26,
"ratio_margin_over_error": 26437214169.13966,
"is_edge": false
},
"smallest_ratio": {
"graph": "eps=0.01",
"pair": [
828,
1578
],
"m": -3.502685734986216e-08,
"Em": 2.8798132765083376e-16,
"ratio_margin_over_error": 121628918.22045793
},
"smallest_edge_q": {
"graph": "eps=0.01",
"i": 918,
"j": 1578,
"y": 828,
"ci": [
72.0,
115.0
],
"cj": [
124.0,
44.0
],
"cy": [
66.0,
3.0
],
"q": 121628918.22045793,
"T1": -0.04481608319009373,
"E1": 3.052468598768435e-16,
"T2": 3.502685734986216e-08,
"E2": 2.8798132765083376e-16
},
"total_edges": 11041,
"total_edges_certified": 11041,
"total_edges_q_below_100": 0,
"total_nonedges": 6618989,
"total_nonedges_certified": 6618989,
"all_recomputed_T_reproduce_m": true
},
"part": "T3",
"runtime_s": 278.9729285000358
}output/T4.json2 KB · raw
{
"L": 128,
"seed_places": 2311,
"seed_offsets": 2331,
"n_places": 1629,
"norms": {
"S0_unshifted": 6.5072416861384035,
"min": 6.219237598788461,
"max": 6.49757961486408,
"spread": 0.27834201607561865
},
"validation": {
"max_S_rel_err_in_UR_blas_vs_fsum": 18.43777572496995,
"assumed_rel_err_in_UR": 176.9619407771256
},
"graph": {
"n_places": 1629,
"n_edges": 2116,
"mean_degree": 2.597912829957029,
"max_degree": 7,
"asymmetric_decisions": 0,
"tie_pairs": 0,
"smallest_margin": {
"pair": [
631,
829
],
"m": -5.3498823905591265e-06,
"Em": 7.218990448638643e-14,
"ratio_margin_over_error": 74108456.41952619
},
"pairs_ratio_below_100": 0,
"flagged_pairs": [],
"smallest_abs_margin": {
"pair": [
631,
829
],
"ci": [
49.50078092233556,
56.50710746035213
],
"cj": [
66.52116497780501,
11.476298147398479
],
"m": -5.3498823905591265e-06,
"Em": 7.218990448638643e-14,
"ratio_margin_over_error": 74108456.41952619,
"is_edge": false
},
"n_nonedges": 1323890,
"n_nonedges_certified_by_minimizing_witness": 1323890,
"edge_check": {
"n_edges": 2116,
"n_edges_certified": 2116,
"n_edges_q_below_100": 0,
"min_q": {
"i": 777,
"j": 829,
"y": 631,
"ci": [
61.50310461759389,
76.50522469838515
],
"cj": [
66.52116497780501,
11.476298147398479
],
"cy": [
49.50078092233556,
56.50710746035213
],
"q": 74108456.41952619,
"T1": -0.003516344953957766,
"E1": 7.22532252301457e-14,
"T2": 5.3498823905591265e-06,
"E2": 7.218990448638643e-14
},
"n_edges_q_infinite": 0,
"uncertified_edges": [],
"edges_q_below_100": [],
"recomputed_T_reproduce_m": true
}
},
"components": 1,
"b_long_edges": 4,
"c_max_degree": 7,
"d_mean_rho": 0.9061720647813754,
"d_ratio_to_T3_eps0": 0.9833464620894343,
"ratio_to_T3_eps_1e12": 0.9442047659408672,
"T3_eps0_mean_rho": 0.9215186098864104,
"n_window_pairs": 194958,
"long_edge_r_quantiles": [
46.47975228545564,
58.99796118724129,
63.38139903849702,
67.83806784253485,
80.57596960266682
],
"part": "T4",
"runtime_s": 57.843096600146964
}output/compare_v1.json466 B · raw
{
"T1": {
"n_leaves_compared": 33,
"n_differences": 0,
"differences": []
},
"T1b": {
"n_leaves_compared": 41,
"n_differences": 0,
"differences": []
},
"T2": {
"n_leaves_compared": 312,
"n_differences": 0,
"differences": []
},
"T3": {
"n_leaves_compared": 426,
"n_differences": 0,
"differences": []
},
"T4": {
"n_leaves_compared": 36,
"n_differences": 0,
"differences": []
},
"all_identical": true
}