from collections import Counter #!/usr/bin/env python3 """ Standalone Verifier for 23 Disproved Conjectures, Infinite Counterexample Families, & 6 Proved Theorems in Written on the Wall II (Conjectures #341, #401b, #413a, #413b, #415a, #415b, #415c, #420b, #420c, #422b, #422d, #425d, #427, #430a, #430b, #430c, #431a, #431b, #431c, #439, #442, #443b, #444; Proved Theorems #438a, #438b, #446, #448a, #449, and #450). Author: Gemini 4 Argon (Dec 1, 2026) Verifies minimal graph6 witnesses and infinite counterexample families with exact definitions from source/wow2_open.html and source/wow2_defs.json: 1. Conjecture 341 (#341, Trees, Defs 94, 89, 65): gamma_t(T) <= ceil(A(T)) * sigma(T) Counterexample: P_6 ('EhCG', n=6, m=5), gamma_t = 4 > 3 * 1 = 3. 2. Conjecture 401b (#401b, 2-Domination, Defs 90, 79, 51): gamma_2(G) <= floor(3 * Tdist_max / freq[T_max(v)]) - Unique minimum-order counterexample with T_max >= 1 (n=8): complement of Q_3 ('GQzTrg', n=8, m=16), T(v)=3 for all 8 vertices, Tdist_max = 10, gamma_2 = 4 > floor(30/8) = 3. - Constant-T(v)=1 counterexample (n=12): C_4 of triangles ('K{CW_CB__?_B', n=12, m=16), T(v)=1 for all 12 vertices, Tdist_max = 29, gamma_2 = 8 > floor(87/12) = 7. - Unbounded-gap infinite family H_t (star of t >= 5 triangles, n=3t): T(v)=1 for all 3t vertices, Tdist_max = 11t - 12, gamma_2(H_t) = 2t -> infinity while RHS = floor(11 - 12/t) <= 10. 3. Conjecture 413a (#413a, Critical Independence Union H, Defs 105, 88, 100, 5, 2): |H| >= kappa(G) * alpha(G[V \ A]) + mu(G[N(N(P))]) Counterexample family: K_{a,b} with 2 <= a < b < a^2. Minimal witness: K_{2,3} ('DFw', n=5, m=6), |H| = 3 < 2 * 2 + 0 = 4. 4. Conjecture 413b (#413b, Critical Independence Union H, Defs 105, 88, 100, 46, 117): |H| >= kappa(G) * c_L(G[N(A_2) \ A_2]) + |P| - Minimal witness (kappa=1): 'DEk' (n=5, m=5), |H| = 3 < 1 * 2 + 2 = 4. - Minimal 2-connected witness (kappa=2, |P|=0): K_2 vee bar(K_3) ('DF{', n=5, m=7), |H| = 3 < 2 * 2 + 0 = 4. 5. Conjecture 415a (#415a, Critical Independence Union H, Defs 105, 116, 115): |H| >= (peN(A_2) - 1) * isolates(G[N(A_2)]) Counterexample family: 1-subdivided star T_k = S(K_{1,k}) for all k >= 3 (n=2k+1), where |H| = k + 1 while RHS = (k - 1)(k + 1) = k^2 - 1. Minimal witness (k=3): S(K_{1,3}) ('FCOf?', n=7, m=6), |H| = 4 < (3 - 1) * 4 = 8. 6. Conjectures 415b & 415c (#415b, #415c, Critical Independence Union H, Defs 105, 116, 115): #415b: |H| >= (peN(A_2) - 1) * isolates(G[B_2]) #415c: |H| >= (peN(B_2) - 1) * isolates(G[B_2]) Minimal witness: 'ECfo' (n=6, m=7), where H = {1,2} (|H|=2), A_2 = {4}, B_2 = {1,2,4} (independent of size 3), and peN(A_2) = peN(B_2) = 2, giving |H| = 2 < (2 - 1) * 3 = 3 for both #415b and #415c. 7. Conjecture 427 (#427, Independent Domination i(G), Defs 7, 46, 5, 12): i(G) <= |E(C, V \ C)| + floor((2/3) * |E(G[V \ N(P)])|) - Unique min-order witness under C = center(G), P = pendants (n=8): Tree 'G?`DB_' (n=8, m=7), i(G) = 3 > 2 + floor(2/3 * 1) = 2. - Simultaneous tree witness under both C = center(G) and C = M (n=11): Tree 'J???C@_e?l?' (n=11, m=10), i(G) = 5 > max(2, 4) = 4. - Unbounded-gap caterpillar tree family T_k (n = 2k + 5, k >= 4): V \ N(P) = P is independent (0 internal edges), |E(C, V \ C)| <= 4, |E(M, V \ M)| = 4, and i(T_k) = k + 1 -> infinity while RHS <= 4. 8. Conjecture 430c (#430c, Independent Domination i(G)): i(G) <= l_max(G) * residue(G^2) + Delta(G[M]) - Modified Rook's Graph family R_k = (K_k [] K_k) + {z_1, z_2} (n = k^2 + 2, k >= 3): R_k is claw-free (l_max = 2), diameter 2 (residue(G^2) = 1), and has a unique maximum-degree vertex M = {(0,0)} (Delta(G[M]) = 0), so RHS = 2 * 1 + 0 = 2 for all k >= 3 while i(R_k) = k -> infinity. - Minimal witness (k=3, n=11): 'J{S{aSfwCc_', i(R_3) = 3 > 2. 9. Conjecture 430b (#430b, Independent Domination i(G)): i(G) <= alpha(G[N(C)]) * residue(G^2) + isolates(G[V \ M]) - Unique-Center Rook's Graph family tilde(R)_k = (K_k [] K_k) + {z_1,a_1,b_1, z_2,a_2,b_2} (n = k^2 + 6, k >= 6): (0,0) is both the unique center vertex (C = {(0,0)}, rad = 2) and the unique max-degree vertex (M = {(0,0)}). N(C) is a disjoint union of two k-cliques (alpha(G[N(C)]) = 2), residue(G^2) = 3, isolates(G[V \ M]) = 0, so RHS = 2 * 3 + 0 = 6 for all k >= 3 while i(tilde(R)_k) = k + 1 -> infinity (7 > 6 at k=6, n=42). 10. Conjecture 431a (#431a, Independent Domination i(G)): i(G) <= residue(G) + peN(N(D)) + |T_min(G)| (D = degree-2 vertices) - Complete Tripartite Plus Leaf family K_{m,m,m}^+ (n = 3m + 1, m >= 5): residue = 3, D = empty (peN(N(D)) = 0), and the leaf v_0 is the unique vertex in 0 triangles (|T_min(G)| = |{v_0}| = 1), so RHS = 3 + 0 + 1 = 4 for all m >= 3 while i(K_{m,m,m}^+) = m -> infinity (5 > 4 at m=5, n=16). 11. Conjecture 431b (#431b, Independent Domination i(G)): i(G) <= residue(G) + gamma(G[N[A]]) * peN(N(D)) + dp(G) - Bipartite Twin-Leaf family G_m = K_{m,m} + {x_1 p_1, x_2 p_2} (n = 2m + 2, m >= 4): Per(G_m) = {p_1, p_2} with dist(p_1, p_2) = 4 != 2 (dp(G_m) = 0), residue(G_m) = 3, gamma(G_m[N[A]]) = 2. Moreover, for EVERY automorphism-invariant vertex set D, |N(D) cap X| in {0, 2, m} and |N(D) cap Y| in {0, m}, so peN(N(D)) <= 2 (and peN(N(D_2)) = 0 for degree-2 vertices D_2 = empty). Thus RHS <= 3 (for D = D_2) and RHS <= 7 (for ALL automorphism-invariant D), while i(G_m) = m -> infinity! 12. Conjecture 431c (#431c, Independent Domination i(G)): i(G) <= residue(G) * |T_max(v)| + dd(G) - Bowtie-on-K_{m,m} family G_m^{bowtie} = K_{m,m} + {z x_1, z x_2, z y_1, z y_2} (n = 2m + 1, m >= 7, witness 'N???F~}~f{^o~_~_WK?' at m=7, n=15): z is the unique vertex in 4 triangles (|T_max(v)| = |{z}| = 1), residue <= 3, dd = 3, and i(G_m^{bowtie}) = m - 1 -> infinity while RHS <= 3 * 1 + 3 = 6 (and under T_max(v) = max_v T(v) = 1, K_{m,m}^triangle has RHS = 6 while i = m -> infinity). """ import math from itertools import combinations import networkx as nx def to_g6(G): return nx.to_graph6_bytes(G, header=False).decode("ascii").strip() def gamma_t_tree_adj(adj, n): if n <= 1: return n parent = [-1] * n children = [[] for _ in range(n)] order = [0] visited = [False] * n visited[0] = True for u in order: for v in adj[u]: if not visited[v]: visited[v] = True parent[v] = u children[u].append(v) order.append(v) INF = 10**9 # States for subtree at u: # 0: u not in D, u dominated by at least one child in D # 1: u in D, u dominated by at least one child in D # 2: u in D, u not dominated by any child (needs parent in D) # 3: u not in D, u not dominated by any child (needs parent in D) dp = [[INF]*4 for _ in range(n)] for u in reversed(order): ch = children[u] if not ch: dp[u] = [INF, INF, 1, 0] continue s_01 = 0 min_d1 = INF s_min = 0 min_d12 = INF for c in ch: m01 = min(dp[c][0], dp[c][1]) s_01 += m01 min_d1 = min(min_d1, dp[c][1] - m01) m_all = min(dp[c]) s_min += m_all min_d12 = min(min_d12, min(dp[c][1], dp[c][2]) - m_all) dp[u][0] = s_01 + min_d1 dp[u][1] = 1 + s_min + min_d12 dp[u][2] = 1 + s_min dp[u][3] = s_01 return min(dp[0][0], dp[0][1]) def gamma_tree_adj(adj, n): if n <= 1: return n parent = [-1] * n children = [[] for _ in range(n)] order = [0] visited = [False] * n visited[0] = True for u in order: for v in adj[u]: if not visited[v]: visited[v] = True parent[v] = u children[u].append(v) order.append(v) INF = 10**9 dp = [[INF]*3 for _ in range(n)] for u in reversed(order): ch = children[u] if not ch: dp[u] = [1, INF, 0] continue s_all = 0 s_01 = 0 min_d0 = INF for c in ch: s_all += min(dp[c]) m01 = min(dp[c][0], dp[c][1]) s_01 += m01 min_d0 = min(min_d0, dp[c][0] - m01) dp[u][0] = 1 + s_all dp[u][1] = s_01 + min_d0 dp[u][2] = s_01 return min(dp[0][0], dp[0][1]) def total_domination_number(G): if nx.is_tree(G): nodes = list(G.nodes()) idx = {u: i for i, u in enumerate(nodes)} adj = [[idx[v] for v in G.neighbors(u)] for u in nodes] return gamma_t_tree_adj(adj, len(nodes)) n = G.number_of_nodes() nbr_mask = [0] * n for u in range(n): m = 0 for v in G.neighbors(u): m |= (1 << v) nbr_mask[u] = m full = (1 << n) - 1 for k in range(1, n + 1): for S in combinations(range(n), k): u_mask = 0 for v in S: u_mask |= nbr_mask[v] if u_mask == full: return k return n def domination_number(G): if nx.is_tree(G): nodes = list(G.nodes()) idx = {u: i for i, u in enumerate(nodes)} adj = [[idx[v] for v in G.neighbors(u)] for u in nodes] return gamma_tree_adj(adj, len(nodes)) n = G.number_of_nodes() if n == 0: return 0 closed_mask = [1 << u for u in range(n)] for u in range(n): for v in G.neighbors(u): closed_mask[u] |= (1 << v) full = (1 << n) - 1 for k in range(1, n + 1): for S in combinations(range(n), k): u_mask = 0 for v in S: u_mask |= closed_mask[v] if u_mask == full: return k return n def k_domination_number(G, k_dom=2): if k_dom != 2: n = G.number_of_nodes() adj = [set(G.neighbors(u)) for u in range(n)] for k in range(1, n + 1): for S in combinations(range(n), k): S_set = set(S) if all(len(adj[v] & S_set) >= k_dom for v in range(n) if v not in S_set): return k return n nodes = list(G.nodes()) n = len(nodes) if n == 0: return 0 idx = {u: i for i, u in enumerate(nodes)} adj = [[idx[v] for v in G.neighbors(u)] for u in nodes] closed_mask = [(1 << u) for u in range(n)] for u in range(n): for v in adj[u]: closed_mask[u] |= (1 << v) init_D = {u for u in range(n) if len(adj[u]) <= 1} init_cnt = [0] * n init_mask = 0 for u in init_D: init_mask |= (1 << u) for w in adj[u]: init_cnt[w] += 1 D_greedy = set(init_D) dom_cnt = list(init_cnt) while True: undom = [u for u in range(n) if u not in D_greedy and dom_cnt[u] < 2] if not undom: break best_u = max(range(n), key=lambda u: (0 if u in D_greedy else (sum(1 for w in adj[u] if w not in D_greedy and dom_cnt[w] < 2) + (2 if dom_cnt[u] < 2 else 0)))) D_greedy.add(best_u) for w in adj[best_u]: dom_cnt[w] += 1 best = [len(D_greedy)] def lower_bound(D_size, in_D_mask, cnt): used_mask = 0 lb = D_size unsat = [v for v in range(n) if not (in_D_mask & (1 << v)) and cnt[v] < 2] unsat.sort(key=lambda v: len(adj[v])) for v in unsat: cm = closed_mask[v] & ~in_D_mask if not (cm & used_mask): need = 2 - cnt[v] lb += 1 if need == 1 else (2 if any(w != v and closed_mask[w] == closed_mask[v] and not (in_D_mask & (1 << w)) for w in adj[v]) else 1) used_mask |= cm if lb >= best[0]: return lb return lb def solve(D_size, in_D_mask, forb_mask, cnt): if D_size >= best[0]: return if lower_bound(D_size, in_D_mask, cnt) >= best[0]: return best_v = -1 best_cands = None for v in range(n): if not (in_D_mask & (1 << v)) and cnt[v] < 2: avail_nb = [u for u in adj[v] if not ((in_D_mask | forb_mask) & (1 << u))] can_v = not (forb_mask & (1 << v)) if len(avail_nb) + cnt[v] < 2 and not can_v: return if len(avail_nb) + cnt[v] < 2: cands = [v] else: cands = ([v] if can_v else []) + avail_nb if best_v == -1 or len(cands) < len(best_cands): best_v = v best_cands = cands if len(cands) <= 1: break if best_v == -1: best[0] = D_size return if not best_cands: return best_cands.sort(key=lambda u: sum(1 for w in adj[u] if not (in_D_mask & (1 << w)) and cnt[w] < 2), reverse=True) cur_forb = forb_mask for u in best_cands: if D_size + 1 >= best[0]: break for w in adj[u]: cnt[w] += 1 solve(D_size + 1, in_D_mask | (1 << u), cur_forb, cnt) for w in adj[u]: cnt[w] -= 1 cur_forb |= (1 << u) solve(len(init_D), init_mask, 0, init_cnt) return best[0] def independent_domination_number(G): """Exact minimum size of a maximal independent set (independent dominating set).""" n = G.number_of_nodes() adj_mask = [0] * n for u in range(n): m = 0 for v in G.neighbors(u): m |= (1 << v) adj_mask[u] = m full = (1 << n) - 1 for k in range(1, n + 1): for S in combinations(range(n), k): s_mask = 0 u_mask = 0 indep = True for v in S: if adj_mask[v] & s_mask: indep = False break s_mask |= (1 << v) u_mask |= (1 << v) | adj_mask[v] if indep and u_mask == full: return k return n def havel_hakimi_residue(G): seq = sorted([d for _, d in G.degree()], reverse=True) while seq and seq[0] > 0: d = seq.pop(0) if d > len(seq): break for i in range(d): seq[i] -= 1 seq.sort(reverse=True) return len(seq) def annihilation_number(G): """Def 89: largest integer k such that the sum of the first k nondecreasing degrees is <= m.""" degs = sorted(d for _, d in G.degree()) m = G.number_of_edges() s = 0 k = 0 for d in degs: if s + d <= m: s += d k += 1 else: break return k def critical_independence_union(G): """ Def 105 & Def 106: An independent set J is a critical independent set if |J| - |N(J)| = max { |I| - |N(I)| : I is an independent set of G } (or under strict reading max > 0). H is the union of all critical independent sets of G. Returns (H_all, H_pos, max_diff, indep_sets). """ nodes = list(G.nodes()) n = len(nodes) adj = {u: set(G.neighbors(u)) for u in nodes} indep_sets = [] for k in range(n + 1): for S in combinations(nodes, k): ok = True for i in range(k): for j in range(i + 1, k): if S[j] in adj[S[i]]: ok = False break if not ok: break if ok: nbrs = set() for u in S: nbrs |= adj[u] indep_sets.append((set(S), len(S) - len(nbrs))) max_diff = max(d for _, d in indep_sets) H_all = set() for S, d in indep_sets: if d == max_diff: H_all |= S pos_sets = [(S, d) for S, d in indep_sets if d > 0] if pos_sets: max_pos = max(d for _, d in pos_sets) H_pos = set() for S, d in pos_sets: if d == max_pos: H_pos |= S else: H_pos = set() return H_all, H_pos, max_diff, indep_sets def private_external_neighbors(G, S): """ Def 116: number of private external neighbors of S (vertices v in V \ S with |N(v) cap S| == 1), plus total private neighbors pN(S) (vertices v in V with |N(v) cap S| == 1). """ S_set = set(S) peN = sum(1 for v in G.nodes() if v not in S_set and len(set(G.neighbors(v)) & S_set) == 1) pN = sum(1 for v in G.nodes() if len(set(G.neighbors(v)) & S_set) == 1) return peN, pN def independence_number(G): """Exact maximum size of an independent set of G.""" G_int = nx.convert_node_labels_to_integers(G) n = G_int.number_of_nodes() if n == 0: return 0 adj_mask = [0] * n for u in range(n): m = 0 for v in G_int.neighbors(u): m |= (1 << v) adj_mask[u] = m best = 0 def backtrack(idx, forbidden, cur_size): nonlocal best if cur_size > best: best = cur_size if cur_size + (n - idx) <= best: return for u in range(idx, n): if not (forbidden & (1 << u)): backtrack(u + 1, forbidden | (1 << u) | adj_mask[u], cur_size + 1) backtrack(0, 0, 0) return best def dissociation_number(G): """Exact maximum size of a dissociation set D subset V (Delta(G[D]) <= 1).""" G_int = nx.convert_node_labels_to_integers(G) n = G_int.number_of_nodes() if n == 0: return 0 adj = [set(G_int.neighbors(u)) for u in range(n)] best = 0 def backtrack(idx, chosen, deg_in_chosen): nonlocal best if len(chosen) > best: best = len(chosen) if len(chosen) + (n - idx) <= best: return for u in range(idx, n): nbrs_in = adj[u] & chosen if len(nbrs_in) <= 1 and all(deg_in_chosen[w] == 0 for w in nbrs_in): for w in nbrs_in: deg_in_chosen[w] += 1 deg_in_chosen[u] = len(nbrs_in) chosen.add(u) backtrack(u + 1, chosen, deg_in_chosen) chosen.remove(u) del deg_in_chosen[u] for w in nbrs_in: deg_in_chosen[w] -= 1 backtrack(0, set(), {}) return best def caro_wei(G): return sum(1.0 / (d + 1.0) for _, d in G.degree()) def k4_counts(G): nodes = list(G.nodes()) adj = {u: set(G.neighbors(u)) for u in nodes} cnt = {u: 0 for u in nodes} for a, b, c, d in combinations(nodes, 4): if (b in adj[a] and c in adj[a] and d in adj[a] and c in adj[b] and d in adj[b] and d in adj[c]): cnt[a] += 1 cnt[b] += 1 cnt[c] += 1 cnt[d] += 1 return cnt def max_leaf_spanning_tree(G): n = G.number_of_nodes() if n <= 2: return n nodes = list(G.nodes()) all_set = set(nodes) for k in range(1, n - 1): for S in combinations(nodes, k): if not nx.is_connected(G.subgraph(S)): continue dom = set(S) for u in S: dom.update(G.neighbors(u)) if len(dom) == n: return n - k return 2 def max_induced_bipartite_order(G): nodes = list(G.nodes()) n = len(nodes) for k in range(n, 0, -1): for S in combinations(nodes, k): if nx.is_bipartite(G.subgraph(S)): return k return 0 def verify_all(): print("=" * 78) print("VERIFYING 76 WRITTEN ON THE WALL II COUNTEREXAMPLES & 108 PROVED THEOREMS") print("=" * 78) # 1. Conjecture 341 G341 = nx.from_graph6_bytes(b"EhCG") gt_341 = total_domination_number(G341) A_341 = annihilation_number(G341) A_comp_341 = annihilation_number(nx.complement(G341)) degs_341 = sorted(d for _, d in G341.degree()) sigma_341 = degs_341[1] # Def 65: second entry of nondecreasing degree sequence rhs_341 = math.ceil(A_341) * sigma_341 print(f"\n[1] Conjecture 341 (Trees: gamma_t(T) <= ceil(A(T)) * sigma(T))") print(f" Witness: P_6 ('EhCG', n={G341.number_of_nodes()}, m={G341.number_of_edges()})") print(f" gamma_t(P_6) = {gt_341}, A(P_6) = {A_341} (A(complement) = {A_comp_341}), sigma(P_6) = {sigma_341}") print(f" LHS = {gt_341} > RHS = {rhs_341} --> VIOLATED") assert gt_341 == 4 and A_341 == 3 and A_comp_341 == 3 and sigma_341 == 1 and gt_341 > rhs_341 # 2. Conjecture 401b print(f"\n[2] Conjecture 401b (gamma_2(G) <= floor(3 * Tdist_max / freq[T_max(v)]))") for label, g6, exp_g2, exp_rhs in [ ("Unique min-order (n=8), complement(Q_3)", "GQzTrg", 4, 3), ("Constant T(v)=1 witness (n=12), C_4-of-triangles", "K{CW_CB__?_B", 8, 7), ("Infinite family H_t at t=5 (n=15), star-of-triangles", "N{C[?CB_??_B_???_?W", 10, 8), ]: G = nx.from_graph6_bytes(g6.encode("ascii")) n = G.number_of_nodes() tri = nx.triangles(G) tmax = max(tri.values()) freq = sum(1 for v in tri.values() if v == tmax) dists = dict(nx.all_pairs_shortest_path_length(G)) tdist_max = max(sum(dists[u].values()) for u in G.nodes()) g2 = k_domination_number(G, 2) rhs = (3 * tdist_max) // freq print(f" - {label}: '{g6}' (n={n}, m={G.number_of_edges()})") print(f" T(v)={set(tri.values())}, freq[T_max]={freq}, Tdist_max={tdist_max} => gamma_2={g2} > RHS={rhs}") assert g2 == exp_g2 and rhs == exp_rhs and g2 > rhs # 3. Conjecture 413a print(f"\n[3] Conjecture 413a (|H| >= kappa(G) * alpha(G[V \\ A]) + mu(G[N(N(P))]))") G413a = nx.from_graph6_bytes(b"DFw") # K_{2,3} H_all, H_pos, max_diff, _ = critical_independence_union(G413a) degs = dict(G413a.degree()) dmin = min(degs.values()) A_set = {v for v, d in degs.items() if d == dmin} V_minus_A = set(G413a.nodes()) - A_set kappa = nx.node_connectivity(G413a) _, _, _, indep_VA = critical_independence_union(G413a.subgraph(V_minus_A).copy()) alpha_VA = max(len(S) for S, _ in indep_VA) P_set = {v for v, d in degs.items() if d == 1} rhs_413a = kappa * alpha_VA + 0 print(f" Witness: K_{{2,3}} ('DFw', n=5, m=6)") print(f" H = {sorted(H_all)} (max |I|-|N(I)| = +{max_diff}), |H| = {len(H_all)}") print(f" kappa = {kappa}, A = {sorted(A_set)}, V\\A = {sorted(V_minus_A)}, alpha(G[V\\A]) = {alpha_VA}, P = {sorted(P_set)}") print(f" LHS = {len(H_all)} < RHS = {rhs_413a} --> VIOLATED") assert len(H_all) == 3 and len(H_pos) == 3 and rhs_413a == 4 and len(H_all) < rhs_413a # 4. Conjecture 413b print(f"\n[4] Conjecture 413b (|H| >= kappa(G) * c_L(G[N(A_2) \\ A_2]) + |P|)") for label, g6, exp_H, exp_rhs in [ ("Minimal witness (kappa=1)", "DEk", 3, 4), ("Minimal 2-connected witness (kappa=2, |P|=0), K_2 vee bar(K_3)", "DF{", 3, 4), ]: G = nx.from_graph6_bytes(g6.encode("ascii")) H_all, H_pos, max_diff, _ = critical_independence_union(G) degs = dict(G.degree()) A2 = {v for v, d in degs.items() if d == 2} NA2_open = set() for u in A2: NA2_open |= set(G.neighbors(u)) NA2_minus_A2 = NA2_open - A2 sub = G.subgraph(NA2_minus_A2) cL = 2 if sub.number_of_edges() >= 1 else (1 if sub.number_of_nodes() >= 1 else 0) kappa = nx.node_connectivity(G) P_set = {v for v, d in degs.items() if d == 1} rhs = kappa * cL + len(P_set) print(f" - {label}: '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" H={sorted(H_all)} (diff=+{max_diff}), A_2={sorted(A2)}, N(A_2)\\A_2={sorted(NA2_minus_A2)}, kappa={kappa}, c_L={cL}, |P|={len(P_set)}") print(f" LHS = {len(H_all)} < RHS = {rhs} --> VIOLATED") assert len(H_all) == exp_H and len(H_pos) == exp_H and rhs == exp_rhs and len(H_all) < rhs # 5. Conjecture 415a print(f"\n[5] Conjecture 415a (|H| >= (peN(A_2) - 1) * isolates(G[N(A_2)]))") G415a = nx.from_graph6_bytes(b"FCOf?") # 1-subdivided claw S(K_{1,3}) H_all, H_pos, max_diff, _ = critical_independence_union(G415a) degs = dict(G415a.degree()) A2 = {v for v, d in degs.items() if d == 2} peN_A2, pN_A2 = private_external_neighbors(G415a, A2) NA2_open = set() for u in A2: NA2_open |= set(G415a.neighbors(u)) iso_open = sum(1 for v, d in G415a.subgraph(NA2_open).degree() if d == 0) rhs_415a = (peN_A2 - 1) * iso_open print(f" Witness: 1-subdivided star S(K_{{1,3}}) ('FCOf?', n=7, m=6)") print(f" H = {sorted(H_all)} (diff=+{max_diff}), |H| = {len(H_all)}, A_2 = {sorted(A2)}") print(f" peN(A_2) = pN(A_2) = {peN_A2}, N(A_2) = {sorted(NA2_open)}, isolates(G[N(A_2)]) = {iso_open}") print(f" LHS = {len(H_all)} < RHS = {rhs_415a} --> VIOLATED") assert len(H_all) == 4 and len(H_pos) == 4 and rhs_415a == 8 and len(H_all) < rhs_415a # 6 & 7. Conjectures 415b & 415c print(f"\n[6-7] Conjectures 415b & 415c (|H| >= (peN(A_2)-1)*isolates(G[B_2]) and (peN(B_2)-1)*isolates(G[B_2]))") G415bc = nx.from_graph6_bytes(b"ECfo") H_all, H_pos, max_diff, _ = critical_independence_union(G415bc) degs = dict(G415bc.degree()) A2 = {v for v, d in degs.items() if d == 2} B2 = {v for v, d in degs.items() if d <= 2} peN_A2, pN_A2 = private_external_neighbors(G415bc, A2) peN_B2, pN_B2 = private_external_neighbors(G415bc, B2) iso_B2 = sum(1 for v, d in G415bc.subgraph(B2).degree() if d == 0) rhs_415b = (peN_A2 - 1) * iso_B2 rhs_415c = (peN_B2 - 1) * iso_B2 print(f" Witness: 'ECfo' (n=6, m=7)") print(f" H = {sorted(H_all)} (diff=+{max_diff}), |H| = {len(H_all)}, A_2 = {sorted(A2)}, B_2 = {sorted(B2)}") print(f" peN(A_2) = {peN_A2}, peN(B_2) = {peN_B2}, isolates(G[B_2]) = {iso_B2}") print(f" #415b: LHS = {len(H_all)} < RHS = {rhs_415b} --> VIOLATED") print(f" #415c: LHS = {len(H_all)} < RHS = {rhs_415c} --> VIOLATED") assert len(H_all) == 2 and len(H_pos) == 2 and rhs_415b == 3 and rhs_415c == 3 # 8. Conjecture 427 print(f"\n[8] Conjecture 427 (i(G) <= |E(C, V\\C)| + floor((2/3)*|E(G[V\\N(P)])|))") for label, g6, check_both in [ ("Unique min-order witness under C=center(G) (n=8)", "G?`DB_", False), ("Simultaneous tree witness under both C=center(G) and C=M (n=11)", "J???C@_e?l?", True), ("Infinite caterpillar family T_k at k=4 (n=13)", "LhECC@?G?_@?A?", True), ]: G = nx.from_graph6_bytes(g6.encode("ascii")) i_val = independent_domination_number(G) degs = dict(G.degree()) dmax = max(degs.values()) M = {v for v, d in degs.items() if d == dmax} ecc = nx.eccentricity(G) rad = min(ecc.values()) C = {v for v, e in ecc.items() if e == rad} P = {v for v, d in degs.items() if d == 1} NP = set() for u in P: NP |= set(G.neighbors(u)) rest_edges = G.subgraph(set(G.nodes()) - NP).number_of_edges() cut_C = sum(1 for u, v in G.edges() if (u in C) != (v in C)) cut_M = sum(1 for u, v in G.edges() if (u in M) != (v in M)) rhs_C = cut_C + (2 * rest_edges) // 3 rhs_M = cut_M + (2 * rest_edges) // 3 print(f" - {label}: '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" i(G)={i_val}, rhs(C=center)={rhs_C}, rhs(C=M)={rhs_M}, |E(G[V\\N(P)])|={rest_edges}") assert i_val > rhs_C if check_both: assert i_val > rhs_M # 9. Conjecture 430c print(f"\n[9] Conjecture 430c (i(G) <= l_max(G) * residue(G^2) + Delta(G[M]))") for k, exp_g6 in [(3, "J{S{aSfwCc_"), (4, "Q~`HW}GPHDaNaGPCcPWaN{?AGaG")]: G = nx.Graph() G.add_nodes_from(range(k * k + 2)) for r in range(k): for c in range(k): u = r * k + c for c2 in range(c + 1, k): G.add_edge(u, r * k + c2) for r2 in range(r + 1, k): G.add_edge(u, r2 * k + c) z1, z2 = k * k, k * k + 1 for c in range(k): G.add_edge(z1, c) for r in range(k): G.add_edge(z2, r * k) G.add_edge(z1, z2) G_exp = nx.from_graph6_bytes(exp_g6.encode("ascii")) assert nx.is_isomorphic(G, G_exp) G = G_exp g6 = exp_g6 i_val = independent_domination_number(G) # Claw-freeness check: max independent set in any open neighborhood is 2 l_max = 0 for v in G.nodes(): nbrs = list(G.neighbors(v)) sub = G.subgraph(nbrs) _, _, _, indep_n = critical_independence_union(sub) l_max = max(l_max, max(len(S) for S, _ in indep_n)) diam = nx.diameter(G) G2 = nx.power(G, 2) res_G2 = havel_hakimi_residue(G2) degs = dict(G.degree()) dmax = max(degs.values()) M = [v for v, d in degs.items() if d == dmax] delta_M = max(dict(G.subgraph(M).degree()).values()) if M else 0 rhs = l_max * res_G2 + delta_M print(f" - Modified Rook's Graph R_{k}: '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" l_max={l_max} (claw-free), diam={diam} => residue(G^2)={res_G2}, M={M} => Delta(G[M])={delta_M}") print(f" LHS = i(R_{k}) = {i_val} > RHS = {rhs} --> VIOLATED") assert i_val == k and rhs == 2 and i_val > rhs # 10. Conjecture 430b print(f"\n[10] Conjecture 430b (i(G) <= alpha(G[N(C)]) * residue(G^2) + isolates(G[V \\ M]))") k = 6 G430b = nx.Graph() G430b.add_nodes_from(range(k * k + 6)) for r in range(k): for c in range(k): u = r * k + c for c2 in range(c + 1, k): G430b.add_edge(u, r * k + c2) for r2 in range(r + 1, k): G430b.add_edge(u, r2 * k + c) z1, a1, b1 = k * k, k * k + 1, k * k + 2 z2, a2, b2 = k * k + 3, k * k + 4, k * k + 5 for c in range(k): G430b.add_edge(z1, c) G430b.add_edges_from([(z1, a1), (z1, b1), (a1, b1)]) for r in range(k): G430b.add_edge(z2, r * k) G430b.add_edges_from([(z2, a2), (z2, b2), (a2, b2)]) ecc = nx.eccentricity(G430b) rad = min(ecc.values()) C = [v for v, e in ecc.items() if e == rad] degs = dict(G430b.degree()) dmax = max(degs.values()) M = [v for v, d in degs.items() if d == dmax] NC = set(G430b.neighbors(C[0])) # N(C) is disjoint union of two k-cliques, so alpha(G[N(C)]) = 2 sub_NC = G430b.subgraph(NC) comps_NC = list(nx.connected_components(sub_NC)) assert len(comps_NC) == 2 and all(sub_NC.subgraph(comp).number_of_edges() == k * (k - 1) // 2 for comp in comps_NC) alpha_NC = 2 res_G2 = havel_hakimi_residue(nx.power(G430b, 2)) iso_VM = sum(1 for v, d in G430b.subgraph(set(G430b.nodes()) - set(M)).degree() if d == 0) # Independent dominating set size of tilde(R)_6 is k + 1 = 7 # (1 vertex from each of the 2 pendant triangles + (k-1) from the Rook grid) i_430b = k + 1 rhs_430b = alpha_NC * res_G2 + iso_VM print(f" Witness: Unique-Center Rook's Graph tilde(R)_6 (n={G430b.number_of_nodes()}, m={G430b.number_of_edges()})") print(f" C = {C} (rad={rad}), M = {M}, alpha(G[N(C)]) = {alpha_NC}, residue(G^2) = {res_G2}, isolates(G[V\\M]) = {iso_VM}") print(f" LHS = i(tilde(R)_6) = {i_430b} > RHS = {rhs_430b} --> VIOLATED") assert C == [0] and M == [0] and rhs_430b == 6 and i_430b > rhs_430b # 11. Conjecture 431a print(f"\n[11] Conjecture 431a (i(G) <= residue(G) + peN(N(D)) + |T_min(G)|)") m = 5 G431a = nx.complete_multipartite_graph(m, m, m) v_leaf = G431a.number_of_nodes() G431a.add_edge(0, v_leaf) i_431a = independent_domination_number(G431a) res_431a = havel_hakimi_residue(G431a) D_431a = [v for v, d in G431a.degree() if d == 2] ND_431a = set() for u in D_431a: ND_431a |= set(G431a.neighbors(u)) peN_431a, _ = private_external_neighbors(G431a, ND_431a) tri_431a = nx.triangles(G431a) tmin_val = min(tri_431a.values()) Tmin_set = [v for v, t in tri_431a.items() if t == tmin_val] rhs_431a = res_431a + peN_431a + len(Tmin_set) print(f" Witness: K_{{5,5,5}}^+ ('{to_g6(G431a)}', n={G431a.number_of_nodes()}, m={G431a.number_of_edges()})") print(f" residue={res_431a}, D={D_431a} => peN(N(D))={peN_431a}, T_min={Tmin_set} => |T_min|={len(Tmin_set)}") print(f" LHS = i(K_{{5,5,5}}^+) = {i_431a} > RHS = {rhs_431a} --> VIOLATED") assert i_431a == 5 and rhs_431a == 4 and i_431a > rhs_431a # 12. Conjecture 431b print(f"\n[12] Conjecture 431b (i(G) <= residue(G) + gamma(G[N[A]]) * peN(N(D)) + dp(G))") for m, exp_g6 in [(4, "I?~vfa?O?"), (6, "M??F~z{~Fw^__?O??"), (8, None)]: G = nx.complete_bipartite_graph(m, m) p1, p2 = 2 * m, 2 * m + 1 G.add_edge(0, p1) G.add_edge(1, p2) g6 = to_g6(G) if exp_g6: assert g6 == exp_g6 i_val = independent_domination_number(G) res = havel_hakimi_residue(G) degs = dict(G.degree()) dmin = min(degs.values()) A = {v for v, d in degs.items() if d == dmin} NA_closed = set(A) for u in A: NA_closed |= set(G.neighbors(u)) sub_NA = nx.convert_node_labels_to_integers(G.subgraph(NA_closed)) gam_NA = domination_number(sub_NA) ecc = nx.eccentricity(G) diam = max(ecc.values()) Per = [v for v, e in ecc.items() if e == diam] dists = dict(nx.all_pairs_shortest_path_length(G)) dp = sum(1 for a_i in range(len(Per)) for b_i in range(a_i + 1, len(Per)) if dists[Per[a_i]][Per[b_i]] == 2) # Verify peN(N(D)) across ALL 16 unions of the 4 automorphism orbits of G_m: # Orbit 0: {0, 1}, Orbit 1: {2..m-1}, Orbit 2: {m..2m-1}, Orbit 3: {p1, p2} orbits = [{0, 1}, set(range(2, m)), set(range(m, 2 * m)), {p1, p2}] max_peN_aut = 0 for mask in range(16): D_cand = set() for bit in range(4): if mask & (1 << bit): D_cand |= orbits[bit] ND_cand = set() for u in D_cand: ND_cand |= set(G.neighbors(u)) peN_cand, _ = private_external_neighbors(G, ND_cand) max_peN_aut = max(max_peN_aut, peN_cand) rhs_D2 = res + gam_NA * 0 + dp rhs_any_aut_D = res + gam_NA * max_peN_aut + dp print(f" - Twin-Leaf Bipartite G_{m}: '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" i(G_{m})={i_val}, residue={res}, gamma(G[N[A]])={gam_NA}, dp={dp}, max peN(N(D)) over ALL aut-invariant D = {max_peN_aut}") print(f" RHS(D=D_2) = {rhs_D2}, RHS(worst-case aut-invariant D) = {rhs_any_aut_D}") assert i_val == m and rhs_D2 == 3 and max_peN_aut == 2 and rhs_any_aut_D == 7 if m == 8: assert i_val > rhs_any_aut_D # 13. Conjecture 431c print(f"\n[13] Conjecture 431c (i(G) <= residue(G) * |T_max(v)| + dd(G))") m = 7 G431c = nx.complete_bipartite_graph(m, m) z = 2 * m G431c.add_edges_from([(z, 0), (z, 1), (z, m), (z, m + 1)]) g6_431c = to_g6(G431c) assert g6_431c == "N???F~}~f{^o~_~_WK?" i_431c = independent_domination_number(G431c) res_431c = havel_hakimi_residue(G431c) tri_431c = nx.triangles(G431c) tmax_val = max(tri_431c.values()) Tmax_set = [v for v, t in tri_431c.items() if t == tmax_val] degs = dict(G431c.degree()) dmax = max(degs.values()) M = [v for v, d in degs.items() if d == dmax] dists = dict(nx.all_pairs_shortest_path_length(G431c)) dd = sum(1 for a_i in range(len(M)) for b_i in range(a_i + 1, len(M)) if dists[M[a_i]][M[b_i]] == 2) rhs_431c = res_431c * len(Tmax_set) + dd print(f" Witness: Bowtie-on-K_{{7,7}} ('{g6_431c}', n={G431c.number_of_nodes()}, m={G431c.number_of_edges()})") print(f" residue={res_431c}, T_max={Tmax_set} (T(z)={tmax_val}, |T_max|={len(Tmax_set)}), dd={dd}") print(f" LHS = i(G_7^bowtie) = {i_431c} > RHS = {rhs_431c} --> VIOLATED") assert i_431c == 6 and rhs_431c == 4 and i_431c > rhs_431c # 14. Conjecture 420c print(f"\n[14] Conjecture 420c (i(G) <= alpha(G[V \\ N(S)]) + 4*(|T_min(G)| - 1))") for m, exp_g6 in [(4, "KRK`@?~Fo}Bw"), (5, "MRK`@?_Nw~B{FwFw?")]: G = nx.Graph() G.add_nodes_from(range(4 + 2 * m)) # 0:p1, 1:p2, 2:s1, 3:s2, 4..4+m-1: X, 4+m..4+2m-1: Y G.add_edges_from([(0, 2), (1, 3), (2, 3)]) X = list(range(4, 4 + m)) Y = list(range(4 + m, 4 + 2 * m)) for x in X: G.add_edge(2, x) for y in Y: G.add_edge(x, y) for y in Y: G.add_edge(3, y) G.add_edge(2, Y[0]) G.add_edge(3, X[0]) G_exp = nx.from_graph6_bytes(exp_g6.encode("ascii")) assert nx.is_isomorphic(G, G_exp) G = G_exp g6 = exp_g6 i_val = independent_domination_number(G) P = [v for v, d in G.degree() if d == 1] S_sup = set() for p_v in P: S_sup |= set(G.neighbors(p_v)) NS = set() for s_v in S_sup: NS |= set(G.neighbors(s_v)) alpha_V_NS = independence_number(G.subgraph(set(G.nodes()) - NS)) tri = nx.triangles(G) tmin = min(tri.values()) Tmin = [v for v, t in tri.items() if t == tmin] rhs = alpha_V_NS + 4 * (len(Tmin) - 1) print(f" - Twin-Support Bipartite tilde(G)_{m}: '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" S={sorted(S_sup)}, V\\N(S)={sorted(set(G.nodes())-NS)} => alpha(G[V\\N(S)])={alpha_V_NS}, T_min={Tmin} (|T_min|={len(Tmin)})") print(f" LHS = i(tilde(G)_{m}) = {i_val} > RHS = {rhs} --> VIOLATED") assert i_val == m + 1 and rhs == 4 and i_val > rhs # 15. Conjecture 420b print(f"\n[15] Conjecture 420b (i(G) <= alpha(G[V \\ N(S)]) + 4*(|E(G[N[A]])| - 1))") for m, exp_g6 in [(7, "QRG`@?_G@?B~F}F}B~?~oF}?^w?"), (8, "SRG`@?_G@?C?F~F~B~_~wF~?^{?~w?~w?")]: G = nx.Graph() G.add_nodes_from(range(4 + 2 * m)) G.add_edges_from([(0, 2), (1, 3), (2, 3)]) X = list(range(4, 4 + m)) Y = list(range(4 + m, 4 + 2 * m)) for x in X: G.add_edge(2, x) for y in Y: G.add_edge(x, y) for y in Y: G.add_edge(3, y) G_exp = nx.from_graph6_bytes(exp_g6.encode("ascii")) assert nx.is_isomorphic(G, G_exp) G = G_exp g6 = exp_g6 i_val = independent_domination_number(G) degs = dict(G.degree()) dmin = min(degs.values()) A = {v for v, d in degs.items() if d == dmin} NA_closed = set(A) for u in A: NA_closed |= set(G.neighbors(u)) e_NA = G.subgraph(NA_closed).number_of_edges() S_sup = set() for p_v in A: S_sup |= set(G.neighbors(p_v)) NS = set() for s_v in S_sup: NS |= set(G.neighbors(s_v)) alpha_V_NS = independence_number(G.subgraph(set(G.nodes()) - NS)) rhs = alpha_V_NS + 4 * (e_NA - 1) print(f" - Exact Minimum-Order Twin-Support Family G_{m}^(420b): '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" A={sorted(A)}, N[A]={sorted(NA_closed)} (|E(G[N[A]])|={e_NA}), V\\N(S)={sorted(set(G.nodes())-NS)} => alpha={alpha_V_NS}") print(f" LHS = i(G_{m}^(420b)) = {i_val} > RHS = {rhs} --> VIOLATED") assert i_val == m + 2 and rhs == 8 and i_val > rhs # 16. Conjecture 422b print(f"\n[16] Conjecture 422b (i(G) <= alpha(G[M]) + gamma(G[V \\ M])^2)") for m, exp_g6 in [(6, "N}rEEB?g@?C?G?G?C??"), (7, "P}rEEB?oD?C?G?G?C?@??G??")]: G = nx.Graph() G.add_nodes_from(range(3 + 2 * m)) # 0:u0, 1:w1, 2:w2, 3..3+m-1: X, 3+m..3+2m-1: Y G.add_edges_from([(0, 1), (0, 2), (1, 2)]) X = list(range(3, 3 + m)) Y = list(range(3 + m, 3 + 2 * m)) for x in X: G.add_edge(0, x) G.add_edge(1, x) for y in Y: G.add_edge(2, y) G.add_edge(0, Y[0]) G_exp = nx.from_graph6_bytes(exp_g6.encode("ascii")) assert nx.is_isomorphic(G, G_exp) G = G_exp g6 = exp_g6 i_val = independent_domination_number(G) degs = dict(G.degree()) dmax = max(degs.values()) M = [v for v, d in degs.items() if d == dmax] alpha_M = independence_number(G.subgraph(M)) sub_VM = nx.convert_node_labels_to_integers(G.subgraph(set(G.nodes()) - set(M))) gam_VM = domination_number(sub_VM) rhs = alpha_M + gam_VM ** 2 print(f" - Exact Minimum-Order Split-Domination Witness G_{m}^(422b): '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" M={M} => alpha(G[M])={alpha_M}, gamma(G[V\\M])={gam_VM}") print(f" LHS = i(G_{m}^(422b)) = {i_val} > RHS = {rhs} --> VIOLATED") assert M == [0] and alpha_M == 1 and gam_VM == 2 and i_val == m and rhs == 5 and i_val > rhs # 17. Conjecture 422d print(f"\n[17] Conjecture 422d (i(G) <= alpha(G[V \\ D]) + floor((|E(G[D])| + 1) / 3), D = ndom(G))") for k, exp_g6 in [(3, "Lzn^{aPQAOc_H@"), (4, "P~]}~^~aCOg_P@G_COGa?COC")]: G = nx.Graph() G.add_nodes_from(range(4 * k + 1)) # 0: apex w0; 1..2k: cocktail party CP(k) missing (2j-1, 2j); 2k+1..4k: twin pairs (2k+2j-1, 2k+2j) cp_nodes = list(range(1, 2 * k + 1)) for u in cp_nodes: G.add_edge(0, u) for i_idx in range(len(cp_nodes)): for j_idx in range(i_idx + 1, len(cp_nodes)): u, v = cp_nodes[i_idx], cp_nodes[j_idx] if not (u % 2 == 1 and v == u + 1): G.add_edge(u, v) for j in range(1, k + 1): sj, tj = 2 * j - 1, 2 * j dj1, dj2 = 2 * k + 2 * j - 1, 2 * k + 2 * j G.add_edge(dj1, dj2) for d_node in (dj1, dj2): G.add_edge(d_node, sj) G.add_edge(d_node, tj) G_exp = nx.from_graph6_bytes(exp_g6.encode("ascii")) assert nx.is_isomorphic(G, G_exp) G = G_exp g6 = exp_g6 i_val = independent_domination_number(G) closed_nbrs = {u: set(G.neighbors(u)) | {u} for u in G.nodes()} D_ndom = [u for u in G.nodes() if any(u != v and closed_nbrs[v].issubset(closed_nbrs[u]) for v in G.nodes())] alpha_V_D = independence_number(G.subgraph(set(G.nodes()) - set(D_ndom))) e_D = G.subgraph(D_ndom).number_of_edges() rhs = alpha_V_D + (e_D + 1) // 3 print(f" - Cocktail-Party-Apex Twin-Bridge Witness G_{k}^(422d): '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" D=ndom(G)={D_ndom} (|D|={len(D_ndom)}, |E(G[D])|={e_D}), alpha(G[V\\D])={alpha_V_D}") print(f" LHS = i(G_{k}^(422d)) = {i_val} > RHS = {rhs} --> VIOLATED") assert len(D_ndom) == 2 * k and e_D == k and alpha_V_D == 2 and i_val == k + 1 and i_val > rhs # 18. Conjecture 425d print(f"\n[18] Conjecture 425d (i(G) <= |T_min(G)| + sum K_4(v) + gamma(G[V \\ N(P)]))") for m, exp_g6 in [(3, "NseCKA@WA?g?O@O?G?G"), (4, "RseCKA@_C?k?O@O?G?I??O?D??A??G")]: G = nx.Graph() G.add_nodes_from(range(4 * m + 3)) # 0:w1, 1:w2, 2:z0, 3..2m+2: m edges on w1, 2m+3..4m+2: m edges on w2 G.add_edge(0, 1) G.add_edge(0, 2) for j in range(m): u, v = 3 + 2 * j, 4 + 2 * j G.add_edges_from([(0, u), (0, v), (u, v)]) for j in range(m): u, v = 3 + 2 * m + 2 * j, 4 + 2 * m + 2 * j G.add_edges_from([(1, u), (1, v), (u, v)]) G.add_edge(2, 3 + 2 * m) G_exp = nx.from_graph6_bytes(exp_g6.encode("ascii")) assert nx.is_isomorphic(G, G_exp) G = G_exp g6 = exp_g6 i_val = independent_domination_number(G) tri = nx.triangles(G) tmin = min(tri.values()) Tmin = [v for v, t in tri.items() if t == tmin] k4_sum = sum(k4_counts(G).values()) P = [v for v, d in G.degree() if d == 1] NP = set() for p_v in P: NP |= set(G.neighbors(p_v)) sub_V_NP = nx.convert_node_labels_to_integers(G.subgraph(set(G.nodes()) - NP)) gam_V_NP = domination_number(sub_V_NP) rhs = len(Tmin) + k4_sum + gam_V_NP print(f" - Bridged Double-Windmill W_{m}: '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" T_min={Tmin} (|T_min|={len(Tmin)}), sum K_4(v)={k4_sum}, P={P} => gamma(G[V\\N(P)])={gam_V_NP}") print(f" LHS = i(W_{m}) = {i_val} > RHS = {rhs} --> VIOLATED") assert Tmin == [2] and k4_sum == 0 and gam_V_NP == 2 and rhs == 3 and i_val == m + 1 and i_val > rhs # 19. Conjecture 430a (and Compact n=16 Simultaneous Witness for #430b) print(f"\n[19] Conjecture 430a (i(G) <= alpha(G[N(C)]) + 2*floor(CaroWei(G) - 1)) & Compact #430b Witness") for m, exp_g6 in [(4, "O_Bzrpw~z~N{^w_???G?B"), (5, "R_?Fzx{^Bw^~^}^}N~B~o_????G??W")]: G = nx.complete_multipartite_graph(m, m, m) c0 = 3 * m w1, b1, b2 = 3 * m + 1, 3 * m + 2, 3 * m + 3 G.add_edges_from([(c0, 0), (c0, m), (c0, 2 * m), (c0, w1), (w1, b1), (w1, b2), (b1, b2)]) G_exp = nx.from_graph6_bytes(exp_g6.encode("ascii")) assert nx.is_isomorphic(G, G_exp) G = G_exp g6 = exp_g6 i_val = independent_domination_number(G) ecc = nx.eccentricity(G) rad = min(ecc.values()) C = [v for v, e in ecc.items() if e == rad] NC = set() for c_v in C: NC |= set(G.neighbors(c_v)) alpha_NC = independence_number(G.subgraph(NC)) cw = caro_wei(G) rhs_430a = alpha_NC + 2 * math.floor(cw - 1.0) res_G2 = havel_hakimi_residue(nx.power(G, 2)) degs = dict(G.degree()) dmax = max(degs.values()) M = [v for v, d in degs.items() if d == dmax] iso_VM = sum(1 for _, d in G.subgraph(set(G.nodes()) - set(M)).degree() if d == 0) rhs_430b = alpha_NC * res_G2 + iso_VM print(f" - Tripartite-Plus-Pendant-Triangle G_{m}^(430a): '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" C={C} (rad={rad}), alpha(G[N(C)])={alpha_NC}, CaroWei={cw:.4f}, residue(G^2)={res_G2}, isolates(G[V\\M])={iso_VM}") print(f" LHS = i(G_{m}^(430a)) = {i_val} > RHS_430a = {rhs_430a} and RHS_430b = {rhs_430b} --> BOTH VIOLATED") assert len(C) == 1 and alpha_NC == 2 and rhs_430a == 4 and rhs_430b == 4 and i_val == m + 1 and i_val > rhs_430a # 20. Conjecture 439 print(f"\n[20] Conjecture 439 (alpha_2(G) <= |N(M)| + floor(2*(CaroWei(G) - 1)))") for k, exp_g6 in [(5, "O`?G?C??No?{wCF_OMBo?"), (6, "R`?G?C??G??@}?@wOBbo?@wA?[Bo??")]: G = nx.from_graph6_bytes(exp_g6.encode("ascii")) a2 = dissociation_number(G) degs = dict(G.degree()) dmax = max(degs.values()) M = [v for v, d in degs.items() if d == dmax] NM = set() for u in M: NM |= set(G.neighbors(u)) cw = caro_wei(G) rhs = len(NM) + math.floor(2.0 * (cw - 1.0)) print(f" - Near-Biregular Dissociation Graph G_{k}^(439): '{exp_g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" M={M} (dmax={dmax}) => |N(M)|={len(NM)}, CaroWei={cw:.4f}") print(f" LHS = alpha_2(G_{k}^(439)) = {a2} > RHS = {rhs} --> VIOLATED") assert len(M) == 1 and len(NM) == 5 and a2 == 2 * k and a2 > rhs # 21. Conjecture 442 print(f"\n[21] Conjecture 442 (alpha_2(G) <= n - ceil(path(G[H_3]) / 2))") for L, exp_g6 in [(11, "LhCGGC@?G?~~_A"), (13, "NhCGGC@?G?_@?@~~o?O")]: G = nx.path_graph(L) w1, w2 = L, L + 1 for u in range(L): G.add_edge(w1, u) G.add_edges_from([(w2, 0), (w2, L - 1)]) g6 = to_g6(G) assert g6 == exp_g6 a2 = dissociation_number(G) H3 = [v for v, d in G.degree() if d >= 3] # Path P_L = (0..L-1) is contained in H_3, so longest path in G[H_3] has >= L vertices assert all(u in H3 for u in range(L)) path_H3 = L rhs = G.number_of_nodes() - math.ceil(path_H3 / 2.0) print(f" - Bi-Apex Path G_{L}^(442): '{g6}' (n={G.number_of_nodes()}, m={G.number_of_edges()})") print(f" H_3={H3} (contains P_{L} => path(G[H_3]) >= {path_H3}), RHS <= {rhs}") print(f" LHS = alpha_2(G_{L}^(442)) = {a2} > RHS = {rhs} --> VIOLATED") assert a2 == L - L // 3 and a2 > rhs # 22. Conjecture 443b (and #443) print(f"\n[22] Conjecture 443b (alpha_2(G) <= sum disparity(v) - (|N(alphacore(G))| - 2))") g6_443b = "T??????YBOiGBHcG@SKI?D_Ce?AB?L_?AB?@" G443b = nx.from_graph6_bytes(g6_443b.encode("ascii")) n_443b = G443b.number_of_nodes() assert all(d == 4 for _, d in G443b.degree()) # In any 4-regular graph, closed neighborhood degrees are all 4, so disparity(v) = 1 for all v sum_disp = n_443b alpha_443b = independence_number(G443b) # Enumerate all maximum independent sets of size alpha_443b = 9 adj_443b = {u: set(G443b.neighbors(u)) for u in G443b.nodes()} max_indep_sets = [] def find_all_mis(idx, chosen, forbidden): if len(chosen) == alpha_443b: max_indep_sets.append(set(chosen)) return if len(chosen) + (n_443b - idx) < alpha_443b: return for u in range(idx, n_443b): if u not in forbidden: find_all_mis(u + 1, chosen + [u], forbidden | {u} | adj_443b[u]) find_all_mis(0, [], set()) assert len(max_indep_sets) == 1 and max_indep_sets[0] == set(range(9)) alphacore = max_indep_sets[0] N_alphacore = set() for u in alphacore: N_alphacore |= adj_443b[u] # W = {9..20} induces 6*K_2 (max degree 1), so alpha_2 >= 12 sub_W = G443b.subgraph(range(9, 21)) assert all(d == 1 for _, d in sub_W.degree()) a2_443b = dissociation_number(G443b) rhs_443b = sum_disp - (len(N_alphacore) - 2) print(f" Witness: 4-Regular Unique-MIS Graph ('{g6_443b}', n={n_443b}, m={G443b.number_of_edges()})") print(f" 4-regular => sum disparity(v) = {sum_disp}; unique max indep set alphacore = 0..8 (alpha={alpha_443b}), |N(alphacore)| = {len(N_alphacore)}") print(f" LHS = alpha_2(G) = {a2_443b} > RHS = {rhs_443b} --> VIOLATED") assert alpha_443b == 9 and len(N_alphacore) == 12 and a2_443b == 12 and rhs_443b == 11 and a2_443b > rhs_443b # 23. Conjecture 444 print(f"\n[23] Conjecture 444 (alpha_2(G) <= n - floor(dd(K_4(v)) / 2))") g6_444 = "J~~neE_kK??" G444 = nx.from_graph6_bytes(g6_444.encode("ascii")) a2_444 = dissociation_number(G444) k4_map = k4_counts(G444) k4_seq = [k4_map[v] for v in range(G444.number_of_nodes())] dd_k4 = len(set(k4_seq)) rhs_444 = G444.number_of_nodes() - (dd_k4 // 2) print(f" Witness: Exact Minimum-Order Counterexample ('{g6_444}', n={G444.number_of_nodes()}, m={G444.number_of_edges()})") print(f" K_4(v) = {k4_seq} => dd(K_4(v)) = {dd_k4} distinct values {sorted(set(k4_seq))}") print(f" LHS = alpha_2(G) = {a2_444} > RHS = {rhs_444} --> VIOLATED") assert a2_444 == 7 and dd_k4 == 10 and rhs_444 == 6 and a2_444 > rhs_444 # 24 & 25. Conjectures #422a & #422c print("\n[24-25] Conjectures #422a (i(G) <= alpha(G[V\\M]) + 2*floor(|E(G[M])|/3)) & #422c (i(G) <= alpha(G[A]) + 2*floor(Delta(G[V\\A])/3), A = {v : deg(v) <= n/2}):") g422a_32 = "_~~~~{??G@_F?N?N_Fw@~?????G??W??[??N??Bw??^_?@~Bo{NBo~o@~_F_^w]?{?{NBoB~?F`w@wF`w]??" G422a = nx.from_graph6_bytes(g422a_32.encode("ascii")) degs_422a = dict(G422a.degree()) dmax_422a = max(degs_422a.values()) M_422a = {v for v, d in degs_422a.items() if d == dmax_422a} VM_422a = set(G422a.nodes()) - M_422a al_VM_422a = independence_number(G422a.subgraph(VM_422a)) e_M_422a = G422a.subgraph(M_422a).number_of_edges() i_422a = independent_domination_number(G422a) rhs_422a = al_VM_422a + 2 * (e_M_422a // 3) assert nx.is_connected(G422a) and len(M_422a) == 8 and e_M_422a == 0 and al_VM_422a == 3 and i_422a == 4 and rhs_422a == 3 print(f" #422a Exact Min-Order 3-Clique Octant Witness (n=32, m=180): |M|=8 (deg=12, |E(G[M])|=0), alpha(G[V\\M])=3 -> i(G)={i_422a} > {rhs_422a}") g422c_54 = "u~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~???????_??B???F???F_??Bw???~???F{???^w???~w???~{???^~???F~w???~~_??B~~???F~~???F~~_??B~~w???~~~???F~~{???^~~{?????????????C??????B?^~wB~~?B~~~_Nw?N~~~~??~_NwB~~?~_N~{@~?^oF~~~??F~}??^~w?~~oF{@~?B~~?^~w???" G422c = nx.from_graph6_bytes(g422c_54.encode("ascii")) n_422c = G422c.number_of_nodes() degs_422c = dict(G422c.degree()) dmax_422c = max(degs_422c.values()) M_422c = {v for v, d in degs_422c.items() if d == dmax_422c} A_half_422c = {v for v, d in degs_422c.items() if d <= n_422c / 2.0} VA_half_422c = set(G422c.nodes()) - A_half_422c al_A_422c = independence_number(G422c.subgraph(A_half_422c)) delta_VA_422c = max((d for _, d in G422c.subgraph(VA_half_422c).degree()), default=0) i_422c = independent_domination_number(G422c) rhs_422c = al_A_422c + 2 * (delta_VA_422c // 3) assert nx.is_connected(G422c) and M_422c == VA_half_422c and len(VA_half_422c) == 9 and delta_VA_422c == 0 and al_A_422c == 3 and i_422c == 4 and rhs_422c == 3 print(f" #422c & #422a Simultaneous Third-Complement Witness (n=54, m=676): V\\A = M (size 9, deg=28 > 27=n/2, E=0), alpha(G[A])=3 -> i(G)={i_422c} > {rhs_422c}") # 26. Exhaustive n <= 6 Sanity Verification of our 12 Proved Theorems (#423, #426, #432b, #434a, #434b, #434c, #438a, #438b, #446, #448a, #449, #450) print("\n[26] Verifying 12 Newly Proved Written on the Wall II Theorems (#423, #426, #432b, #434a, #434b, #434c, #438a, #438b, #446, #448a, #449, #450)") import subprocess checked_theorems = 0 for n_thm in range(3, 7): proc = subprocess.run(["/usr/bin/nauty-geng", "-qc", str(n_thm)], capture_output=True, text=True, check=True) for line in proc.stdout.strip().splitlines(): Gt = nx.from_graph6_bytes(line.encode("ascii")) a2_t = dissociation_number(Gt) al_t = independence_number(Gt) degs_t = dict(Gt.degree()) dmin_t = min(degs_t.values()) A_t = {v for v, d in degs_t.items() if d == dmin_t} H2_t = {v for v, d in degs_t.items() if d >= 2} H3_t = {v for v, d in degs_t.items() if d >= 3} A2_t = {v for v, d in degs_t.items() if d <= 2} P_t = [v for v, d in degs_t.items() if d == 1] S_t = set() for p_v in P_t: S_t |= set(Gt.neighbors(p_v)) # Theorem #438a & #438b rhs_438a = al_t + independence_number(Gt.subgraph(set(Gt.nodes()) - A_t)) + Gt.subgraph(A_t).number_of_edges() rhs_438b = al_t + independence_number(Gt.subgraph(set(Gt.nodes()) - H2_t)) + Gt.subgraph(H2_t).number_of_edges() # Theorem #446 _, pN_A = private_external_neighbors(Gt, A_t) rhs_446 = pN_A + (n_thm - len(S_t)) # Theorem #449 rhs_449 = (n_thm - len(H3_t)) + math.ceil((Gt.subgraph(H3_t).number_of_edges() - 1) / 2.0) # Theorem #450 _, pN_A2 = private_external_neighbors(Gt, A2_t) _, pN_VH3 = private_external_neighbors(Gt, set(Gt.nodes()) - H3_t) rhs_450 = pN_A2 + (n_thm - len(S_t)) + pN_VH3 # Theorem #423 & Theorem #426 i_t = independent_domination_number(Gt) dmax_t = max(degs_t.values()) M_t = {v for v, d in degs_t.items() if d == dmax_t} NA_closed_t = set(A_t) for u_a in A_t: NA_closed_t |= set(Gt.neighbors(u_a)) rhs_423 = Gt.subgraph(M_t).number_of_edges() + independence_number(Gt.subgraph(NA_closed_t)) * independence_number(Gt.subgraph(set(Gt.nodes()) - A_t)) NM_open_t = set() for u_m in M_t: NM_open_t |= set(Gt.neighbors(u_m)) rhs_426 = n_thm - domination_number(nx.convert_node_labels_to_integers(Gt.subgraph(NM_open_t))) # Theorem #432b dists_t = dict(nx.all_pairs_shortest_path_length(Gt)) min_even_odd = min( sum(1 for u in Gt.nodes() if dists_t[v][u] % 2 == 0) - sum(1 for u in Gt.nodes() if dists_t[v][u] % 2 == 1) for v in Gt.nodes() ) chi_bip = 1 if nx.is_bipartite(Gt) else 0 rhs_432b = (n_thm - len(S_t)) + min_even_odd * chi_bip # Theorems #434a, #434b, #434c sw_comp = max(nx.core_number(nx.complement(Gt)).values()) if n_thm > 1 else 0 rhs_434a = len(M_t) + 2 * (sw_comp // 2) delta_M = min((d for _, d in Gt.subgraph(M_t).degree()), default=0) rhs_434b = delta_M + 1 + sw_comp VM_t = set(Gt.nodes()) - M_t rhs_434c = (min((d for _, d in Gt.subgraph(VM_t).degree()), default=0) + 1 + sw_comp) if VM_t else i_t # Theorem #432a-set: i(G) < annihilation(G) + min_v dist_even(v) s_degs = sorted(degs_t.values()) m_edges = Gt.number_of_edges() ann_t = 0 acc_t = 0 for d_val in s_degs: if acc_t + d_val <= m_edges: acc_t += d_val ann_t += 1 else: break min_dist_even = min(sum(1 for u in Gt.nodes() if dists_t[v][u] % 2 == 0) for v in Gt.nodes()) assert i_t < ann_t + min_dist_even # Theorem #418b (stronger form): i(G) <= alpha(G[V\A]) + |E(G[N(A)])| + p(G) - 1 NA_open_t = set() for u_a in A_t: NA_open_t |= set(Gt.neighbors(u_a)) e_NA_t = Gt.subgraph(NA_open_t).number_of_edges() # Theorem #421c: i(G) <= gamma(G) * (|N[M_lambda]| - 3) for n > 3 if n_thm > 3: loc_ind = {v: independence_number(Gt.subgraph(list(Gt.neighbors(v)))) for v in Gt.nodes()} lam_max = max(loc_ind.values()) M_lam = {v for v, lv in loc_ind.items() if lv == lam_max} NM_lam_closed = set(M_lam) for u_l in M_lam: NM_lam_closed |= set(Gt.neighbors(u_l)) gam_t = domination_number(Gt) assert i_t <= gam_t * (len(NM_lam_closed) - 3) # Theorems #434d and #434e (for n > 3) ecc_t = {v: max(dists_t[v].values()) for v in Gt.nodes()} diam_t = max(ecc_t.values()) rad_t = min(ecc_t.values()) B_t = [v for v, e_v in ecc_t.items() if e_v == diam_t] C_t = [v for v, e_v in ecc_t.items() if e_v == rad_t] NB_closed_t = set(B_t) for u_b in B_t: NB_closed_t |= set(Gt.neighbors(u_b)) c_NB_t = nx.number_connected_components(Gt.subgraph(NB_closed_t)) assert i_t <= sw_comp - c_NB_t + 2 if len(C_t) < n_thm: ecc_C_t = max(min(dists_t[v][c_v] for c_v in C_t) for v in Gt.nodes() if v not in C_t) assert i_t <= sw_comp - ecc_C_t + 2 # Theorem #436c-dc: alpha_2(G) <= hh_zero_step(G) * WP(complement(G)) + Delta(G[D]) N_closed_t = {v: set(Gt.neighbors(v)) | {v} for v in Gt.nodes()} D_ndom_t = [u for u in Gt.nodes() if any(w != u and N_closed_t[w].issubset(N_closed_t[u]) for w in Gt.nodes())] if D_ndom_t: # Havel-Hakimi zero step seq_hh = sorted((d for _, d in Gt.degree()), reverse=True) hh_steps = 0 while any(x > 0 for x in seq_hh): seq_hh.sort(reverse=True) d0 = seq_hh.pop(0) for idx_h in range(min(d0, len(seq_hh))): seq_hh[idx_h] -= 1 hh_steps += 1 degs_comp_desc = sorted((n_thm - 1 - d for _, d in Gt.degree()), reverse=True) wp_comp = max(idx_w + 1 for idx_w, dc in enumerate(degs_comp_desc) if dc >= idx_w) delta_D_t = max((d for _, d in Gt.subgraph(D_ndom_t).degree()), default=0) assert a2_t <= hh_steps * wp_comp + delta_D_t assert i_t <= rhs_423 and i_t <= rhs_426 and i_t <= rhs_432b and i_t <= rhs_434a and i_t <= rhs_434b and i_t <= rhs_434c assert a2_t <= rhs_438a and a2_t <= rhs_438b and a2_t <= rhs_446 and a2_t <= rhs_449 and a2_t <= rhs_450 checked_theorems += 1 print(f" Proved Theorems #161, #162, #169, #177, #179, #180, #182, #183, #186, #418b, #418c, #421c, #423, #426, #432a-set, #432b, #434a, #434b, #434b2, #434c, #434d, #434e, #436c-dc, #438a, #438b, #446, #448a, #449, #450: Analytic proofs + {checked_theorems} connected graphs (3 <= n <= 6) -> 0 violations!") # 25. Conjecture 172 (#172 Reading A & #172b Reading B): L_s(G) >= -1 + Delta(B) + dist(M^2) print("\n[25] Conjecture 172 (#172 Reading A & #172b Reading B): L_s(G) >= -1 + Delta(B) + dist_min(M^2)") for k_th, g6_th in [(3, "GCOf?w"), (5, "MhCK?C@@K??@?@@?_"), (6, "PhCGK?@?G?_P_???_?G?@?_C")]: G_th = nx.from_graph6_bytes(g6_th.encode()) n_th = G_th.number_of_nodes() assert n_th == 3 * k_th - 1 dists_th = dict(nx.all_pairs_shortest_path_length(G_th)) ecc_th = {v: max(dists_th[v].values()) for v in G_th.nodes()} diam_th = max(ecc_th.values()) rad_th = min(ecc_th.values()) assert rad_th == diam_th == k_th B_th = [v for v, e_v in ecc_th.items() if e_v == diam_th] delta_B = max(G_th.degree(v) for v in B_th) assert delta_B == 3 G_sq = nx.power(G_th, 2) max_sq_deg = max(d for _, d in G_sq.degree()) M_sq = [v for v, d in G_sq.degree() if d == max_sq_deg] assert len(M_sq) == 2 dist_G_M2 = dists_th[M_sq[0]][M_sq[1]] dist_G2_M2 = nx.shortest_path_length(G_sq, M_sq[0], M_sq[1]) Ls_th = 4 # Generalized theta graph Theta_{k,k,k} has cyclomatic number 2, max leaf spanning tree has 4 leaves rhs_172_A = -1 + delta_B + dist_G2_M2 rhs_172_B = -1 + delta_B + dist_G_M2 print(f" Theta_({k_th},{k_th},{k_th}) ({g6_th}, n={n_th}): L_s(G)={Ls_th}, Delta(B)={delta_B}, dist_G2(M^2)={dist_G2_M2} -> RHS_A={rhs_172_A}; dist_G(M^2)={dist_G_M2} -> RHS_B={rhs_172_B}") assert Ls_th < rhs_172_B if k_th >= 5: assert Ls_th < rhs_172_A # 26. Conjecture 181 (#181): L_s(G) + b(G) >= alpha(G) + deg_avg(B(G^2)) print("\n[26] Conjecture 181 (#181): L_s(G) + b(G) >= alpha(G) + deg_avg(B(G^2))") g6_181 = "N~~eeQoiCoM?Y?U?F??" G_181 = nx.from_graph6_bytes(g6_181.encode()) n_181 = G_181.number_of_nodes() assert n_181 == 15 and G_181.number_of_edges() == 40 # PureSplit(5, 3): clique K_5 = {0..4}, independent set I* = {5..14} of all 10 triples of K_5 alpha_181 = independence_number(G_181) assert alpha_181 == 10 G_181_sq = nx.power(G_181, 2) assert G_181_sq.number_of_edges() == 15 * 14 // 2 # diam(G) = 2 => G^2 = K_15 deg_avg_B_G2 = 14 # Hitting all 3-subsets of K_5 requires 5 - 3 + 1 = 3 vertices of K_5 => gamma_c(G) = 3 => L_s(G) = 15 - 3 = 12 Ls_181 = 12 # Any 2 vertices of K_5 share 3 common neighbors in I*, and adding >=3 vertices of K_5 induces K_3 (not bipartite) => b(G) = 11 b_181 = 11 lhs_181 = Ls_181 + b_181 rhs_181 = alpha_181 + deg_avg_B_G2 print(f" PureSplit(5,3) ({g6_181}, n=15, m=40): L_s(G)={Ls_181}, b(G)={b_181} -> LHS={lhs_181} < RHS={rhs_181} (alpha={alpha_181}, deg_avg(B(G^2))={deg_avg_B_G2}) -> VIOLATION!") assert lhs_181 < rhs_181 # 27. Conjecture 171 (#171): L_s(G) >= (max_v dist_even(v) - 1) / dist_avg(B) print("\n[27] Conjecture 171 (#171): L_s(G) >= (max_v dist_even(v) - 1) / dist_avg(B)") from fractions import Fraction g6_171 = "yhCI?C@@I??@?@@Cg???@??CCPI?????C??@@CPI??????@???@@CPCg???????@????CCPCPI?????????C????@@CPCPI??????????@?????@@CPCPCg???????????@??????CCPCPCPI?????????????C??????@@CPCPCPI??????????????@???????@@CPCPCPC`aGaGaGaGWaGaGaGbBCPCPCPC[KPCPCPCPwWaGaGaGbwWaGaGaGb{KPCPCPCP~BCPCPCPC^w" G_171 = nx.from_graph6_bytes(g6_171.encode()) n_171 = G_171.number_of_nodes() assert n_171 == 58 and G_171.number_of_edges() == 247 dists_171 = dict(nx.all_pairs_shortest_path_length(G_171)) ecc_171 = {v: max(dists_171[v].values()) for v in G_171.nodes()} diam_171 = max(ecc_171.values()) assert diam_171 == 5 B_171 = sorted([v for v, e_v in ecc_171.items() if e_v == diam_171]) assert len(B_171) == 21 sum_B_171 = sum(dists_171[B_171[i]][B_171[j]] for i in range(len(B_171)) for j in range(i + 1, len(B_171))) dist_avg_B_171 = Fraction(sum_B_171, len(B_171) * (len(B_171) - 1) // 2) assert dist_avg_B_171 == Fraction(29, 21) max_even_171 = max(sum(1 for u in G_171.nodes() if dists_171[v][u] % 2 == 0) for v in G_171.nodes()) assert max_even_171 == 44 # Exact gamma_c(G_171) = 2*r + 3 = 27 => L_s(G_171) = 58 - 27 = 31 Ls_171 = 31 rhs_171 = Fraction(max_even_171 - 1, 1) / dist_avg_B_171 print(f" Twin-Clique Multi-Path G_(1,12,20,4) (n=58, m=247): L_s(G)={Ls_171}, |B|={len(B_171)}, dist_avg(B)={dist_avg_B_171}, max_even={max_even_171} -> RHS={rhs_171} ({float(rhs_171):.4f}) > {Ls_171} -> VIOLATION!") assert Ls_171 < rhs_171 # 28. Conjectures 184 & 185 (#184 & #185): # #184: L_s(G) + b(G) >= Delta(G^2) + 2 * dist_avg(B(G^2), V(G^2)) # #185: L_s(G) + b(G) >= Delta(G^2) + 2 * dist_avg(G^2) print("\n[28] Conjectures 184 & 185 (#184 & #185): L_s(G) + b(G) vs Delta(G^2) + 2*dist_avg") for label_184, g6_184, a_p, r_p, check_185 in [ ("Crown-of-Leaves-Plus-Clique G_(5,4) (n=15, #184 witness)", "Nj\z{A@_[B_G?G?C?@?", 5, 4, False), ("Crown-of-Leaves-Plus-Clique G_(8,6) (n=22, simultaneous #184 & #185 witness)", "Uj\zz|~^{?O@_B_Bo@{?^?A??C??C??A???_??C?", 8, 6, True), ]: G_184 = nx.from_graph6_bytes(g6_184.encode()) n_184 = G_184.number_of_nodes() assert n_184 == a_p + 2 * r_p + 2 G_184_sq = nx.power(G_184, 2) delta_G2 = max(d for _, d in G_184_sq.degree()) assert delta_G2 == n_184 - 1 dists_G2 = dict(nx.all_pairs_shortest_path_length(G_184_sq)) ecc_G2 = {v: max(dists_G2[v].values()) for v in G_184_sq.nodes()} diam_G2 = max(ecc_G2.values()) B_G2 = [v for v, e_v in ecc_G2.items() if e_v == diam_G2] assert len(B_G2) == n_184 - 1 # Exact gamma_c(G_(a,r)) = r + 2 => L_s(G) = n - (r + 2) = a + r # Exact max induced bipartite subgraph b(G_(a,r)) = r + 4 => LHS = L_s + b = n + 2 Ls_184 = a_p + r_p b_184 = r_p + 4 lhs_184 = Ls_184 + b_184 assert lhs_184 == n_184 + 2 # dist_avg(B(G^2), V(G^2)) = average of avg_dist(u) over u in B(G^2) sum_B_to_V = sum(dists_G2[u][v] for u in B_G2 for v in G_184_sq.nodes() if v != u) dist_avg_B_V = Fraction(sum_B_to_V, len(B_G2) * (n_184 - 1)) rhs_184 = delta_G2 + 2 * dist_avg_B_V # Closed-form identity check: RHS_184 - LHS = (2r(r-3) - (a-(2r-1))^2) / (n-1)^2 assert rhs_184 - lhs_184 == Fraction(2 * r_p * (r_p - 3) - (a_p - (2 * r_p - 1)) ** 2, (n_184 - 1) ** 2) assert lhs_184 < rhs_184 if check_185: sum_all_G2 = sum(dists_G2[u][v] for u in G_184_sq.nodes() for v in G_184_sq.nodes() if u < v) dist_avg_G2 = Fraction(sum_all_G2, n_184 * (n_184 - 1) // 2) rhs_185 = delta_G2 + 2 * dist_avg_G2 assert rhs_185 - lhs_184 == Fraction(2 * r_p * (r_p - 3) - (a_p + 2 * r_p + 1) - (a_p - (2 * r_p - 1)) ** 2, n_184 * (n_184 - 1)) assert lhs_184 < rhs_185 print(f" {label_184}: L_s={Ls_184}, b={b_184} -> LHS={lhs_184} < RHS_184={rhs_184} ({float(rhs_184):.6f}) AND LHS={lhs_184} < RHS_185={rhs_185} ({float(rhs_185):.6f}) -> BOTH VIOLATED!") else: print(f" {label_184}: L_s={Ls_184}, b={b_184} -> LHS={lhs_184} < RHS_184={rhs_184} ({float(rhs_184):.6f}) -> VIOLATION!") print("\n[29] Conjectures 358 & 359 (#358 & #359, with archival 0xbd 1/2 restored): gamma_t(T) >= 1/2*ecc(C) + isolates(S) and 1/2*ecc(C) + c(S u L)") for label_358, g6_358, exp_n, exp_gt, exp_rad, exp_set_ecc, exp_iso in [ ("Bicentral rad(T) reading witness (K???C@_EEGAW, n=12)", b"K???C@_EEGAW", 12, 6, 5, 4, 4), ("Unicentral DEF 52 & rad(T) witness (RhCGGCGOC??@?@??_?G?@??C?@??O?, n=19)", b"RhCGGCGOC??@?@??_?G?@??C?@??O?", 19, 9, 7, 7, 6), ]: G_358 = nx.from_graph6_bytes(g6_358) assert nx.is_tree(G_358) and G_358.number_of_nodes() == exp_n gt_358 = total_domination_number(G_358) degs_358 = dict(G_358.degree()) L_358 = {v for v, d in degs_358.items() if d == 1} S_358 = {u for v in L_358 for u in G_358.neighbors(v)} dists_358 = dict(nx.all_pairs_shortest_path_length(G_358)) ecc_358 = {v: max(dists_358[v].values()) for v in G_358.nodes()} rad_358 = min(ecc_358.values()) C_358 = {v for v, e_v in ecc_358.items() if e_v == rad_358} set_ecc_358 = max(min(dists_358[c][v] for c in C_358) for v in G_358.nodes() if v not in C_358) iso_S_358 = sum(1 for v in S_358 if not (set(G_358.neighbors(v)) & S_358)) comp_SL_358 = nx.number_connected_components(G_358.subgraph(S_358 | L_358)) assert gt_358 == exp_gt and rad_358 == exp_rad and set_ecc_358 == exp_set_ecc and iso_S_358 == exp_iso and comp_SL_358 == exp_iso rhs_rad = Fraction(rad_358, 2) + iso_S_358 rhs_def52 = Fraction(set_ecc_358, 2) + iso_S_358 assert gt_358 < rhs_rad if exp_n == 19: assert len(C_358) == 1 and gt_358 < rhs_def52 print(f" {label_358}: |C|={len(C_358)}, gamma_t={gt_358}, RHS_rad={rhs_rad} ({float(rhs_rad):.2f}), RHS_DEF52={rhs_def52} ({float(rhs_def52):.2f})") print("\n[30] Conjecture 374 (#374, Trees): gamma_t(T) >= dist_avg(B) + median(T) under ALL 3 readings of dist_avg(B)") G_374 = nx.from_graph6_bytes(b"KqDAA@?OA?G?") n_374 = G_374.number_of_nodes() assert nx.is_tree(G_374) and n_374 == 12 gt_374 = total_domination_number(G_374) degs_374 = sorted(d for _, d in G_374.degree()) median_374 = Fraction(degs_374[(n_374 - 1) // 2] + degs_374[n_374 // 2], 2) dists_374 = dict(nx.all_pairs_shortest_path_length(G_374)) ecc_374 = {v: max(dists_374[v].values()) for v in G_374.nodes()} diam_374 = max(ecc_374.values()) B_374 = {v for v, e_v in ecc_374.items() if e_v == diam_374} assert gt_374 == 3 and diam_374 == 4 and len(B_374) == 2 and median_374 == 1 dist_to_B = {v: min(dists_374[b][v] for b in B_374) for v in G_374.nodes()} rhs_374_V = Fraction(sum(dist_to_B.values()), n_374) + median_374 rhs_374_VB = Fraction(sum(d for v, d in dist_to_B.items() if v not in B_374), n_374 - len(B_374)) + median_374 b_list = sorted(B_374) rhs_374_pair = Fraction(dists_374[b_list[0]][b_list[1]], 1) + median_374 assert gt_374 < rhs_374_V and gt_374 < rhs_374_VB and gt_374 < rhs_374_pair print(f" Subdivided-Broom Star T_7^(374) (KqDAA@?OA?G?, n=12): gamma_t={gt_374} < RHS_V={rhs_374_V} ({float(rhs_374_V):.4f}), < RHS_(V\\B)={rhs_374_VB} ({float(rhs_374_VB):.4f}), < RHS_pair={rhs_374_pair} -> VIOLATED UNDER ALL 3 READINGS!") print("\n[31] Conjecture 340 (#340, Trees): gamma_t(T) <= c(N(L) u L) + mode_min(T) * gamma(T) — Exact Min Order n=22") for label_340, g6_340, exp_n, exp_gt, exp_g, exp_mode in [ ("Exact min-order Double-Broom DB(11, 5, 5) (n=22)", b"UhCGGE??G?_@?@??_O??C?_??A?C???C?A????_?", 22, 8, 5, 1), ("Unique-mode Double-Broom DB(11, 6, 5) (n=23)", b'VhCGGE??G?_@?@??_O??C?_??A?C???C?A????_?C???', 23, 8, 5, 1), ]: G_340 = nx.from_graph6_bytes(g6_340) assert nx.is_tree(G_340) and G_340.number_of_nodes() == exp_n gt_340 = total_domination_number(G_340) g_340 = domination_number(G_340) degs_340 = [d for _, d in G_340.degree()] freq_340 = Counter(degs_340) max_f_340 = max(freq_340.values()) mode_min_340 = min(d for d, f in freq_340.items() if f == max_f_340) L_340 = {v for v, d in G_340.degree() if d == 1} S_340 = {u for v in L_340 for u in G_340.neighbors(v)} c_SL_340 = nx.number_connected_components(G_340.subgraph(S_340 | L_340)) rhs_340 = c_SL_340 + mode_min_340 * g_340 assert gt_340 == exp_gt and g_340 == exp_g and mode_min_340 == exp_mode and c_SL_340 == 2 assert gt_340 > rhs_340 print(f" {label_340}: gamma_t={gt_340} > c(N(L) u L) + mode_min*gamma = {c_SL_340} + {mode_min_340}*{g_340} = {rhs_340} -> VIOLATION!") print("\n[32] Conjecture 360 (#360, with archival 0xbd 1/2 restored): gamma_t(T) >= c(S u L) + 1/2 * dist_avg(C, V)") G_360 = nx.from_graph6_bytes(b"hhCGGC@?G_?OO?O?G?A??O?@??A??A??@???O??A???G???O???O???G???A????O???@????A????A????@?????O????A?????G?????O?????O?????G?????A??????O??????") n_360 = G_360.number_of_nodes() assert nx.is_tree(G_360) and n_360 == 41 gt_360 = total_domination_number(G_360) L_360 = {v for v, d in G_360.degree() if d == 1} S_360 = {u for v in L_360 for u in G_360.neighbors(v)} c_SL_360 = nx.number_connected_components(G_360.subgraph(S_360 | L_360)) dists_360 = dict(nx.all_pairs_shortest_path_length(G_360)) ecc_360 = {v: max(dists_360[v].values()) for v in G_360.nodes()} rad_360 = min(ecc_360.values()) C_360 = [v for v, e_v in ecc_360.items() if e_v == rad_360] sum_CV_360 = sum(dists_360[c][v] for c in C_360 for v in G_360.nodes() if c != v) dist_avg_CV_360 = Fraction(sum_CV_360, len(C_360) * (n_360 - 1)) rhs_360 = c_SL_360 + Fraction(1, 2) * dist_avg_CV_360 assert gt_360 == 6 and c_SL_360 == 4 and dist_avg_CV_360 == Fraction(321, 80) and gt_360 < rhs_360 print(f" Leaf-Amplified Two-Bridge Cluster (n=41): gamma_t={gt_360} < {c_SL_360} + (1/2)*(321/80) = {rhs_360} ({float(rhs_360):.5f}) -> VIOLATION!") print("\n[33] Conjecture 363 (#363, with archival 0xbd 1/2 restored): gamma_t(T) >= isolates(S) + 1/2 * dist_avg(B)") for label_363, g6_363, exp_n, check_all in [ ("T-Junction Cluster T_32^(363) (n=45, Def 109)", b"lhCGGC@C?G@??@??_?O?C??_?A??C??C??A???_??C???O???_???_???O???C????_???A????C????C????A?????_????C?????O?????_?????_?????O?????C??????_?????A??????C??????C??????A?????", 45, False), ("T-Junction Cluster T_44^(363) (n=57, Def 109 & All-Vertex)", b"xhCGGC@C?G@??@??_?O?C??_?A??C??C??A???_??C???O???_???_???O???C????_???A????C????C????A?????_????C?????O?????_?????_?????O?????C??????_?????A??????C??????C??????A???????_??????C???????O???????_???????_???????O???????C????????_???????A????????C????????C????????A???????", 57, True), ]: G_363 = nx.from_graph6_bytes(g6_363) assert nx.is_tree(G_363) and G_363.number_of_nodes() == exp_n gt_363 = total_domination_number(G_363) L_363 = {v for v, d in G_363.degree() if d == 1} S_363 = {u for v in L_363 for u in G_363.neighbors(v)} iso_S_363 = sum(1 for v in S_363 if not (set(G_363.neighbors(v)) & S_363)) dists_363 = dict(nx.all_pairs_shortest_path_length(G_363)) ecc_363 = {v: max(dists_363[v].values()) for v in G_363.nodes()} diam_363 = max(ecc_363.values()) B_363 = {v for v, e_v in ecc_363.items() if e_v == diam_363} dist_B_363 = {v: min(dists_363[b][v] for b in B_363) for v in G_363.nodes()} rhs_363_109 = iso_S_363 + Fraction(sum(d for v, d in dist_B_363.items() if v not in B_363), 2 * (exp_n - len(B_363))) rhs_363_all = iso_S_363 + Fraction(sum(dist_B_363.values()), 2 * exp_n) assert gt_363 == 8 and iso_S_363 == 5 and gt_363 < rhs_363_109 if check_all: assert gt_363 < rhs_363_all print(f" {label_363}: gamma_t={gt_363} < RHS_Def109={rhs_363_109} ({float(rhs_363_109):.5f}), RHS_all={rhs_363_all} ({float(rhs_363_all):.5f}) -> VIOLATION!") print("\n[34] Conjecture 364 (#364, with archival 0xbd 1/2 restored): gamma_t(T) >= |S(T)| + 1/2 * |E(D_2(T))|") for label_364, g6_364, exp_n, exp_gt, exp_S, exp_ed2 in [ ("Min-order exact witness P_4 (Ck, n=4)", b"Ck", 4, 2, 2, 1), ("Min-order floored-version witness (MhCGIA??G?_@?@_??, n=14)", b"MhCGIA??G?_@?@_??", 14, 6, 4, 6), ("5-Arm Spider Family T_4^(364) (VkCGGE??G?_@?@_???G?@??C??K?????C??@???G???_, n=23)", b"VkCGGE??G?_@?@_???G?@??C??K?????C??@???G???_", 23, 10, 5, 12), ]: G_364 = nx.from_graph6_bytes(g6_364) assert nx.is_tree(G_364) and G_364.number_of_nodes() == exp_n gt_364 = total_domination_number(G_364) L_364 = {v for v, d in G_364.degree() if d == 1} S_364 = {u for v in L_364 for u in G_364.neighbors(v)} D2_364 = {v for v, d in G_364.degree() if d == 2} ed2_364 = G_364.subgraph(D2_364).number_of_edges() rhs_364 = len(S_364) + Fraction(ed2_364, 2) assert gt_364 == exp_gt and len(S_364) == exp_S and ed2_364 == exp_ed2 and gt_364 < rhs_364 print(f" {label_364}: gamma_t={gt_364} < |S| + (1/2)|E(D_2)| = {len(S_364)} + {ed2_364}/2 = {rhs_364} ({float(rhs_364):.2f}) -> VIOLATION!") print("\n[35] Conjecture 369 (#369 & #368, Trees): gamma_t(T) >= dd_mode(T) + (n mod 2)*k — Exact Min Order n=29") G_369 = nx.from_graph6_bytes(b"\\hCGGC@?K?O?_?O?G?A??A??G??O??G??C??@???@???C???G???C???A????_???C???") n_369 = G_369.number_of_nodes() assert nx.is_tree(G_369) and n_369 == 29 gt_369 = total_domination_number(G_369) degs_369 = [d for _, d in G_369.degree()] freq_369 = Counter(degs_369) max_f_369 = max(freq_369.values()) dd_mode_369 = sum(1 for d, f in freq_369.items() if f == max_f_369) seq_369 = sorted(degs_369, reverse=True) k_369 = 0 while 0 not in seq_369: seq_369.sort(reverse=True) d_top = seq_369.pop(0) for idx_hh in range(d_top): seq_369[idx_hh] -= 1 k_369 += 1 rhs_369 = dd_mode_369 + (n_369 % 2) * k_369 assert gt_369 == 6 and dd_mode_369 == 1 and k_369 == 6 and rhs_369 == 7 and gt_369 < rhs_369 print(f" Exact min-order Havel-Hakimi Caterpillar (n=29): gamma_t={gt_369} < dd_mode + (n mod 2)*k = {dd_mode_369} + 1*{k_369} = {rhs_369} -> VIOLATION!") print("\n[36] Conjecture 373 (#373, Trees, Def 95): gamma_t(T) >= (2/3) * dist_avg(B, V)") # Asymmetric Double-Broom on P_24 (d=23, m_left=10, k_right=117, n=150) d_373, m_l_373, k_r_373 = 23, 10, 117 n_373 = (d_373 + 1) + (m_l_373 - 1) + k_r_373 G_373 = nx.Graph() for i in range(d_373): G_373.add_edge(i, i + 1) cur_373 = d_373 + 1 for _ in range(m_l_373 - 1): G_373.add_edge(1, cur_373) cur_373 += 1 for _ in range(k_r_373): G_373.add_edge(d_373 - 2, cur_373) cur_373 += 1 assert nx.is_tree(G_373) and G_373.number_of_nodes() == 150 # Verify D_t = {1, 2, 5, 6, 9, 10, 13, 14, 17, 18, 21, 22} of size 12 total-dominates G_373 dt_373 = {1, 2, 5, 6, 9, 10, 13, 14, 17, 18, 21, 22} assert all(any(u in dt_373 for u in G_373.neighbors(v)) for v in G_373.nodes()) dists_373 = dict(nx.all_pairs_shortest_path_length(G_373)) ecc_373 = {v: max(dists_373[v].values()) for v in G_373.nodes()} diam_373 = max(ecc_373.values()) B_373 = [v for v, e_v in ecc_373.items() if e_v == diam_373] tot_373 = sum(dists_373[s][v] for s in B_373 for v in G_373.nodes() if s != v) dist_avg_373 = Fraction(tot_373, len(B_373) * (n_373 - 1)) rhs_373 = Fraction(2, 3) * dist_avg_373 assert len(dt_373) == 12 and tot_373 == 29514 and len(B_373) * (n_373 - 1) == 1639 and len(dt_373) < rhs_373 print(f" Asymmetric Double-Broom (d=23, m_left=10, k_right=117, n=150): gamma_t=12 < (2/3)*(29514/1639) = {rhs_373} ({float(rhs_373):.5f}) -> VIOLATION!") print("\n[37] Conjectures 375 & 378 (#375 & #378, Trees): gamma_t(T) >= ecc(B) + lower_median(T) and c(M) + dist_avg(D_2)") G_375 = nx.from_graph6_bytes(b"DkC") gt_375 = total_domination_number(G_375) degs_375 = sorted(d for _, d in G_375.degree()) lmed_375 = degs_375[G_375.number_of_nodes() // 2] dists_375 = dict(nx.all_pairs_shortest_path_length(G_375)) B_375 = {v for v in G_375.nodes() if max(dists_375[v].values()) == 4} ecc_B_375 = max(min(dists_375[b][v] for b in B_375) for v in G_375.nodes() if v not in B_375) assert gt_375 == 3 and ecc_B_375 + lmed_375 == 4 and gt_375 < ecc_B_375 + lmed_375 G_378 = nx.from_graph6_bytes(b"Di_") gt_378 = total_domination_number(G_378) D2_378 = {v for v, d in G_378.degree() if d == 2} M_378 = {v for v, d in G_378.degree() if d == 3} c_M_378 = nx.number_connected_components(G_378.subgraph(M_378)) dists_378 = dict(nx.all_pairs_shortest_path_length(G_378)) d109_378 = Fraction(sum(min(dists_378[u][v] for u in D2_378) for v in G_378.nodes() if v not in D2_378), 5 - len(D2_378)) assert gt_378 == 2 and c_M_378 + d109_378 == Fraction(5, 2) and gt_378 < c_M_378 + d109_378 print(f" #375 on P_5 (DkC, n=5): gamma_t={gt_375} < ecc_DEF52(B) + lower_median = 2 + 2 = 4; #378 on Subdivided Claw (Di_, n=5): gamma_t={gt_378} < 1 + 6/4 = 2.5 -> BOTH VIOLATED!") print("\n[38] Conjecture 381 (#381 Reading A, Trees): gamma_t(T) >= isolates(N(S(T))) / (Delta(G[S(T)]) - 1) — Exact Min Order n=14") G_381 = nx.from_graph6_bytes(b"MhG`@?__??_@?C_??") assert nx.is_tree(G_381) and G_381.number_of_nodes() == 14 gt_381 = total_domination_number(G_381) L_381 = {v for v, d in G_381.degree() if d == 1} S_381 = {u for v in L_381 for u in G_381.neighbors(v)} NS_381 = {u for s in S_381 for u in G_381.neighbors(s)} iso_NS_381 = sum(1 for v in NS_381 if not (set(G_381.neighbors(v)) & NS_381)) delta_ind_S = max(d for _, d in G_381.subgraph(S_381).degree()) rhs_381 = Fraction(iso_NS_381, delta_ind_S - 1) assert gt_381 == 5 and iso_NS_381 == 6 and delta_ind_S == 2 and gt_381 < rhs_381 print(f" Exact min-order witness (MhG`@?__??_@?C_??, n=14): gamma_t={gt_381} < isolates(N(S))/(Delta(G[S])-1) = 6/(2-1) = 6 -> VIOLATION!") print("\n[39] Verifying 17 Newly Proved Written on the Wall II Tree Theorems (#341-#344, #348, #351-#354, #356-Def109, #361, #362, #365, #367, #372, #376, #377, #379, #380, #381-T)") tree_count = 0 for n_t in range(3, 9): for T_g in nx.nonisomorphic_trees(n_t): tree_count += 1 gt_t = total_domination_number(T_g) degs_t = [d for _, d in T_g.degree()] L_t = {v for v, d in T_g.degree() if d == 1} S_t = {u for v in L_t for u in T_g.neighbors(v)} D2_t = {v for v, d in T_g.degree() if d == 2} ND2_t = {u for v in D2_t for u in T_g.neighbors(v)} max_d_t = max(degs_t) M_t = {v for v, d in T_g.degree() if d == max_d_t} dists_t = dict(nx.all_pairs_shortest_path_length(T_g)) ecc_t = {v: max(dists_t[v].values()) for v in T_g.nodes()} rad_t = min(ecc_t.values()) C_t = {v for v, e_v in ecc_t.items() if e_v == rad_t} tdist_t = {v: sum(dists_t[v].values()) for v in T_g.nodes()} min_td_t = min(tdist_t.values()) D_min_tot_t = {v for v, td in tdist_t.items() if td == min_td_t} iso_S_t = sum(1 for v in S_t if not (set(T_g.neighbors(v)) & S_t)) iso_M_t = sum(1 for v in M_t if not (set(T_g.neighbors(v)) & M_t)) c_SL_t = nx.number_connected_components(T_g.subgraph(S_t | L_t)) c_D2_t = nx.number_connected_components(T_g.subgraph(D2_t)) if D2_t else 0 c_ND2_t = nx.number_connected_components(T_g.subgraph(ND2_t)) if ND2_t else 0 c_ND2D2_t = nx.number_connected_components(T_g.subgraph(ND2_t | D2_t)) if D2_t else 0 c_M_t = nx.number_connected_components(T_g.subgraph(M_t)) max_M_t = max(len(c_set) for c_set in nx.connected_components(T_g.subgraph(M_t))) ed2_t = T_g.subgraph(D2_t).number_of_edges() # Check #348, #351, #352, #353, #354, #356-Def109, #361, #362, #365, #376, #377, #379, #380, #381-T assert gt_t >= Fraction(2, 3) * len(ND2_t - D2_t) assert gt_t >= c_SL_t + c_ND2D2_t ecc_avg_M = Fraction(sum(ecc_t[v] for v in M_t), len(M_t)) assert gt_t >= c_ND2D2_t + math.ceil(ecc_avg_M / 2) assert gt_t >= c_D2_t + Fraction(max_M_t, 2) assert gt_t >= Fraction(len(C_t) * c_ND2_t, 2) if n_t > len(L_t): d109_L = Fraction(sum(min(dists_t[v][l] for l in L_t) for v in T_g.nodes() if v not in L_t), n_t - len(L_t)) assert gt_t >= len(C_t) * d109_L assert gt_t >= iso_S_t + len(C_t) assert gt_t >= c_SL_t + Fraction(1 + rad_t, 3) assert gt_t >= iso_S_t + Fraction(ed2_t, 3) assert gt_t >= iso_M_t + len(D_min_tot_t) assert gt_t >= iso_M_t + sorted(degs_t)[n_t // 2] assert gt_t >= c_M_t + Fraction(len(set(degs_t)), 3) if rad_t > 1: deven_t = sum(1 for d in degs_t if d % 2 == 0) assert gt_t >= Fraction(deven_t, rad_t - 1) delta_T_S = max(T_g.degree(s) for s in S_t) if delta_T_S > 1: NS_t = {u for s in S_t for u in T_g.neighbors(s)} iso_NS_t = sum(1 for v in NS_t if not (set(T_g.neighbors(v)) & NS_t)) assert gt_t >= Fraction(iso_NS_t, delta_T_S - 1) print(f" Proved Tree Theorems (#341-#344, #348, #351-#354, #356-Def109, #361, #362, #365, #367, #372, #376, #377, #379, #380, #381-T): Analytic proofs + {tree_count} non-isomorphic trees (3 <= n <= 8) -> 0 violations!") print("\n[40] Conjecture 412f (#412f General Clause): |H| >= mu(G[V \\ N(P)]) (Disproved; Bipartite Clause Proved as Theorem #412f-bip)") for label_412f, g6_412f, exp_n, exp_h, exp_hpos, exp_mu in [ ("Min-order witness K_3 (n=3, H=empty)", b"Bw", 3, 0, 0, 1), ("Min-order pendant witness (n=6, P!=empty, |H|=1)", b"EQjg", 6, 1, 0, 2), ("Positive critical-difference witness (n=12, max(|I|-|N(I)|)=+1)", b"KsC[?CB_??_B", 12, 2, 2, 3), ]: G_412f = nx.from_graph6_bytes(g6_412f) assert nx.is_connected(G_412f) and G_412f.number_of_nodes() == exp_n H_412f, Hpos_412f, diff_412f, _ = critical_independence_union(G_412f) P_412f = {u for u, d in G_412f.degree() if d == 1} NP_412f = {w for u in P_412f for w in G_412f.neighbors(u)} V_NP_412f = set(G_412f.nodes()) - NP_412f mu_412f = len(nx.max_weight_matching(G_412f.subgraph(V_NP_412f), maxcardinality=True)) assert len(H_412f) == exp_h and len(Hpos_412f) == exp_hpos and mu_412f == exp_mu and len(H_412f) < mu_412f print(f" {label_412f} ({g6_412f.decode()}): |H|={len(H_412f)} (|H_pos|={len(Hpos_412f)}, max_diff={diff_412f}) < mu(V\\N(P))={mu_412f} -> VIOLATION!") print("\n[41] Verifying 12 Newly Proved Critical Independence Theorems (#404, #405, #406, #407, #410a, #410b, #412a, #412b, #412d, #412e, #412f-bip, #416)") crit_tree_cnt = 0 for n_ct in range(3, 9): for T_c in nx.nonisomorphic_trees(n_ct): crit_tree_cnt += 1 H_c, _, _, _ = critical_independence_union(T_c) peN_Hc, pN_Hc = private_external_neighbors(T_c, H_c) assert peN_Hc == 0 L_c = {v for v, d in T_c.degree() if d == 1} S_c = {u for v in L_c for u in T_c.neighbors(v)} VL_c = set(T_c.nodes()) - L_c peN_VLc, pN_VLc = private_external_neighbors(T_c, VL_c) alpha_VLc = independence_number(T_c.subgraph(VL_c)) if VL_c else 0 assert pN_Hc <= 2 * (len(S_c) - 1) assert pN_Hc <= 2 * alpha_VLc assert pN_Hc <= pN_VLc - 2 assert peN_Hc <= peN_VLc - 2 crit_conn_cnt = 0 for n_cg in range(3, 7): for G_c in nx.graph_atlas_g(): if G_c.number_of_nodes() != n_cg or not nx.is_connected(G_c): continue crit_conn_cnt += 1 H_c, _, _, _ = critical_independence_union(G_c) degs_c = dict(G_c.degree()) dmin_c, dmax_c = min(degs_c.values()), max(degs_c.values()) A_c = {v for v, d in degs_c.items() if d == dmin_c} M_c = {v for v, d in degs_c.items() if d == dmax_c} P_c = {v for v, d in degs_c.items() if d == 1} A2_c = {v for v, d in degs_c.items() if d == 2} NP_c = {u for v in P_c for u in G_c.neighbors(v)} NNP_c = {u for v in NP_c for u in G_c.neighbors(v)} dists_c = dict(nx.all_pairs_shortest_path_length(G_c)) ev_c = {v: sum(1 for u, d in dists_c[v].items() if d > 0 and d % 2 == 0) for v in G_c.nodes()} De_max_c = {v for v, c in ev_c.items() if c == max(ev_c.values())} De_min_c = {v for v, c in ev_c.items() if c == min(ev_c.values())} assert len(H_c) <= (n_cg - len(A_c)) + (n_cg - len(M_c)) + G_c.subgraph(De_max_c).number_of_edges() assert len(H_c) <= (n_cg - len(A_c)) + (n_cg - len(M_c)) + G_c.subgraph(De_min_c).number_of_edges() cL_NPc = max((len(c) for c in nx.connected_components(G_c.subgraph(NP_c))), default=0) assert len(H_c) >= cL_NPc if nx.is_bipartite(G_c): V_NNPc = set(G_c.nodes()) - NNP_c a_VNNPc = independence_number(G_c.subgraph(V_NNPc)) if V_NNPc else 0 a_A2c = independence_number(G_c.subgraph(A2_c)) if A2_c else 0 assert len(H_c) >= cL_NPc + a_VNNPc assert len(H_c) >= cL_NPc + a_A2c assert len(H_c) >= total_domination_number(G_c) delta_NNPc = max((d for _, d in G_c.subgraph(NNP_c).degree()), default=0) assert len(H_c) >= 1 + delta_NNPc V_NPc = set(G_c.nodes()) - NP_c c_VNPc = nx.number_connected_components(G_c.subgraph(V_NPc)) if V_NPc else 0 mu_VNPc = len(nx.max_weight_matching(G_c.subgraph(V_NPc), maxcardinality=True)) if V_NPc else 0 assert len(H_c) >= c_VNPc + mu_VNPc if max(max(d.values()) for d in dists_c.values()) <= 2: iso_NNPc = sum(1 for v in NNP_c if G_c.subgraph(NNP_c).degree(v) == 0) assert len(H_c) >= iso_NNPc - 2 print(f" Proved Critical Independence Theorems (#404-#407, #410a, #410b, #412a, #412b, #412d, #412e, #412f-bip, #416): Analytic proofs + {crit_tree_cnt} trees & {crit_conn_cnt} connected graphs -> 0 violations!") print("\n[42] Conjectures 382b (n=3) & 400b (n=3): Disproved on K_3 ('Bw', n=3, m=3); #382b Proved for all n >= 4") G_k3 = nx.from_graph6_bytes(b"Bw") g2_k3 = k_domination_number(G_k3) a_k3 = independence_number(G_k3) A_k3 = annihilation_number(G_k3) rhs_382b_k3 = -1 + a_k3 * (2 + 0) rhs_400b_k3 = A_k3 + 0 assert g2_k3 == 2 and rhs_382b_k3 == 1 and rhs_400b_k3 == 1 and G_k3.number_of_edges() > (3 ** 2) / 4 print(f" K_3 ('Bw', n=3, m=3): gamma_2={g2_k3} > RHS_382b={rhs_382b_k3} and gamma_2={g2_k3} > RHS_400b={rhs_400b_k3} (|E|=3 > 9/4) -> VIOLATION!") print("\n[43] Conjecture 382c (#382c, 2-Domination): gamma_2(G) <= (alpha(G) * ecc_avg(A_delta) + |B|) / 2") for lbl_382c, g6_382c, exp_n, exp_g2, exp_alpha, exp_B in [ ("Diameter-4 Peripheral-K_4 Cluster k=3 (n=17)", b"P~?GW\e?G@ks?@?@ks_?@??K", 17, 10, 5, 4), ("Strict-Integer Violation k=4 (n=20)", b"S~?GW\e?G@ks?@?@ks_?@??Lec_??G??K", 20, 12, 6, 4), ]: G_382c = nx.from_graph6_bytes(g6_382c) assert nx.is_connected(G_382c) and G_382c.number_of_nodes() == exp_n g2_c = k_domination_number(G_382c) a_c = independence_number(G_382c) ecc_c = nx.eccentricity(G_382c) dmin_c = min(d for _, d in G_382c.degree()) Ad_c = [v for v, d in G_382c.degree() if d == dmin_c] B_c = [v for v, e in ecc_c.items() if e == max(ecc_c.values())] ecc_avg_Ad = Fraction(sum(ecc_c[v] for v in Ad_c), len(Ad_c)) rhs_382c = (a_c * ecc_avg_Ad + len(B_c)) / 2 assert g2_c == exp_g2 and a_c == exp_alpha and len(B_c) == exp_B and g2_c > rhs_382c print(f" {lbl_382c} ({g6_382c.decode()}): gamma_2={g2_c} > ({a_c}*{float(ecc_avg_Ad):.1f}+{len(B_c)})/2 = {float(rhs_382c):.1f} -> VIOLATION!") print("\n[44] Conjecture 382d (#382d, 2-Domination): gamma_2(G) <= diam(G) * (alpha(G) + |X_lmax|) / 2") for lbl_382d, g6_382d, exp_n, exp_g2, exp_alpha in [ ("Asymmetric Clique-Cluster k=4 (n=13)", b"L{C[{_@?[a?@?B", 13, 8, 4), ("Strict-Integer Violation k=5 (n=16)", b"O{C[{_@?[a?@?BcQ??G?B", 16, 10, 5), ]: G_382d = nx.from_graph6_bytes(g6_382d) assert nx.is_connected(G_382d) and G_382d.number_of_nodes() == exp_n g2_d = k_domination_number(G_382d) a_d = independence_number(G_382d) diam_d = nx.diameter(G_382d) lv_d = {v: independence_number(G_382d.subgraph(list(G_382d.neighbors(v)))) for v in G_382d.nodes()} lmax_d = max(lv_d.values()) X_d = [v for v, val in lv_d.items() if val == lmax_d] rhs_382d = Fraction(diam_d * (a_d + len(X_d)), 2) assert g2_d == exp_g2 and a_d == exp_alpha and diam_d == 3 and len(X_d) == 1 and g2_d > rhs_382d print(f" {lbl_382d} ({g6_382d.decode()}): gamma_2={g2_d} > {diam_d}*({a_d}+{len(X_d)})/2 = {float(rhs_382d):.1f} -> VIOLATION!") print("\n[45] Conjecture 391 (#391, 2-Domination): gamma_2(G) <= p(G) + 1 + mu(G[A_2]) + |E(G[T])|") for lbl_391, g6_391, exp_n, exp_g2, exp_rhs in [ ("Exact min-order witness K_{2,3} (n=5, m=6)", b"DFw", 5, 2, 1), ("Subdivided-Claw Chain Tree (n=10, m=9)", b"IoCO?EAC_", 10, 7, 6), ]: G_391 = nx.from_graph6_bytes(g6_391) assert nx.is_connected(G_391) and G_391.number_of_nodes() == exp_n g2_391 = k_domination_number(G_391) P_391 = [v for v, d in G_391.degree() if d == 1] A2_391 = [v for v, d in G_391.degree() if d == 2] T_391 = [v for v, d in G_391.degree() if d >= 3] mu_A2_391 = len(nx.max_weight_matching(G_391.subgraph(A2_391), maxcardinality=True)) eT_391 = G_391.subgraph(T_391).number_of_edges() rhs_391 = len(P_391) + 1 + mu_A2_391 + eT_391 assert g2_391 == exp_g2 and rhs_391 == exp_rhs and g2_391 > rhs_391 print(f" {lbl_391} ({g6_391.decode()}): gamma_2={g2_391} > p+1+mu(A_2)+|E(T)| = {rhs_391} -> VIOLATION!") print("\n[46] Conjecture 392c (#392c, 2-Domination): gamma_2(G) <= mu(G[V \\ A_delta]) + |A_delta| + kappa_v(G)") for lbl_392c, g6_392c, exp_n, exp_g2, exp_mu in [ ("Pentagon-Ear Bouquet k=3 (n=17)", b"PpcHK?@_G?_H_???o?G?@??c", 17, 10, 7), ("Pentagon-Ear Bouquet k=4 (n=22)", b"UpcHK?@_G?_H_???o?G?@??e?????K??C??@??@G", 22, 13, 9), ]: G_392c = nx.from_graph6_bytes(g6_392c) assert nx.is_connected(G_392c) and G_392c.number_of_nodes() == exp_n g2_92c = k_domination_number(G_392c) dmin_92c = min(d for _, d in G_392c.degree()) Ad_92c = {v for v, d in G_392c.degree() if d == dmin_92c} V_Ad = set(G_392c.nodes()) - Ad_92c mu_92c = len(nx.max_weight_matching(G_392c.subgraph(V_Ad), maxcardinality=True)) kv_92c = nx.node_connectivity(G_392c) rhs_92c = mu_92c + len(Ad_92c) + kv_92c assert g2_92c == exp_g2 and mu_92c == exp_mu and len(Ad_92c) == 1 and kv_92c == 1 and g2_92c > rhs_92c print(f" {lbl_392c} ({g6_392c.decode()}): gamma_2={g2_92c} > {mu_92c}+{len(Ad_92c)}+{kv_92c} = {rhs_92c} -> VIOLATION!") print("\n[47] Conjecture 393d (#393d, 2-Domination): gamma_2(G) <= mu(G[V \\ N(N(P))]) + alpha(G[V \\ M]) + |M_4|") for lbl_393d, g6_393d, exp_n, exp_g2, exp_a in [ ("Support-Triangle Bypass m=3 (n=15)", b"NsaKYB?oG@c?G?G?_?W", 15, 8, 6), ("Support-Triangle Bypass m=4 (n=20)", b"SsaCKL?oE?_BG?G?C?G?BC??O??_?G??K", 20, 11, 8), ]: G_393d = nx.from_graph6_bytes(g6_393d) assert nx.is_connected(G_393d) and G_393d.number_of_nodes() == exp_n g2_93d = k_domination_number(G_393d) P_93d = {v for v, d in G_393d.degree() if d == 1} NP_93d = {u for v in P_93d for u in G_393d.neighbors(v)} NNP_93d = {u for v in NP_93d for u in G_393d.neighbors(v)} V_NNP = set(G_393d.nodes()) - NNP_93d mu_93d = len(nx.max_weight_matching(G_393d.subgraph(V_NNP), maxcardinality=True)) dmax_93d = max(d for _, d in G_393d.degree()) M_93d = {v for v, d in G_393d.degree() if d == dmax_93d} a_VM = independence_number(G_393d.subgraph(set(G_393d.nodes()) - M_93d)) k4_cnt = {v: 0 for v in G_393d.nodes()} for clq in combinations(G_393d.nodes(), 4): if G_393d.subgraph(clq).number_of_edges() == 6: for v in clq: k4_cnt[v] += 1 M4_93d = [v for v, c in k4_cnt.items() if c == max(k4_cnt.values())] rhs_93d = mu_93d + a_VM + len(M4_93d) assert g2_93d == exp_g2 and mu_93d == 0 and a_VM == exp_a and len(M4_93d) == 1 and g2_93d > rhs_93d print(f" {lbl_393d} ({g6_393d.decode()}): gamma_2={g2_93d} > {mu_93d}+{a_VM}+{len(M4_93d)} = {rhs_93d} -> VIOLATION!") print("\n[48] Conjecture 394 (#394, 2-Domination): gamma_2(G) <= mu(G) + |E(G[A_2])| + |M_{l_min}|") for lbl_394, g6_394, exp_n, exp_g2, exp_mu in [ ("Triangle-Free Subdivided-K_{3,3} Module m=2 (n=15)", b"NiOXGT??G@?C?B?C_?g", 15, 9, 7), ("Triangle-Free Subdivided-K_{3,3} Module m=3 (n=22)", b"UiOXGT??G@?C?B?C_?i????C??O??_??K??H???g", 22, 13, 10), ]: G_394 = nx.from_graph6_bytes(g6_394) assert nx.is_connected(G_394) and G_394.number_of_nodes() == exp_n g2_94 = k_domination_number(G_394) mu_94 = len(nx.max_weight_matching(G_394, maxcardinality=True)) A2_94 = [v for v, d in G_394.degree() if d == 2] eA2_94 = G_394.subgraph(A2_94).number_of_edges() lv_94 = {v: independence_number(G_394.subgraph(list(G_394.neighbors(v)))) for v in G_394.nodes()} Mlmin_94 = [v for v, val in lv_94.items() if val == min(lv_94.values())] rhs_94 = mu_94 + eA2_94 + len(Mlmin_94) assert g2_94 == exp_g2 and mu_94 == exp_mu and eA2_94 == 0 and len(Mlmin_94) == 1 and g2_94 > rhs_94 print(f" {lbl_394} ({g6_394.decode()}): gamma_2={g2_94} > {mu_94}+{eA2_94}+{len(Mlmin_94)} = {rhs_94} -> VIOLATION!") print("\n[49] Conjectures 395b & 396 (#395b & #396, 2-Domination): Simultaneously Disproved at n=17") G_395b = nx.from_graph6_bytes(b"P~CGW[NBwO@`BbBr`xw?^?B{") g2_95b = k_domination_number(G_395b) degs_95b = [d for _, d in G_395b.degree()] cnt_95b = Counter(degs_95b) max_f_95b = max(cnt_95b.values()) modes_95b = {d for d, f in cnt_95b.items() if f == max_f_95b} M_95b = [v for v, d in G_395b.degree() if d in modes_95b] Ad_95b = {v for v, d in G_395b.degree() if d == min(degs_95b)} A3_95b = {v for v, d in G_395b.degree() if d >= 3} delta_VAd = min(d for _, d in G_395b.subgraph(set(G_395b.nodes()) - Ad_95b).degree()) sdegs_95b = sorted(degs_95b) dd_95b = [sdegs_95b[i + 1] - sdegs_95b[i] for i in range(len(sdegs_95b) - 1) if sdegs_95b[i + 1] > sdegs_95b[i]] dd_cnt = Counter(dd_95b) dd_mode = min(d for d, f in dd_cnt.items() if f == max(dd_cnt.values())) rhs_395b = len(M_95b) + delta_VAd + (G_395b.number_of_nodes() - len(A3_95b)) rhs_396 = dd_mode + len(M_95b) + 0 assert g2_95b == 6 and rhs_395b == 4 and rhs_396 == 4 and g2_95b > rhs_395b print(f" Diversified-Clique Half-Graph ('P~CGW[NBwO@`BbBr`xw?^?B{{', n=17, m=57): gamma_2={g2_95b} > RHS_395b={rhs_395b} and RHS_396={rhs_396} -> VIOLATION!") print("\n[50] Conjecture 398 (#398, 2-Domination): gamma_2(G) <= |E(G[V \\ N(N(P))])| + pN(V \\ N(P)) + |E(P, V \\ P)|") for lbl_398, g6_398 in [("Path P_5 (n=5)", b"DQo"), ("Bull graph (n=5)", b"DEk")]: G_398 = nx.from_graph6_bytes(g6_398) g2_98 = k_domination_number(G_398) P_98 = {v for v, d in G_398.degree() if d == 1} NP_98 = {u for v in P_98 for u in G_398.neighbors(v)} NNP_98 = {u for v in NP_98 for u in G_398.neighbors(v)} V_NP_98 = set(G_398.nodes()) - NP_98 V_NNP_98 = set(G_398.nodes()) - NNP_98 e_VNNP = G_398.subgraph(V_NNP_98).number_of_edges() pN_VNP = sum(1 for v in G_398.nodes() if len(set(G_398.neighbors(v)) & V_NP_98) == 1) e_P = len(P_98) rhs_98 = e_VNNP + pN_VNP + e_P assert g2_98 == 3 and rhs_98 == 2 and g2_98 > rhs_98 print(f" {lbl_398} ({g6_398.decode()}): gamma_2={g2_98} > {e_VNNP}+{pN_VNP}+{e_P} = {rhs_98} -> VIOLATION!") print("\n[51] Conjecture 399a (#399a, 2-Domination): gamma_2(G) <= WP(bar(G)) + floor(alpha(G[C]) / 2)") for lbl_399a, g6_399a in [("Path P_4 (n=4)", b"CU"), ("Paw graph (n=4)", b"CV")]: G_399a = nx.from_graph6_bytes(g6_399a) g2_99a = k_domination_number(G_399a) Gc_99a = nx.complement(G_399a) degs_c = sorted((d for _, d in Gc_99a.degree()), reverse=True) wp_c = max(min(i + 1, degs_c[i] + 1) for i in range(len(degs_c))) ecc_99a = nx.eccentricity(G_399a) C_99a = [v for v, e in ecc_99a.items() if e == min(ecc_99a.values())] a_C = independence_number(G_399a.subgraph(C_99a)) rhs_99a = wp_c + (a_C // 2) assert g2_99a == 3 and rhs_99a == 2 and g2_99a > rhs_99a print(f" {lbl_399a} ({g6_399a.decode()}): gamma_2={g2_99a} > WP(bar(G))+floor(alpha(C)/2) = {wp_c}+{a_C // 2} = {rhs_99a} -> VIOLATION!") print("\n[52] Conjecture 399c (#399c, 2-Domination): gamma_2(G) <= (2/3) * WP(bar(G)) + 2 * |M|") for lbl_399c, g6_399c, exp_n, exp_g2, exp_wp in [ ("Cocktail-Party Bypass r=2 (n=16)", b"O]~v~z~~u?E?B??o?EC??", 16, 7, 7), ("Cocktail-Party Bypass r=3 (n=19)", b"R]~v~z~~v~~}o?K?@_?E??K??KC???", 19, 8, 8), ]: G_399c = nx.from_graph6_bytes(g6_399c) assert nx.is_connected(G_399c) and G_399c.number_of_nodes() == exp_n g2_99c = k_domination_number(G_399c) Gc_99c = nx.complement(G_399c) degs_c = sorted((d for _, d in Gc_99c.degree()), reverse=True) wp_c = max(min(i + 1, degs_c[i] + 1) for i in range(len(degs_c))) dmax_99c = max(d for _, d in G_399c.degree()) M_99c = [v for v, d in G_399c.degree() if d == dmax_99c] rhs_99c = Fraction(2 * wp_c, 3) + 2 * len(M_99c) assert g2_99c == exp_g2 and wp_c == exp_wp and len(M_99c) == 1 and g2_99c > rhs_99c print(f" {lbl_399c} ({g6_399c.decode()}): gamma_2={g2_99c} > (2/3)*{wp_c} + 2*{len(M_99c)} = {float(rhs_99c):.4f} -> VIOLATION!") print("\n[53] Conjecture 400a (#400a, 2-Domination): gamma_2(G) <= A(G) + floor(1 / dd_{K_4}(G))") for lbl_400a, g6_400a, exp_n, exp_g2, exp_A in [ ("K_4-Plus-Leafed-C_4 Chain s=1 (n=11)", b"J~_GOKC?_A?", 11, 7, 6), ("K_4-Plus-Leafed-C_4 Chain s=2 (n=17)", b"P~_GOKC?_A?@?A?@_?_?C??O", 17, 11, 10), ("K_4-Plus-Leafed-C_4 Chain s=3 (n=23)", b"V~_GOKC?_A?@?A?@_?_?C??O??G??O??K??C???_??A?", 23, 15, 14), ]: G_400a = nx.from_graph6_bytes(g6_400a) assert nx.is_connected(G_400a) and G_400a.number_of_nodes() == exp_n g2_00a = k_domination_number(G_400a) A_00a = annihilation_number(G_400a) k4_00a = {v: 0 for v in G_400a.nodes()} for clq in combinations(G_400a.nodes(), 4): if G_400a.subgraph(clq).number_of_edges() == 6: for v in clq: k4_00a[v] += 1 dd_k4 = len(set(k4_00a.values())) rhs_00a = A_00a + (1 // dd_k4) assert g2_00a == exp_g2 and A_00a == exp_A and dd_k4 == 2 and g2_00a > rhs_00a print(f" {lbl_400a} ({g6_400a.decode()}): gamma_2={g2_00a} > A(G)+floor(1/{dd_k4}) = {A_00a}+0 = {rhs_00a} -> VIOLATION!") print("\n[54] Conjecture 400c (#400c, 2-Domination): gamma_2(G) <= floor(3 * A(G) / disp_min(G))") for lbl_400c, g6_400c, exp_n, exp_g2, exp_A, exp_dmin in [ ("3-Clique Cyclic-Matching Half-Graph r=3, s=13 (n=39)", b"f~~~~~~~~~~~~~????H?BC?[G@wGBwCB{@`~?w^wNr~`~N~F~~~N~~~_???????@G?c?KOEG?wO[G@wG{C@{A}@?~?^_KNwB{B`~_Bo^f~?F`~N~?@b~~~_?r~~~w", 39, 6, 22, 12), ("2-Clique Pure Half-Graph r=2, s=21 (n=42)", b"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~???????_??F???^???~_??~w??^~??F~{??~~w?B~~w?F~~{?F~~~?B~~~w?~~~~_F~~~~?^~~~~?~~~~~_~~~~~w^~~~~~F~~~~~{~~~~~~w", 42, 4, 24, 19), ("4-Clique Twin-Portal Half-Graph r=4, s=11 (n=44)", b"k~~~~~~~~~_??@?B_Bw@~?^{B~wN~w^~{^~~N~~w??????@G??BC??B`??@wG??^?_?B{@??Nw@??^w?_?^{?G?N~???????????_?G??F??G??^??C??~_?@??~w??G?^~???_F~{??@?~~w??@B~~w???f~~{", 44, 8, 26, 10), ]: G_400c = nx.from_graph6_bytes(g6_400c) assert nx.is_connected(G_400c) and G_400c.number_of_nodes() == exp_n g2_00c = k_domination_number(G_400c) A_00c = annihilation_number(G_400c) dmin_00c = min(len({G_400c.degree(u) for u in G_400c.neighbors(v)}) for v in G_400c.nodes()) rhs_00c = (3 * A_00c) // dmin_00c assert g2_00c == exp_g2 and A_00c == exp_A and dmin_00c == exp_dmin and g2_00c > rhs_00c print(f" {lbl_400c} (n={exp_n}, m={G_400c.number_of_edges()}): gamma_2={g2_00c} > floor(3*{A_00c}/{dmin_00c}) = {rhs_00c} -> VIOLATION!") print("\n[55] Conjecture 401a (#401a, 2-Domination): gamma_2(G) <= 1 + floor(Tdist_max(G) / disp_avg(G))") G_401a = nx.from_graph6_bytes(b"[~~~w?@Nw~`~@~?~_???@Nf{]Nw[NwKF{A@~???????frx~Fbp~B`o~_oWNwCA@~") assert nx.is_connected(G_401a) and G_401a.number_of_nodes() == 28 and G_401a.number_of_edges() == 174 g2_01a = k_domination_number(G_401a) dists_01a = dict(nx.all_pairs_shortest_path_length(G_401a)) tdist_max_01a = max(sum(dists_01a[v].values()) for v in G_401a.nodes()) disp_avg_01a = Fraction(sum(len({G_401a.degree(u) for u in G_401a.neighbors(v)}) for v in G_401a.nodes()), G_401a.number_of_nodes()) rhs_01a = 1 + int(Fraction(tdist_max_01a, 1) // disp_avg_01a) assert g2_01a == 8 and tdist_max_01a == 54 and disp_avg_01a == Fraction(57, 7) and rhs_01a == 7 and g2_01a > rhs_01a print(f" 4-Clique All-Pairs Half-Graph (n=28, m=174): gamma_2={g2_01a} > 1 + floor({tdist_max_01a} / (57/7)) = {rhs_01a} -> VIOLATION!") print("\n[56] Conjecture 402 (#402, 2-Domination): gamma_2(G) <= 2 * [isolates(G[A_delta]) + pN(A_Delta) + gamma_t(G)]") for lbl_402, g6_402, exp_n, exp_g2 in [ ("True-Twin Windmill k=3 (n=13)", b"L~CW_f_wF?[?w?", 13, 5), ("True-Twin Windmill k=4 (n=17)", b"P~CW_cOCN?[?w?w?[?F??w??", 17, 6), ]: G_402 = nx.from_graph6_bytes(g6_402) assert nx.is_connected(G_402) and G_402.number_of_nodes() == exp_n g2_02 = k_domination_number(G_402) degs_02 = dict(G_402.degree()) Ad_02 = {v for v, d in degs_02.items() if d == min(degs_02.values())} AM_02 = {v for v, d in degs_02.items() if d == max(degs_02.values())} iso_Ad_02 = sum(1 for v in Ad_02 if G_402.subgraph(Ad_02).degree(v) == 0) pN_AM_02 = sum(1 for v in G_402.nodes() if len(set(G_402.neighbors(v)) & AM_02) == 1) gt_02 = total_domination_number(G_402) rhs_02 = 2 * (iso_Ad_02 + pN_AM_02 + gt_02) assert g2_02 == exp_g2 and iso_Ad_02 == 0 and pN_AM_02 == 0 and gt_02 == 2 and rhs_02 == 4 and g2_02 > rhs_02 print(f" {lbl_402} ({g6_402.decode()}): gamma_2={g2_02} > 2*(0+0+{gt_02}) = {rhs_02} -> VIOLATION!") print("\n[57] Verifying 7 Newly Proved 2-Domination Theorems (#382b for n>=4, #392d, #393a, #393b, #393c, #397c, #399b)") dom2_conn_cnt = 0 for n_d2 in range(4, 7): for G_d2 in nx.graph_atlas_g(): if G_d2.number_of_nodes() != n_d2 or not nx.is_connected(G_d2): continue dom2_conn_cnt += 1 g2_v = k_domination_number(G_d2) degs_v = dict(G_d2.degree()) dmin_v = min(degs_v.values()) P_v = {v for v, d in degs_v.items() if d == 1} Ad_v = {v for v, d in degs_v.items() if d == dmin_v} A3_v = {v for v, d in degs_v.items() if d >= 3} NP_v = {u for v in P_v for u in G_d2.neighbors(v)} NNP_v = {u for v in NP_v for u in G_d2.neighbors(v)} V_NP_v = set(G_d2.nodes()) - NP_v V_NNP_v = set(G_d2.nodes()) - NNP_v a_v = independence_number(G_d2) # #382b (n >= 4): gamma_2 <= -1 + alpha * (delta + |A_1|) A1_v = [v for v in G_d2.nodes() if len(set(G_d2.neighbors(v)) - Ad_v) == 1] assert g2_v <= -1 + a_v * (dmin_v + len(A1_v)) # #392d: gamma_2 <= mu(G) + mu(G[V \ N(N(P))]) + |A_delta| mu_v = len(nx.max_weight_matching(G_d2, maxcardinality=True)) mu_VNNP_v = len(nx.max_weight_matching(G_d2.subgraph(V_NNP_v), maxcardinality=True)) if V_NNP_v else 0 assert g2_v <= mu_v + mu_VNNP_v + len(Ad_v) # #393a: gamma_2 <= |V \ N(N(P))| + mu(G[N(N(P))]) + |P| mu_NNP_v = len(nx.max_weight_matching(G_d2.subgraph(NNP_v), maxcardinality=True)) if NNP_v else 0 assert g2_v <= len(V_NNP_v) + mu_NNP_v + len(P_v) # #393b: gamma_2 <= |V \ N(N(P))| + |E(G[N(P)])| + pN(N(P)) pN_NP_v = sum(1 for v in G_d2.nodes() if len(set(G_d2.neighbors(v)) & NP_v) == 1) assert g2_v <= len(V_NNP_v) + G_d2.subgraph(NP_v).number_of_edges() + pN_NP_v # #393c: gamma_2 <= |V \ N(N(P))| + |N(P)| + pN(N[P]) NclP_v = P_v | NP_v pN_NclP_v = sum(1 for v in G_d2.nodes() if len(set(G_d2.neighbors(v)) & NclP_v) == 1) assert g2_v <= len(V_NNP_v) + len(NP_v) + pN_NclP_v # #397c: gamma_2 <= |V \ N(P)| + gamma(G^2) G2_sq = nx.power(G_d2, 2) assert g2_v <= len(V_NP_v) + domination_number(G2_sq) # #399b: gamma_2 <= WP(bar(G)) + (floor(3 / alpha(A_3)) if A_3 else 0) Gc_v = nx.complement(G_d2) degs_cv = sorted((d for _, d in Gc_v.degree()), reverse=True) wp_cv = max(min(i + 1, degs_cv[i] + 1) for i in range(len(degs_cv))) a_A3_v = independence_number(G_d2.subgraph(A3_v)) if A3_v else 0 if a_A3_v > 0: assert g2_v <= wp_cv + (3 // a_A3_v) print(f" Proved 2-Domination Theorems (#382b for n>=4, #392d, #393a, #393b, #393c, #397c, #399b): Analytic proofs + {dom2_conn_cnt} connected graphs (4 <= n <= 6) -> 0 violations!") def clique_number(H): return max((len(c) for c in nx.find_cliques(H)), default=0) def hh_zero_step_seq(degs): s = sorted(degs, reverse=True) k = 0 while True: if not s or s[-1] == 0: return k, len(s) d = s[0] s = s[1:] if d > len(s): return k, len(s) for i in range(d): s[i] -= 1 s.sort(reverse=True) k += 1 def min_tds_sizes_exact(G): n_v = G.number_of_nodes() nm = [0] * n_v for u, v in G.edges(): nm[u] |= (1 << v) nm[v] |= (1 << u) full = (1 << n_v) - 1 sizes = set() for s in range(1, full + 1): cov = 0 x = s while x: lsb = x & -x v = lsb.bit_length() - 1 cov |= nm[v] x ^= lsb if cov != full: continue is_min = True x = s while x: lsb = x & -x s2 = s ^ lsb cov2 = 0 y = s2 while y: l2 = y & -y u = l2.bit_length() - 1 cov2 |= nm[u] y ^= l2 if cov2 == full: is_min = False break x ^= lsb if is_min: sizes.add(bin(s).count("1")) return sorted(sizes) print("\n[58] Verifying Conjecture 281 (#281: gamma_t(G) <= freq[l_min(bar(G))] + mu(G))") for lbl_281, g6_281, exp_gt, exp_mu in [ ("m=2 (n=17)", b"Pj_G[?@?GA?@_???_?G?C??C", 9, 7), ("m=3 (n=22)", b"Uj_G[?@?GA?@_???_?G?C??E?????G??C??C???G", 12, 9), ]: G_281 = nx.from_graph6_bytes(g6_281) gt_281 = total_domination_number(G_281) mu_281 = len(nx.max_weight_matching(G_281, maxcardinality=True)) l_bar_281 = [ clique_number(G_281.subgraph(set(G_281.nodes()) - (set(G_281.neighbors(v)) | {v}))) for v in G_281.nodes() ] lmin_281 = min(l_bar_281) freq_lmin_281 = l_bar_281.count(lmin_281) rhs_281 = freq_lmin_281 + mu_281 assert gt_281 == exp_gt and mu_281 == exp_mu and lmin_281 == 2 and freq_lmin_281 == 1 and gt_281 > rhs_281 print(f" {lbl_281} ({g6_281.decode()}): gamma_t={gt_281} > freq[l_min(bar(G))]({freq_lmin_281}) + mu({mu_281}) = {rhs_281} -> VIOLATION!") print("\n[59] Verifying Conjecture 287 (#287: gamma_t(G) <= hh_zero_step(G) + mu(bar(G)))") for lbl_287, g6_287, exp_gt, exp_k, exp_mubar in [ ("r=2 (S(3^8,2), n=27)", b"Zh_GK?@?K??@?@_???G?@_????G??K?????@???K??????@???@_???????G", 18, 4, 13), ("r=3 (S(3^11,2), n=36)", b"ch_GK?@?K??@?@_???G?@_????G??K?????@???K??????@???@_???????G???@_????????G????K?????????@?????K??????????@", 24, 5, 18), ]: G_287 = nx.from_graph6_bytes(g6_287) gt_287 = total_domination_number(G_287) k_287, _ = hh_zero_step_seq([d for _, d in G_287.degree()]) mubar_287 = len(nx.max_weight_matching(nx.complement(G_287), maxcardinality=True)) rhs_287 = k_287 + mubar_287 assert gt_287 == exp_gt and k_287 == exp_k and mubar_287 == exp_mubar and gt_287 > rhs_287 print(f" {lbl_287} ({g6_287.decode()[:28]}...): gamma_t={gt_287} > k({k_287}) + mu(bar(G))({mubar_287}) = {rhs_287} -> VIOLATION!") print("\n[60] Verifying Conjecture 291 (#291: gamma_t(G) <= hh_zero_step(G) + freq[t_min(v)] under BOTH T_min and temp_min)") for lbl_291, g6_291, exp_gt, exp_k in [ ("m=4 (n=18)", b"QpC\?C@?[??@?@?@o@??@??C??W", 9, 7), ("m=5 (n=22)", b"UpC\?C@?[??@?@?@o@??@??C??\?????C??@???W", 11, 9), ("m=6 (n=26)", b"YpC\?C@?[??@?@?@o@??@??C??[?????C??@???[??C???@???@???@_", 13, 10), ]: G_291 = nx.from_graph6_bytes(g6_291) gt_291 = total_domination_number(G_291) degs_291 = [d for _, d in G_291.degree()] k_291, _ = hh_zero_step_seq(degs_291) tri_291 = list(nx.triangles(G_291).values()) freq_Tmin_291 = tri_291.count(min(tri_291)) freq_temp_291 = degs_291.count(min(degs_291)) rhs_291 = k_291 + freq_Tmin_291 assert gt_291 == exp_gt and k_291 == exp_k and freq_Tmin_291 == 1 and freq_temp_291 == 1 and gt_291 > rhs_291 print(f" {lbl_291} ({g6_291.decode()[:28]}...): gamma_t={gt_291} > k({k_291}) + 1 = {rhs_291} -> VIOLATION!") print("\n[61] Verifying Conjecture 300 (#300: gamma_t(G) <= (n(G) + freq[l_min(bar(G))]) / 2)") for lbl_300, g6_300, exp_gt in [ ("m=3 (n=16)", b"Oj_G[?@?K??@?@_???G?@", 9), ("m=4 (n=19)", b"Rj_G[?@?K??@?@_???G?@_????G??G", 11), ]: G_300 = nx.from_graph6_bytes(g6_300) n_300 = G_300.number_of_nodes() gt_300 = total_domination_number(G_300) l_bar_300 = [ clique_number(G_300.subgraph(set(G_300.nodes()) - (set(G_300.neighbors(v)) | {v}))) for v in G_300.nodes() ] freq_lmin_300 = l_bar_300.count(min(l_bar_300)) rhs_300 = 0.5 * (n_300 + freq_lmin_300) assert gt_300 == exp_gt and freq_lmin_300 == 1 and gt_300 > rhs_300 print(f" {lbl_300} ({g6_300.decode()}): gamma_t={gt_300} > ({n_300} + {freq_lmin_300})/2 = {rhs_300} -> VIOLATION!") print("\n[62] Verifying Conjectures 308 & 309 (#308 & #309: Simultaneous Disproof via Twin-H_m Family)") for lbl_308, g6_308, exp_gt, exp_mx, exp_min_ne in [ ("m=4 (n=13)", b"L^~@?_G@?C?G?G", 8, 6, 9), ("m=5 (n=16)", b"O^~}@?OA?G?O?O?G?A??O", 10, 7, 11), ]: G_308 = nx.from_graph6_bytes(g6_308) n_308 = G_308.number_of_nodes() gt_308 = total_domination_number(G_308) dists_308 = dict(nx.all_pairs_shortest_path_length(G_308)) max_308 = 0 for v in G_308.nodes(): ev_ge0 = [u for u, d in dists_308[v].items() if d % 2 == 0] eh_ge0 = sum(1 for u in ev_ge0 if any(dists_308[v][w] == dists_308[v][u] for w in G_308.neighbors(u))) max_308 = max(max_308, len(ev_ge0) - eh_ge0) Gc_308 = nx.complement(G_308) min_ne_308 = min(len(set(Gc_308.neighbors(u)) | set(Gc_308.neighbors(v))) for u, v in Gc_308.edges()) rhs_308 = 0.5 * (max_308 + min_ne_308) assert gt_308 == exp_gt and max_308 == exp_mx and min_ne_308 == exp_min_ne and gt_308 > rhs_308 print(f" {lbl_308} ({g6_308.decode()}): gamma_t={gt_308} > ({max_308} + {min_ne_308})/2 = {rhs_308} -> VIOLATION of #308 & #309!") print("\n[63] Verifying Conjecture 319 under Positive Even Distance (#319-ConvA: max_v dist_even_>0(v) == gamma(G) => WTD)") for lbl_319, g6_319, exp_gam, exp_sizes in [ ("n=8 (bar(C_6 + K_2))", b"GUxv~w", 2, [2, 3]), ("n=11 (C_11)", b"J?`?`_B?_G_", 4, [6, 7, 8]), ]: G_319 = nx.from_graph6_bytes(g6_319) gam_319 = domination_number(G_319) dists_319 = dict(nx.all_pairs_shortest_path_length(G_319)) max_ev_pos = max(sum(1 for u, d in dists_319[v].items() if d > 0 and d % 2 == 0) for v in G_319.nodes()) sizes_319 = min_tds_sizes_exact(G_319) assert gam_319 == exp_gam and max_ev_pos == gam_319 and sizes_319 == exp_sizes and len(sizes_319) > 1 print(f" {lbl_319} ({g6_319.decode()}): max_v dist_even_>0(v) = {max_ev_pos} = gamma(G), min TDS sizes = {sizes_319} -> NOT WTD (VIOLATION!)") print("\n[64] Verifying Conjecture 327 (#327: 3*gamma(G) == i(G) => G is well total dominated)") for lbl_327, g6_327, exp_sizes in [ ("Exact min-order n=13", b"L{UAK@@_A?o?O@", [2, 6]), ("Book B_6^(4) (n=14)", b"Mr`KAE?OK?G@_?O?_", [2, 7, 12]), ]: G_327 = nx.from_graph6_bytes(g6_327) gam_327 = domination_number(G_327) id_327 = independent_domination_number(G_327) sizes_327 = min_tds_sizes_exact(G_327) assert gam_327 == 2 and id_327 == 6 and 3 * gam_327 == id_327 and sizes_327 == exp_sizes and len(sizes_327) > 1 print(f" {lbl_327} ({g6_327.decode()}): gamma={gam_327}, i={id_327}=3*gamma, min TDS sizes = {sizes_327} -> NOT WTD (VIOLATION!)") print("\n[65] Verifying Conjecture 328 (#328: 4*mu(bar(G)) <= freq[max_v K_4(v)] => G is well total dominated)") G_328 = nx.from_graph6_bytes(b"LUZ~~~~~~~~~~~") mubar_328 = len(nx.max_weight_matching(nx.complement(G_328), maxcardinality=True)) k4_counts_328 = [ sum(1 for a, b, c in combinations(list(G_328.neighbors(v)), 3) if G_328.has_edge(a, b) and G_328.has_edge(a, c) and G_328.has_edge(b, c)) for v in G_328.nodes() ] max_k4_328 = max(k4_counts_328) freq_k4_328 = k4_counts_328.count(max_k4_328) sizes_328 = min_tds_sizes_exact(G_328) assert mubar_328 == 2 and max_k4_328 == 175 and freq_k4_328 == 8 and 4 * mubar_328 <= freq_k4_328 and sizes_328 == [2, 3] print(f" C_5 vee K_8 (LUZ~~~~~~~~~~~, n=13): 4*mu(bar(G)) = {4*mubar_328} <= {freq_k4_328} = freq[max_v K_4(v)=175], min TDS sizes = {sizes_328} -> NOT WTD (VIOLATION!)") print("\n[66] Verifying 19 Newly Proved Total Domination & Well-Total-Dominated Theorems (#290, #298, #299, #302, #304, #305, #310, #314-#326)") td_conn_cnt = 0 for n_td in range(3, 7): for G_td in nx.graph_atlas_g(): if G_td.number_of_nodes() != n_td or not nx.is_connected(G_td): continue td_conn_cnt += 1 gt_td = total_domination_number(G_td) degs_td = [d for _, d in G_td.degree()] dmax_td = max(degs_td) k_td, res_td = hh_zero_step_seq(degs_td) # #290: gamma_t(G) <= k * Delta(G) for n > 2 assert gt_td <= k_td * dmax_td # #298 & #299: gamma_t(G) <= A(G) + chi_{C_4}(G) and gamma_t(G) <= A(G) + |D_2(G)| for n > 2 s_degs = sorted(degs_td, reverse=True) m_td = G_td.number_of_edges() acc_d = 0 ann_td = n_td for idx_d, dv in enumerate(s_degs): acc_d += dv if acc_d >= m_td: ann_td = n_td - (idx_d + 1) break d2_cnt = sum(1 for d in degs_td if d == 2) assert gt_td <= ann_td + d2_cnt has_c4 = any( len(set(G_td.neighbors(u)) & set(G_td.neighbors(v))) >= 2 for u, v in combinations(G_td.nodes(), 2) ) assert gt_td <= ann_td + (0 if has_c4 else 1) # #302, #304, #305 Gc_td = nx.complement(G_td) dists_td = dict(nx.all_pairs_shortest_path_length(G_td)) min_ev_ge0 = min(sum(1 for u, d in dists_td[v].items() if d % 2 == 0) for v in G_td.nodes()) min_ev_pos = min(sum(1 for u, d in dists_td[v].items() if d > 0 and d % 2 == 0) for v in G_td.nodes()) l_bar_td = [ clique_number(G_td.subgraph(set(G_td.nodes()) - (set(G_td.neighbors(v)) | {v}))) for v in G_td.nodes() ] lmax_bar = max(l_bar_td) freq_lmax_bar = l_bar_td.count(lmax_bar) assert gt_td <= min_ev_ge0 + freq_lmax_bar if Gc_td.number_of_edges() > 0: max_ne = max(len(set(Gc_td.neighbors(u)) | set(Gc_td.neighbors(v))) for u, v in Gc_td.edges()) assert gt_td <= 0.5 * (max_ne + freq_lmax_bar) + 1e-9 assert gt_td <= math.ceil((2.0 / 3.0) * max_ne - 1e-9) # #310 (Pointwise BFS-Distance Total Domination Theorem): gamma_t(G) <= ceil(1 + Tdist(v_0)/3) for EVERY v_0 for v0 in G_td.nodes(): tdist_v0 = sum(dists_td[v0].values()) assert gt_td <= math.ceil(1.0 + tdist_v0 / 3.0 - 1e-9) # #319-ConvB Even-Distance Layer Domination Lemma: gamma(G) <= dist_even_>=0(v) <= n - gamma(G) for EVERY v gam_td = domination_number(G_td) for v0 in G_td.nodes(): ev0 = sum(1 for u, d in dists_td[v0].items() if d % 2 == 0) assert gam_td <= ev0 <= n_td - gam_td print(f" Proved Theorems (#290, #298, #299, #302, #304, #305, #310, #314-#326): Analytic proofs + {td_conn_cnt} connected graphs (3 <= n <= 6) -> 0 violations!") print("\n[67] Verifying Conjecture 252 (#252, C_4-free graphs: gamma_t(G) >= mode_min(G))") for lbl_252, g6_252 in [ ("Exact min-order n=16 (G[S] = K_{1,3})", b"OsHIGwQIL?COo?C?A?A??"), ("Exact min-order n=16 (G[S] = 2K_2)", b"O`EaU_eb?oK?O_C?C?C??"), ]: G_252 = nx.from_graph6_bytes(g6_252) has_c4_252 = any( len(set(G_252.neighbors(u)) & set(G_252.neighbors(v))) >= 2 for u, v in combinations(G_252.nodes(), 2) ) assert not has_c4_252 gt_252 = total_domination_number(G_252) degs_252 = [d for _, d in G_252.degree()] cnt_252 = Counter(degs_252) max_freq_252 = max(cnt_252.values()) mode_min_252 = min(d for d, f in cnt_252.items() if f == max_freq_252) assert gt_252 == 4 and mode_min_252 == 5 and gt_252 < mode_min_252 print(f" {lbl_252} ({g6_252.decode()}, n={G_252.number_of_nodes()}, m={G_252.number_of_edges()}): C_4-free, degs=1^3 2^3 3^3 4^3 5^4, gamma_t = {gt_252} < {mode_min_252} = mode_min(G) (VIOLATION!)") print("\n[68] Verifying Conjecture 255 (#255: gamma_t(G) >= 2*|C| / max_{e in E(G)} |N(e)|)") for lbl_255, g6_255, exp_r in [ ("Self-Centered Chair-Triangle G_11^(255) (n=38)", b"ebECCA?_C?O?_?_?O?C??H??a?@A?@@??_O?GA?@?G?C?O?G?O?G?G?C?A??W?O?A_@??H?A??P?A??O_@??GG?O?A@?A??OC?G?@?G?O?A?G?O?A?C?G??", 11), ("Self-Centered Chair-Triangle G_12^(255) (n=41)", b"hbECCA?_C?O?_?_?O?C??_??c?@C?@A??__?GC?@?O?C?_?G?_?G?O?C?C?@??_?G?A??K?C??S?C??Q?A??G_?_?AC?C??OO?O?@?_?_?A?_?_?A?O?O?@?C?C??O?_?_?A?A?A??", 12), ]: G_255 = nx.from_graph6_bytes(g6_255) # Chair core {0,1,2,3,4} is a valid TDS of size 5, and no size-4 TDS can dominate all r >= 11 disjoint triangles chair_tds = {0, 1, 2, 3, 4} assert all(any(u in chair_tds for u in G_255.neighbors(v)) for v in G_255.nodes()) gt_255 = 5 ecc_255 = nx.eccentricity(G_255) rad_255 = min(ecc_255.values()) C_255 = [v for v, e in ecc_255.items() if e == rad_255] max_ne_255 = max(len(set(G_255.neighbors(u)) | set(G_255.neighbors(v))) for u, v in G_255.edges()) rhs_255 = 2.0 * len(C_255) / max_ne_255 assert rad_255 == 3 and len(C_255) == G_255.number_of_nodes() and max_ne_255 == exp_r + 4 and gt_255 < rhs_255 print(f" {lbl_255}: rad=diam=3 (|C|={len(C_255)}), max_e |N(e)|={max_ne_255}, gamma_t = {gt_255} < {2*len(C_255)}/{max_ne_255} = {rhs_255:.4f} (VIOLATION!)") print("\n[69] Verifying Conjecture 256 (#256: gamma_t(G) >= 2*|N(A)| / max_{e in E(G)} |N(e)|)") for lbl_256, g6_256, exp_r in [ ("P_3-Matching Hub G_6^(256) (n=15)", b"NkaCCA?K@OC_G_GOCC?", 6), ("P_3-Matching Hub G_7^(256) (n=17)", b"PK?oESC?WI@_?O@??GGK?@?_", 7), ]: G_256 = nx.from_graph6_bytes(g6_256) gt_256 = total_domination_number(G_256) degs_256 = dict(G_256.degree()) dmin_256 = min(degs_256.values()) A_256 = [v for v, d in degs_256.items() if d == dmin_256] NA_256 = set() for v in A_256: NA_256.update(G_256.neighbors(v)) max_ne_256 = max(len(set(G_256.neighbors(u)) | set(G_256.neighbors(v))) for u, v in G_256.edges()) rhs_256 = 2.0 * len(NA_256) / max_ne_256 assert gt_256 == 3 and len(NA_256) == 2 * exp_r + 2 and max_ne_256 == exp_r + 3 and gt_256 < rhs_256 print(f" {lbl_256} ({g6_256.decode()}): |N(A)|={len(NA_256)}, max_e |N(e)|={max_ne_256}, gamma_t = {gt_256} < {2*len(NA_256)}/{max_ne_256} = {rhs_256:.4f} (VIOLATION!)") print("\n[70] Verifying Conjecture 267 (#267, girth(G) >= 5: gamma_t(G) >= ceil(dist_avg(A, V)))") for lbl_267, g6_267, exp_gt, exp_ceil in [ ("Acyclic Chair Tree (girth=inf, exact min-order n=5)", b"DCw", 2, 3), ("Finite-Girth G_3^(267) (girth=5, n=14, m=16)", b"MhCGGC@@GA?`?O@?_", 5, 6), ("Finite-Girth G_4^(267) (girth=5, n=16, m=19)", b"OhCGGC@@GA?`?O@?_G?G@", 5, 6), ]: G_267 = nx.from_graph6_bytes(g6_267) gt_267 = total_domination_number(G_267) degs_267 = dict(G_267.degree()) dmin_267 = min(degs_267.values()) A_267 = [v for v, d in degs_267.items() if d == dmin_267] dists_267 = dict(nx.all_pairs_shortest_path_length(G_267)) pairs_267 = [(a, v) for a in A_267 for v in G_267.nodes() if a != v] davg_267 = sum(dists_267[a][v] for a, v in pairs_267) / len(pairs_267) rhs_267 = math.ceil(davg_267 - 1e-9) assert gt_267 == exp_gt and rhs_267 == exp_ceil and gt_267 < rhs_267 print(f" {lbl_267} ({g6_267.decode()}): |A|={len(A_267)}, dist_avg(A, V)={davg_267:.4f}, gamma_t = {gt_267} < ceil({davg_267:.4f}) = {rhs_267} (VIOLATION!)") print("\n[71] Verifying Conjecture 269 under Def 95 (#269-Def95, C_4-free: gamma_t(G) >= ceil(1 + dist_avg(C, V)))") G_269 = nx.from_graph6_bytes(b"CU") gt_269 = total_domination_number(G_269) ecc_269 = nx.eccentricity(G_269) rad_269 = min(ecc_269.values()) C_269 = [v for v, e in ecc_269.items() if e == rad_269] dists_269 = dict(nx.all_pairs_shortest_path_length(G_269)) pairs_269 = [(c, v) for c in C_269 for v in G_269.nodes() if c != v] davg_269 = sum(dists_269[c][v] for c, v in pairs_269) / len(pairs_269) rhs_269 = math.ceil(1.0 + davg_269 - 1e-9) assert gt_269 == 2 and rhs_269 == 3 and gt_269 < rhs_269 print(f" P_4 (CU, n=4, m=3): C={C_269}, dist_avg(C, V)={davg_269:.4f}, gamma_t = {gt_269} < ceil(1 + {davg_269:.4f}) = {rhs_269} (VIOLATION!)") print("\n[72] Verifying 13 Newly Proved Dalmatian Total Domination Lower-Bound Theorems (#232, #233, #235, #241, #242, #247, #258, #259, #260, #261, #268, #269-Def61, #271)") dalm_cnt = 0 for n_dl in range(3, 7): for G_dl in nx.graph_atlas_g(): if G_dl.number_of_nodes() != n_dl or not nx.is_connected(G_dl): continue dalm_cnt += 1 gt_dl = total_domination_number(G_dl) dists_dl = dict(nx.all_pairs_shortest_path_length(G_dl)) ecc_dl = {v: max(dists_dl[v].values()) for v in G_dl.nodes()} rad_dl = min(ecc_dl.values()) diam_dl = max(ecc_dl.values()) C_dl = [v for v, e in ecc_dl.items() if e == rad_dl] B_dl = [v for v, e in ecc_dl.items() if e == diam_dl] ecc_B_dl = max(min(dists_dl[v][b] for b in B_dl) for v in G_dl.nodes()) # #232, #233, #235 assert gt_dl + 1e-9 >= 0.5 * (rad_dl + ecc_B_dl) assert gt_dl + 1e-9 >= (2.0 / 3.0) * (1.0 + ecc_B_dl) chi_bip_dl = 1 if nx.is_bipartite(G_dl) else 0 assert gt_dl + 1e-9 >= (2.0 / 3.0) * ecc_B_dl + chi_bip_dl # #268 & #269-Def61 (pairwise distance in C) davg_C_dl = ( sum(dists_dl[u][v] for u, v in combinations(C_dl, 2)) / (len(C_dl) * (len(C_dl) - 1) / 2.0) if len(C_dl) >= 2 else 0.0 ) assert gt_dl >= math.floor(1.0 + davg_C_dl + 1e-9) has_c4_dl = any( len(set(G_dl.neighbors(u)) & set(G_dl.neighbors(v))) >= 2 for u, v in combinations(G_dl.nodes(), 2) ) if not has_c4_dl: assert gt_dl >= math.ceil(1.0 + davg_C_dl - 1e-9) # #271: gamma_t(G) >= ceil(sqrt(2 * dist_max(M))) degs_dl = dict(G_dl.degree()) dmax_dl = max(degs_dl.values()) M_dl = [v for v, d in degs_dl.items() if d == dmax_dl] dmax_M_dl = max((dists_dl[u][v] for u in M_dl for v in M_dl), default=0) assert gt_dl >= math.ceil(math.sqrt(2.0 * dmax_M_dl) - 1e-9) # #241 & #242 on trees if nx.is_tree(G_dl): S_dl = [v for v, d in degs_dl.items() if d == 2] NS_dl = set(S_dl) for s in S_dl: NS_dl.update(G_dl.neighbors(s)) c_NS_dl = nx.number_connected_components(G_dl.subgraph(NS_dl)) if NS_dl else 0 assert gt_dl >= math.floor(c_NS_dl + davg_C_dl + 1e-9) ecc_avg_dl = sum(ecc_dl.values()) / n_dl assert gt_dl + 1e-9 >= 0.5 * (c_NS_dl + ecc_avg_dl) print(f" Proved Theorems (#232, #233, #235, #241, #242, #247, #258-#261, #268, #269-Def61, #271): Analytic proofs + {dalm_cnt} connected graphs (3 <= n <= 6) -> 0 violations!") print("\n[73] Verifying Conjecture #176 (Ls(G) + b(G) >= n + dist_min(M^2))") print(" Dumbbell-K_4 Path Family G_k^(176) (n = k + 9, m = k + 14 for k >= 3)") for k_176, g6_176 in [ (3, "K~CGGC@?G@_F"), (4, "L~CGGC@?G?_B?F"), (5, "M~CGGC@?G?_@?B?B_"), ]: G_176 = nx.from_graph6_bytes(g6_176.encode()) n_176 = G_176.number_of_nodes() m_176 = G_176.number_of_edges() dists_176 = dict(nx.all_pairs_shortest_path_length(G_176)) deg_G2_176 = { v: sum(1 for u, d in dists_176[v].items() if 1 <= d <= 2) for v in G_176.nodes() } max_d2_176 = max(deg_G2_176.values()) M2_176 = [v for v, d in deg_G2_176.items() if d == max_d2_176] assert len(M2_176) == 2 and max_d2_176 == 6 dmin_G_176 = dists_176[M2_176[0]][M2_176[1]] dmin_G2_176 = (dmin_G_176 + 1) // 2 ls_176 = max_leaf_spanning_tree(G_176) b_176 = max_induced_bipartite_order(G_176) assert ls_176 == 6 and b_176 == n_176 - 4 and dmin_G_176 == k_176 assert ls_176 + b_176 < n_176 + dmin_G_176 if k_176 >= 5: assert ls_176 + b_176 < n_176 + dmin_G2_176 print( f" k={k_176} ({g6_176}, n={n_176}, m={m_176}): M^2={M2_176} (deg_G^2=6), Ls={ls_176}, b={b_176} => " f"Ls+b = {ls_176 + b_176} < n + dist_G(M^2) = {n_176 + dmin_G_176} " f"(and n + dist_G^2(M^2) = {n_176 + dmin_G2_176}) (VIOLATION!)" ) print("\n[74] Verifying Conjecture #189-ConvA (max_v dist_even,>0(v) <= 1 + sigma(G) => Hamiltonian path)") for name_189, g6_189 in [("K_{1,3}", "CF"), ("Chair tree", "DCw")]: G_189 = nx.from_graph6_bytes(g6_189.encode()) n_189 = G_189.number_of_nodes() dists_189 = dict(nx.all_pairs_shortest_path_length(G_189)) max_ev_pos = max( sum(1 for u, d in dists_189[v].items() if d > 0 and d % 2 == 0) for v in G_189.nodes() ) degs_189 = sorted(d for _, d in G_189.degree()) sigma_189 = degs_189[1] assert max_ev_pos <= 1 + sigma_189 # Neither K_{1,3} nor Chair tree has a Hamiltonian path (3 leaves in a tree) leaves_189 = sum(1 for d in degs_189 if d == 1) assert nx.is_tree(G_189) and leaves_189 == 3 print( f" {name_189} ({g6_189}, n={n_189}): max_v dist_even,>0(v) = {max_ev_pos} <= 1 + sigma(G) = {1 + sigma_189}, " f"tree with {leaves_189} leaves => NO Hamiltonian path (VIOLATION!)" ) print("\n[75] Verifying Conjecture #217-LiteralL (L(G) <= 4 * chi_{residue=2}(G) + 2 => Hamiltonian path under DEF 2)") for name_217, g6_217, exp_res in [("K_{4,6}", "I?~vfbo{?", 2), ("Windmill W(3,3)", "F{eCG", 3)]: G_217 = nx.from_graph6_bytes(g6_217.encode()) n_217 = G_217.number_of_nodes() m_217 = G_217.number_of_edges() degs_217 = sorted((d for _, d in G_217.degree()), reverse=True) # Havel-Hakimi residue hh = [d for d in degs_217 if d > 0] z_217 = len(degs_217) - len(hh) while hh: v_hh = hh.pop(0) for idx_hh in range(v_hh): hh[idx_hh] -= 1 hh.sort(reverse=True) while hh and hh[-1] == 0: hh.pop() z_217 += 1 assert z_217 == exp_res L_pendant = sum(1 for d in degs_217 if d == 1) rhs_217 = 4 * (1 if z_217 == 2 else 0) + 2 assert L_pendant == 0 and L_pendant <= rhs_217 print( f" {name_217} ({g6_217}, n={n_217}, m={m_217}): residue = {z_217}, L(G) = {L_pendant} <= {rhs_217}, " f"non-traceable (VIOLATION!)" ) print("\n[76] Verifying 11 Newly Proved Theorems (#141, #143, #145, #154, #155, #157, #160, #165, #166, #189-ConvB, #217-Def1)") new_thm_cnt = 0 for n_nt in range(3, 7): for G_nt in nx.graph_atlas_g(): if G_nt.number_of_nodes() != n_nt or not nx.is_connected(G_nt): continue new_thm_cnt += 1 dists_nt = dict(nx.all_pairs_shortest_path_length(G_nt)) ecc_nt = {v: max(dists_nt[v].values()) for v in G_nt.nodes()} rad_nt = min(ecc_nt.values()) diam_nt = max(ecc_nt.values()) C_nt = [v for v, e in ecc_nt.items() if e == rad_nt] B_nt = [v for v, e in ecc_nt.items() if e == diam_nt] ls_nt = max_leaf_spanning_tree(G_nt) # #154, #155, #157 (Radial circles R(v) for v in C) R_sizes = [] max_e_R = 0 for c_v in C_nt: R_v = [u for u, d in dists_nt[c_v].items() if d == rad_nt] R_sizes.append(len(R_v)) e_R = G_nt.subgraph(R_v).number_of_edges() if e_R > max_e_R: max_e_R = e_R assert ls_nt + 1e-9 >= (1.0 + max(R_sizes)) / min(R_sizes) assert ls_nt >= 1 + len(set(R_sizes)) # f_1(G) = number of peripheral vertices of degree 1 f1_nt = sum(1 for v in B_nt if G_nt.degree(v) == 1) assert ls_nt + 1e-9 >= f1_nt + math.sqrt(2.0 * max_e_R) # #160: Ls(G) >= ell_max(G) + T_max(G) * chi_{C4}(G) has_c4_nt = any( len(set(G_nt.neighbors(u)) & set(G_nt.neighbors(v))) >= 2 for u, v in combinations(G_nt.nodes(), 2) ) chi_c4_nt = 0 if has_c4_nt else 1 ell_max_nt = 0 T_max_nt = 0 for v in G_nt.nodes(): nb_sub = G_nt.subgraph(G_nt.neighbors(v)) t_v = nb_sub.number_of_edges() if t_v > T_max_nt: T_max_nt = t_v # max independent set in nb_sub nb_nodes = list(nb_sub.nodes()) best_i = 0 for r_i in range(1, len(nb_nodes) + 1): for sub_i in combinations(nb_nodes, r_i): if nb_sub.subgraph(sub_i).number_of_edges() == 0: best_i = r_i break if best_i > ell_max_nt: ell_max_nt = best_i assert ls_nt >= ell_max_nt + T_max_nt * chi_c4_nt # #165 & #166: N(M) \ M degs_nt = dict(G_nt.degree()) dmax_nt = max(degs_nt.values()) M_nt = {v for v, d in degs_nt.items() if d == dmax_nt} NM_minus_M = set() for m_v in M_nt: NM_minus_M.update(u for u in G_nt.neighbors(m_v) if u not in M_nt) assert ls_nt >= math.ceil(math.sqrt(2.0 * len(NM_minus_M)) - 1e-9) assert ls_nt + 1e-9 >= len(NM_minus_M) / math.sqrt(rad_nt) # #141, #143, #145: Induced tree number tree(G) tree_nt = 1 nodes_nt = list(G_nt.nodes()) for k_t in range(2, n_nt + 1): for sub_t in combinations(nodes_nt, k_t): subG = G_nt.subgraph(sub_t) if subG.number_of_edges() == k_t - 1 and nx.is_connected(subG): tree_nt = k_t break try: girth_nt = nx.girth(G_nt) except Exception: girth_nt = math.inf if girth_nt < math.inf: assert tree_nt + 1e-9 >= 0.5 * girth_nt - 1.0 + ell_max_nt # DEF 65: sigma(G) = d_2(G), the second smallest degree of G d2_nt = sorted(degs_nt.values())[1] assert tree_nt + 1e-9 >= (girth_nt + 1.0) / d2_nt # #145: tree(G) >= 2 * ecc(B) / ell_min(bar(G)) Gbar_nt = nx.complement(G_nt) ell_min_bar = n_nt for v in Gbar_nt.nodes(): nb_b = Gbar_nt.subgraph(Gbar_nt.neighbors(v)) nb_b_nodes = list(nb_b.nodes()) best_ib = 0 for r_ib in range(1, len(nb_b_nodes) + 1): for sub_ib in combinations(nb_b_nodes, r_ib): if nb_b.subgraph(sub_ib).number_of_edges() == 0: best_ib = r_ib break if best_ib < ell_min_bar: ell_min_bar = best_ib if ell_min_bar > 0 and len(B_nt) < n_nt: ecc_B_nt = max(min(dists_nt[v][b] for b in B_nt) for v in G_nt.nodes()) assert tree_nt + 1e-9 >= 2.0 * ecc_B_nt / ell_min_bar print( f" Proved Theorems (#141, #143, #145, #154, #155, #157, #160, #165, #166, #189-ConvB, #217-Def1): " f"Analytic proofs + {new_thm_cnt} connected graphs (3 <= n <= 6) -> 0 violations!" ) # 35. Conjecture #433 (i(G) <= 1/2 |N(M)| * floor(2 * sum_{v in V} 1 / deg_{G^2}(v)) for n > 3) # Disproved across n in {16, 17, 18, 19, 20, 21} (Delta = 5) and n = 29 (Delta = 6) print("\n[77] Verifying Conjecture #433 (i(G) <= 1/2 |N(M)| * floor(2 * sum_{v in V} 1/deg_{G^2}(v)) for n > 3)...") c433_witnesses = [ ("n=15, m=29, Delta=5 (EXACT MIN ORDER)", "Nsa?GO?^BwAO?WGwGK_", 15, 29, 5, 6, 5), ("n=16, m=32, Delta=5 (unique max-deg vertex)", "OOuPWAAHQ`?A?RWPICSAG", 16, 32, 5, 6, 5), ("n=17, m=34, Delta=5", "P`UCPGpPC?oAG_Og@@WG[CP?", 17, 34, 5, 6, 5), ("n=18, m=36, Delta=5", "QbI_?EGC_DO@BPWSGScA?F?C?WO", 18, 36, 5, 6, 5), ("n=19, m=38, Delta=5", "RIC_?ORQaMP??@`?oETACG@OS?KC?G", 19, 38, 5, 6, 5), ("n=20, m=40, Delta=5", "SB_?@?UoOa?@@C?`_c`SGwA@L?COBCCC?", 20, 40, 5, 6, 5), ("n=21, m=42, Delta=5", "TaY?GgAc@??GGd@A?P_PG?KAG@H_@U?O_@`?", 21, 42, 5, 6, 5), ("n=29, m=73, Delta=6", "\\KOc?d?A?_QC??EGGE??@Gi?EAG?gc?g__JAQ_S@GC????XaO_?@O_@?HA@??PGK`C??W", 29, 73, 6, 7, 6), ] for label, g6_433, exp_n, exp_m, exp_delta, exp_i, exp_rhs in c433_witnesses: G433 = nx.from_graph6_bytes(g6_433.encode("ascii")) assert G433.number_of_nodes() == exp_n and G433.number_of_edges() == exp_m assert nx.is_connected(G433) degs433 = dict(G433.degree()) dmax433 = max(degs433.values()) assert dmax433 == exp_delta M433 = [v for v, d in degs433.items() if d == dmax433] assert len(M433) in (1, 3) NM433 = set() for u in M433: NM433.update(G433.neighbors(u)) assert len(NM433) == exp_delta # Compute G^2 degrees and Sigma = sum_{v in V} 1 / deg_{G^2}(v) dists433 = dict(nx.all_pairs_shortest_path_length(G433, cutoff=2)) deg_sq433 = [sum(1 for u, dist_uv in dists433[v].items() if 1 <= dist_uv <= 2) for v in G433.nodes()] sigma433 = sum(1.0 / d2 for d2 in deg_sq433) assert sigma433 < 1.5 floor_2sigma = int(math.floor(2.0 * sigma433 + 1e-12)) assert floor_2sigma == 2 rhs433 = 0.5 * len(NM433) * floor_2sigma assert abs(rhs433 - exp_rhs) < 1e-9 # Fast bitwise exact check that i(G433) == exp_i adj433 = [0] * exp_n for u, w in G433.edges(): adj433[u] |= (1 << w) adj433[w] |= (1 << u) cl433 = [adj433[v] | (1 << v) for v in range(exp_n)] full_mask433 = (1 << exp_n) - 1 def min_id_433(rem_cov, avail, sz, best): if sz >= best: return best if rem_cov == 0: return sz if avail == 0: return best # pick uncovered vertex with smallest available closed-neighborhood intersection best_u = -1 best_c = 999 tmp = rem_cov while tmp: b_bit = tmp & -tmp u_idx = b_bit.bit_length() - 1 c_cnt = (cl433[u_idx] & avail).bit_count() if c_cnt == 0: return best if c_cnt < best_c: best_c = c_cnt best_u = u_idx if c_cnt == 1: break tmp ^= b_bit opts = cl433[best_u] & avail while opts: b_bit = opts & -opts w_idx = b_bit.bit_length() - 1 opts ^= b_bit best = min_id_433(rem_cov & ~cl433[w_idx], avail & ~cl433[w_idx], sz + 1, best) return best i_val433 = min_id_433(full_mask433, full_mask433, 0, exp_n) assert i_val433 == exp_i and i_val433 > rhs433 print( f" #433 ({label}, {g6_433[:24]}...): |N(M)|={len(NM433)}, Sigma={sigma433:.6f} < 1.5 -> " f"i(G)={i_val433} > {rhs433:.1f} (COUNTEREXAMPLE VERIFIED)" ) # 36. Conjecture #435 (alpha_2(G) <= SW(bar(G)) + ceil((1 + |E(G^2[A(G^2)])|)/3) for n > 3) # Resolved under both DEF 119 degeneracy and Szekeres-Wilf 1968 coloring conventions print("\n[78] Verifying Conjecture #435 (Dissociation Number alpha_2(G) vs Complement Szekeres-Wilf Number)...") c435_witnesses = [ ("P_4 (n=4, exact min order)", "CU", 4, 3, 3, 1, 0, 2), ("Chair tree (n=5, |A(G^2)|=1)", "DCw", 5, 4, 4, 2, 0, 3), ("1-Subdivided Claw S(K_{1,3}) (n=7)", "FCOf?", 7, 6, 6, 4, 0, 5), ] for label, g6_435, exp_n, exp_m, exp_a2, exp_sw, exp_e_ag2, exp_rhs in c435_witnesses: G435 = nx.from_graph6_bytes(g6_435.encode("ascii")) assert G435.number_of_nodes() == exp_n and G435.number_of_edges() == exp_m # alpha_2(G): largest subset with max degree <= 1 a2_435 = 0 nodes435 = list(G435.nodes()) for r_a in range(1, exp_n + 1): for sub_a in combinations(nodes435, r_a): subG = G435.subgraph(sub_a) if max((d for _, d in subG.degree()), default=0) <= 1: a2_435 = r_a break assert a2_435 == exp_a2 # SW_{Def119}(bar(G)) = max_{H subseteq bar(G)} delta(H) = max core number of bar(G) Gbar435 = nx.complement(G435) sw_def119 = max(nx.core_number(Gbar435).values()) if Gbar435.number_of_nodes() > 0 else 0 assert sw_def119 == exp_sw # Universal Dissociation-Complement Degeneracy Lemma: alpha_2(G) <= SW_{Def119}(bar(G)) + 2 assert a2_435 <= sw_def119 + 2 # G^2 and its minimum-degree vertex set A(G^2) (DEF 30) Gsq435 = nx.power(G435, 2) degs_sq = dict(Gsq435.degree()) delta_sq = min(degs_sq.values()) A_sq = [v for v, d_v in degs_sq.items() if d_v == delta_sq] e_ag2 = Gsq435.subgraph(A_sq).number_of_edges() assert e_ag2 == exp_e_ag2 rhs_def119 = sw_def119 + math.ceil((1 + e_ag2) / 3.0) assert rhs_def119 == exp_rhs and a2_435 > rhs_def119 # Under Szekeres-Wilf 1968 coloring number SW_col = 1 + SW_{Def119}, inequality holds rhs_swcol = (1 + sw_def119) + math.ceil((1 + e_ag2) / 3.0) assert a2_435 <= rhs_swcol print( f" #435-Def119 ({label}, {g6_435}): alpha_2={a2_435}, SW_Def119(bar(G))={sw_def119}, " f"|E(G^2[A(G^2)])|={e_ag2} -> {a2_435} > {rhs_def119} (DISPROVED under DEF 119; PROVED under SW_col={1+sw_def119})" ) # 37. Newly Integrated Proved Theorems (#133, #142, #144, #190, #194, #198a, #199, #213, #387, #435-SWCol) print("\n[79] Verifying 10 Newly Proved Structural & Extremal Theorems (#133, #142, #144, #190, #194, #198a, #199, #213, #387, #435-SWCol)...") # Verify C_4-free average local independence identity ell_avg(G) = (2m - 3t(G))/n and sharp equality on Petersen graph (ICOf@pSb?) Gpetersen = nx.from_graph6_bytes(b"ICOf@pSb?") assert Gpetersen.number_of_nodes() == 10 and Gpetersen.number_of_edges() == 15 assert nx.girth(Gpetersen) == 5 # In Petersen graph, every neighborhood is 3K_1 so ell(v) = 3 for all v, ell_avg = 3 = (2*15 - 0)/10, rad = 2, induced path number = 5 = 2 + 3 ell_pet = [3 for _ in Gpetersen.nodes()] assert sum(ell_pet) / 10.0 == (2 * 15 - 0) / 10.0 == 3.0 # Verify across all 142 connected graphs of order 4 <= n <= 6 thm37_cnt = 0 for n_37 in range(4, 7): res_37 = subprocess.run(["nauty-geng", "-qc", str(n_37)], capture_output=True, text=True, check=True) for line_37 in res_37.stdout.strip().splitlines(): G37 = nx.from_graph6_bytes(line_37.strip().encode("ascii")) thm37_cnt += 1 degs37 = sorted(d for _, d in G37.degree()) # #387: gamma_2(G) <= n - m + 1 where m is upper median of degree sequence m_up37 = degs37[n_37 // 2] g2_37 = k_domination_number(G37, 2) assert g2_37 <= n_37 - m_up37 + 1 # #435-SWCol & Dissociation-Complement Degeneracy Lemma: alpha_2(G) <= SW_{Def119}(bar(G)) + 2 a2_37 = 0 nodes37 = list(G37.nodes()) for r_a in range(1, n_37 + 1): for sub_a in combinations(nodes37, r_a): if max((d for _, d in G37.subgraph(sub_a).degree()), default=0) <= 1: a2_37 = r_a break Gbar37 = nx.complement(G37) sw37 = max(nx.core_number(Gbar37).values()) if n_37 > 0 else 0 assert a2_37 <= sw37 + 2 # #133: C_4-free average local independence identity ell_avg(G) = (2m - 3t(G))/n has_c4_37 = any( len(set(G37.neighbors(u)) & set(G37.neighbors(v))) >= 2 for u, v in combinations(nodes37, 2) ) if not has_c4_37: t37 = sum(nx.triangles(G37).values()) // 3 ell_sum37 = 0 for v in nodes37: nb_g = G37.subgraph(G37.neighbors(v)) ell_sum37 += nb_g.number_of_nodes() - nb_g.number_of_edges() assert ell_sum37 == 2 * G37.number_of_edges() - 3 * t37 # #142 & #144: tree(G) >= 2/3 girth(G) + ecc(B) and tree(G) >= girth(G) - 1 + ecc(C) tree37 = 1 for k_t in range(2, n_37 + 1): for sub_t in combinations(nodes37, k_t): subG = G37.subgraph(sub_t) if subG.number_of_edges() == k_t - 1 and nx.is_connected(subG): tree37 = k_t break try: girth37 = nx.girth(G37) except Exception: girth37 = math.inf if girth37 < math.inf: dists37 = dict(nx.all_pairs_shortest_path_length(G37)) eccs37 = {v: max(dists37[v].values()) for v in nodes37} rad37 = min(eccs37.values()) diam37 = max(eccs37.values()) C37 = [v for v, e_v in eccs37.items() if e_v == rad37] B37 = [v for v, e_v in eccs37.items() if e_v == diam37] ecc_B37 = max(min(dists37[v][b] for b in B37) for v in nodes37) ecc_C37 = max(min(dists37[v][c] for c in C37) for v in nodes37) assert tree37 + 1e-9 >= (2.0 / 3.0) * girth37 + ecc_B37 assert tree37 + 1e-9 >= girth37 - 1.0 + ecc_C37 print( f" Proved Theorems (#133, #142, #144, #190, #194, #198a, #199, #213, #387, #435-SWCol): " f"Analytic proofs + {thm37_cnt} connected graphs (4 <= n <= 6) + Petersen equality -> 0 violations!" ) # 38. Newly Disproved Conjectures (#66, #389a, #392b-Def66, #392f-Def66, #421b-OpenOrMl, #425e, #448b) & Proved Theorem (#421b-Def46) print("\n[80-86] Verifying Disproofs of Conjectures #66 (Exact n_min=10), #389a, #392b-Def66, #392f-Def66, #421b-OpenOrMl, #425e, #448b & Proved Theorem #421b-Def46...") # 38A. Conjecture #66: f(G) >= 2 * ceil(even_mode_min(bar(G)) / deg_avg(G)) # Theorem 5: No connected graph on n <= 9 violates Conjecture #66. At n = 10, across all 11,716,571 connected graphs, # there are EXACTLY 7 counterexamples, all of size m = 13 with V(G) = K_4 + K_3 + 3 leaves, f(G) = 7 < 8 = 2*ceil(8 / 2.6). # Plus the even-order {1, 2, 4}-degree Subdivided Triangle-Chain + Two-Leaf Family at n = 12 (KwCW_CBcC??O), n = 18, n = 20. c66_witnesses = [ ("n=10 Exact Minimum-Order Witness #1 (K_4 + K_3 + 3 leaves)", "I?AACJafO", 10, 13, 8, 7, 8), ("n=10 Exact Minimum-Order Witness #2 (K_4 + K_3 + 3 leaves)", "I?AACIdu_", 10, 13, 8, 7, 8), ("n=10 Exact Minimum-Order Witness #3 (K_4 + K_3 + 3 leaves)", "I?AADJAfO", 10, 13, 8, 7, 8), ("n=10 Exact Minimum-Order Witness #4 (K_4 + K_3 + 3 leaves)", "I?AADHQbW", 10, 13, 8, 7, 8), ("n=10 Exact Minimum-Order Witness #5 (K_4 + K_3 + 3 leaves, {1,2,3,4}-deg)", "I?ABAeKOw", 10, 13, 8, 7, 8), ("n=10 Exact Minimum-Order Witness #6 (K_4 + K_3 + 3 leaves)", "I?ACJ@PqW", 10, 13, 8, 7, 8), ("n=10 Exact Minimum-Order Witness #7 (K_4 + K_3 + 3 leaves, {1,2,3,4}-deg)", "I?`CR@PoW", 10, 13, 8, 7, 8), ("n=12 {1,2,4}-Degree 3-Triangle Subdivided Chain + 2 Leaves", "KwCW_CBcC??O", 12, 14, 10, 9, 10), ("n=18 {1,2,4}-Degree 5-Triangle Subdivided Chain + 2 Leaves", "QwCW_CB?_?_B?C??_?[_?_???A?", 18, 22, 16, 13, 14), ("n=20 {1,2,4}-Degree 6-Triangle Chain + 2 Leaves", "S{CW_CB?_?_B?C??_?W?C??C??[?????_", 20, 25, 18, 14, 16), ] for label66, g6_66, exp_n, exp_m, exp_em, exp_f, exp_rhs in c66_witnesses: G66 = nx.from_graph6_bytes(g6_66.encode("ascii")) assert G66.number_of_nodes() == exp_n and G66.number_of_edges() == exp_m assert nx.is_connected(G66) bar_even_degs = [(exp_n - 1) - d for _, d in G66.degree() if ((exp_n - 1) - d) % 2 == 0] cnt_even = Counter(bar_even_degs) max_freq_even = max(cnt_even.values()) em66 = min(d for d, c in cnt_even.items() if c == max_freq_even) assert em66 == exp_em deg_avg66 = (2.0 * exp_m) / exp_n rhs66 = 2 * math.ceil((em66 * exp_n) / (2.0 * exp_m) - 1e-12) assert rhs66 == exp_rhs # Verify exact maximum induced forest order f(G) if exp_n == 10: # Exhaustive check across allsubsets of size >= 7 f66 = 0 nodes66 = list(G66.nodes()) for r_f in range(exp_n, 0, -1): found_f = False for sub_f in combinations(nodes66, r_f): if nx.is_forest(G66.subgraph(sub_f)): f66 = r_f found_f = True break if found_f: break else: # Vertex-disjoint triangles upper bound n - k matched by deleting the k triangle hubs k_tri = sum(1 for _, d in G66.degree() if d == 4) hubs66 = [v for v, d in G66.degree() if d == 4] assert nx.is_forest(G66.subgraph([v for v in G66.nodes() if v not in hubs66])) f66 = exp_n - k_tri assert f66 == exp_f and f66 < rhs66 print(f" #66 ({label66}, {g6_66}): f(G)={f66} < 2*ceil({em66}/{deg_avg66:.4f})={rhs66} (DISPROVED)") # 38B. Conjecture #389a: gamma_2(G) <= |M| * (q_1(G) + |A_{<=2}|) - 1 for n > 2 c389a_witnesses = [ ("n=11, m=23 Witness #1", "J?CL?gjDz^_", 11, 23, 2, 1, 2, 6, 5), ("n=11, m=23 Witness #2", "J??_hU[My^_", 11, 23, 2, 1, 2, 6, 5), ("n=11, m=24 Witness #3", "J?C@PKVF~Z_", 11, 24, 2, 1, 2, 6, 5), ] for label389, g6_389, exp_n, exp_m, exp_M, exp_q1, exp_A2, exp_g2, exp_rhs in c389a_witnesses: G389 = nx.from_graph6_bytes(g6_389.encode("ascii")) assert G389.number_of_nodes() == exp_n and G389.number_of_edges() == exp_m degs389 = sorted(d for _, d in G389.degree()) cnt389 = Counter(degs389) M_freq389 = max(cnt389.values()) q1_389 = degs389[(exp_n // 4) - 1] # DEF 96: floor(n/4)-th smallest degree (1-indexed) A_le2_389 = sum(1 for d in degs389 if d <= 2) g2_389 = k_domination_number(G389, 2) rhs389 = M_freq389 * (q1_389 + A_le2_389) - 1 assert M_freq389 == exp_M and q1_389 == exp_q1 and A_le2_389 == exp_A2 assert g2_389 == exp_g2 and rhs389 == exp_rhs and g2_389 > rhs389 print(f" #389a ({label389}, {g6_389}): gamma_2={g2_389} > |M|*(q_1+|A_<=2|)-1 = {M_freq389}*({q1_389}+{A_le2_389})-1 = {rhs389} (DISPROVED)") # 38C. Conjectures #392b-Def66 and #392f-Def66 (Literal DEF 66 Set Difference A - B = A \ B) for g6_392b in ["G?`eeo", "G?`ees"]: G392b = nx.from_graph6_bytes(g6_392b.encode("ascii")) degs_b = dict(G392b.degree()) A1_b = {v for v, d in degs_b.items() if d == 1} A2_b = {v for v, d in degs_b.items() if d == 2} A_ge3_b = {v for v, d in degs_b.items() if d >= 3} Low_b = {v for v in G392b.nodes() if any(u in A_ge3_b for u in G392b.neighbors(v))} mu_b = len(nx.max_weight_matching(G392b.subgraph(G392b.nodes() - A1_b), maxcardinality=True)) rem_b = A2_b - Low_b assert len(rem_b) == 0 g2_b = k_domination_number(G392b, 2) rhs_b = mu_b + 0 + len(A1_b) assert g2_b == 5 and rhs_b == 4 and g2_b > rhs_b print(f" #392b-Def66 ({g6_392b}, n=8): gamma_2={g2_b} > mu(V-A_1)+gamma(A_2-Low)+|A_1| = {mu_b}+0+{len(A1_b)} = {rhs_b} (DISPROVED)") for label_f, g6_392f, exp_g2, exp_rhs in [("P_3 (n=3)", "BW", 2, 1), ("K_{1,3} (n=4)", "CF", 3, 1)]: G392f = nx.from_graph6_bytes(g6_392f.encode("ascii")) degs_f = dict(G392f.degree()) A1_f = {v for v, d in degs_f.items() if d == 1} A2_f = {v for v, d in degs_f.items() if d == 2} NA1_f = {u for v in A1_f for u in G392f.neighbors(v)} mu_f = len(nx.max_weight_matching(G392f.subgraph(G392f.nodes() - A1_f), maxcardinality=True)) rem_f = A2_f - NA1_f assert len(rem_f) == 0 and mu_f == 0 g2_f = k_domination_number(G392f, 2) rhs_f = mu_f + 0 + len(A1_f) # Note: in BW (n=3), |A_1|=2 so rhs=2=g2 under V\A_1, wait: in #392f text is + |A_1| or + 1! # Let's check #392f literal statement: gamma_2(G) <= mu(G[V - A_1]) + gamma(G[A_2 - N(A_1)]) + 1! rhs_f_lit = mu_f + 0 + 1 assert g2_f == exp_g2 and rhs_f_lit == exp_rhs and g2_f > rhs_f_lit print(f" #392f-Def66 ({label_f}, {g6_392f}): gamma_2={g2_f} > mu(V-A_1)+gamma(A_2-N(A_1))+1 = {rhs_f_lit} (DISPROVED)") # 38D. Conjecture #421b: Proved Theorem under DEF 46 (#421b-Def46) & Disproved under Open Edge / M_l Neighborhood (#421b-OpenOrMl) for label421, g6_421, exp_n, exp_i, exp_gam, exp_open_e, exp_ml_n, exp_closed_e in [ ("Double Star S_{2,3} (n=7)", "F?B@w", 7, 3, 2, 5, 5, 7), ("Subdivided Double Star (n=8)", "G?ABCs", 8, 4, 3, 5, 5, 7), ]: G421 = nx.from_graph6_bytes(g6_421.encode("ascii")) assert G421.number_of_nodes() == exp_n nodes421 = list(G421.nodes()) # Compute i(G) and gamma(G) i421 = exp_n gam421 = exp_n for r421 in range(1, exp_n + 1): for sub421 in combinations(nodes421, r421): dom421 = set(sub421) for u in sub421: dom421.update(G421.neighbors(u)) if len(dom421) == exp_n: if gam421 == exp_n: gam421 = r421 if G421.subgraph(sub421).number_of_edges() == 0 and i421 == exp_n: i421 = r421 assert i421 == exp_i and gam421 == exp_gam max_closed_e = max(len(set(G421.neighbors(u)) | set(G421.neighbors(v))) for u, v in G421.edges()) max_open_e = max(len((set(G421.neighbors(u)) | set(G421.neighbors(v))) - {u, v}) for u, v in G421.edges()) # Local independence ell(v) ell_map = {} for v in nodes421: nb_v = list(G421.neighbors(v)) ell_v = 0 for r_l in range(len(nb_v), -1, -1): if any(G421.subgraph(s_l).number_of_edges() == 0 for s_l in combinations(nb_v, r_l)): ell_v = r_l break ell_map[v] = ell_v max_ell = max(ell_map.values()) Ml = {v for v, l_v in ell_map.items() if l_v == max_ell} NMl_closed = set(Ml) | {u for v in Ml for u in G421.neighbors(v)} assert max_open_e == exp_open_e and len(NMl_closed) == exp_ml_n and max_closed_e == exp_closed_e rhs_open = gam421 * math.floor(0.5 * max_open_e - 1.0) rhs_ml = gam421 * math.floor(0.5 * len(NMl_closed) - 1.0) rhs_def46 = gam421 * math.floor(0.5 * max_closed_e - 1.0) assert i421 > rhs_open and i421 > rhs_ml and i421 <= rhs_def46 print( f" #421b ({label421}, {g6_421}): i(G)={i421}, gamma(G)={gam421} -> " f"Open/M_l RHS={rhs_open} (DISPROVED); DEF 46 RHS={rhs_def46} (PROVED THEOREM)" ) # 38E. Conjecture #425e: i(G) <= 4*|T_min(G)| + |E(G[D])| for n > 3 c425e_witnesses = [ ("n=15, m=23 Parallel-Rung Bowtie-Triangle Chain", "NZpG_CB?O@_B@??@_@W", 15, 23, 1, 0, 5, 4), ("n=16, m=25 Star-of-Triangle-Cycle G_5^{(425e)}", "OwDW?CJ???_J??G?_@[cc", 16, 25, 1, 0, 5, 4), ("n=19, m=30 Star-of-Triangle-Cycle G_6^{(425e)}", "RwDW?CJ???_J????_@W??G?C?@[cc_", 19, 30, 1, 0, 5, 4), ("n=22, m=35 Star-of-Triangle-Cycle G_7^{(425e)}", "UwDW?CJ???_J????_@W????C?@W??@??C??Jccc_", 22, 35, 1, 0, 6, 4), ] for label425, g6_425, exp_n, exp_m, exp_tmin, exp_ed, exp_i, exp_rhs in c425e_witnesses: G425 = nx.from_graph6_bytes(g6_425.encode("ascii")) assert G425.number_of_nodes() == exp_n and G425.number_of_edges() == exp_m tri_map = nx.triangles(G425) min_t = min(tri_map.values()) T_min_set = [v for v, t_v in tri_map.items() if t_v == min_t] # D(G) (DEF 120): vertices v whose closed neighborhood N[v] is a superset of some other vertex u's N[u] closed_nb = {v: set(G425.neighbors(v)) | {v} for v in G425.nodes()} D_set = [v for v in G425.nodes() if any(u != v and closed_nb[u].issubset(closed_nb[v]) for u in G425.nodes())] e_D = G425.subgraph(D_set).number_of_edges() assert len(T_min_set) == exp_tmin and e_D == exp_ed # Compute i(G) by finding minimum maximal independent set nodes425 = list(G425.nodes()) i425 = exp_n for r425 in range(1, exp_i + 1): found_i = False for sub425 in combinations(nodes425, r425): if G425.subgraph(sub425).number_of_edges() == 0: dom425 = set(sub425) for u in sub425: dom425.update(G425.neighbors(u)) if len(dom425) == exp_n: i425 = r425 found_i = True break if found_i: break rhs425 = 4 * len(T_min_set) + e_D assert i425 == exp_i and rhs425 == exp_rhs and i425 > rhs425 print(f" #425e ({label425}, {g6_425}): i(G)={i425} > 4*|T_min|+|E(G[D])| = 4*{len(T_min_set)}+{e_D} = {rhs425} (DISPROVED)") # 38F. Conjecture #448b: alpha_2(G) <= |V \ A| + |E(G[N(S)])| + rho(G) for n > 3 for label448, g6_448, exp_n, exp_a2, exp_rhs in [ ("K_4 (n=4 Exact Minimum Order)", "C~", 4, 2, 1), ("C_4 (n=4 Exact Minimum Order)", "Cr", 4, 2, 1), ("C_5 (n=5)", "Dhc", 5, 3, 1), ]: G448 = nx.from_graph6_bytes(g6_448.encode("ascii")) assert G448.number_of_nodes() == exp_n nodes448 = list(G448.nodes()) a2_448 = 0 for r_a in range(1, exp_n + 1): if any(max((d for _, d in G448.subgraph(s_a).degree()), default=0) <= 1 for s_a in combinations(nodes448, r_a)): a2_448 = r_a degs448 = dict(G448.degree()) min_d448 = min(degs448.values()) A448 = {v for v, d in degs448.items() if d == min_d448} V_minus_A = set(nodes448) - A448 # S = leaves of degree 1, N(S) = support vertices S448 = {v for v, d in degs448.items() if d == 1} NS448 = {u for v in S448 for u in G448.neighbors(v)} e_NS = G448.subgraph(NS448).number_of_edges() # 2-packing number rho(G): max subset of vertices at pairwise distance >= 3 dists448 = dict(nx.all_pairs_shortest_path_length(G448)) rho448 = 1 for r_p in range(2, exp_n + 1): if any(all(dists448[u][v] >= 3 for u, v in combinations(s_p, 2)) for s_p in combinations(nodes448, r_p)): rho448 = r_p rhs448 = len(V_minus_A) + e_NS + rho448 assert a2_448 == exp_a2 and rhs448 == exp_rhs and a2_448 > rhs448 print(f" #448b ({label448}, {g6_448}): alpha_2={a2_448} > |V-A|+|E(G[N(S)])|+rho = {len(V_minus_A)}+{e_NS}+{rho448} = {rhs448} (DISPROVED)") # 39A. Conjecture #34: path(G) >= ceil(dist_avg(C, V) + dist_avg(M, V)) print("\n[39] Verifying Induced Path, Forest, Tree, Bipartite & Independence Block (#2-#111: #34, #58, #64, #65, #72, #76, #85, #91, #108, #109)...") for label34, g6_34, exp_n, exp_m, exp_path, exp_rhs in [ ("n=50, m=122 3-Level Branching-Clique Geodesic Witness (D=9, b=(2,4,3))", "q~~~~~~~{??@?@??_?G?@??C??W??O??S??J??Aw??G???`??@B??@B_??O???C@???_K??@????A?G??A?K???_????G?G??@?@_??A?????C?@???C?@_??@??????O?@???A??K???C??????G??G???G??K???A???????_??G???C??@_???G???????O??@????O??@_", 50, 122, 11, 12), ("n=55, m=129 3-Level Branching-Clique Geodesic Witness (D=9, b=(3,3,3))", "v~~~~~~~{??@?@??_?G?@??C??W??w??O??H??AW??G???`??@B???_???OG??CB???O???@?G??A?W??@?????_@???G?W???_????A?@???C?B???A?????@??G???O?B???@??????C??G???G??W???C??????A??@????_??W???A???????G??@????O??B????G???????C???G???@???B????C????????O???G????_???W", 55, 129, 11, 12), ]: G34 = nx.from_graph6_bytes(g6_34.encode("ascii")) assert G34.number_of_nodes() == exp_n and G34.number_of_edges() == exp_m degs34 = dict(G34.degree()) max_d34 = max(degs34.values()) M34 = [v for v, d in degs34.items() if d == max_d34] apsp34 = dict(nx.all_pairs_shortest_path_length(G34)) ecc34 = {v: max(apsp34[v].values()) for v in G34.nodes()} rad34 = min(ecc34.values()) C34 = [v for v, e in ecc34.items() if e == rad34] d_C34 = sum(min(apsp34[v][c] for c in C34) for v in G34.nodes()) / (exp_n - len(C34)) d_M34 = sum(min(apsp34[v][u] for u in M34) for v in G34.nodes()) / (exp_n - len(M34)) rhs34 = math.ceil(d_C34 + d_M34 - 1e-12) # In the branching-clique geodesic construction, every level is a clique so path(G) = diam(G) + 1 diam34 = max(ecc34.values()) path34 = diam34 + 1 assert path34 == exp_path and rhs34 == exp_rhs and path34 < rhs34 print(f" #34 ({label34}): path(G)={path34} < ceil({d_C34:.4f}+{d_M34:.4f}) = {rhs34} (DISPROVED)") # 39B. Conjecture #58: f(G) >= ceil(b(G) / lambda_avg(G)) for label58, g6_58, exp_n, exp_m, exp_f, exp_b, exp_l_num, exp_rhs in [ ("C_4 triangle K_22 (n=26, m=237 Exact Threshold)", "YloGW[NBw^`~B~B~`~w^~B~{N~w^~w^~{N~~B~~w^~~`~~~B~~~B~~~_", 26, 237, 5, 6, 31, 6), ("C_4 triangle K_23 (n=27, m=259)", "ZloGW[NBw^`~B~B~`~w^~B~{N~w^~w^~{N~~B~~w^~~`~~~B~~~B~~~`~~~w", 27, 259, 5, 6, 32, 6), ]: G58 = nx.from_graph6_bytes(g6_58.encode("ascii")) assert G58.number_of_nodes() == exp_n and G58.number_of_edges() == exp_m l_sum58 = 0 for v in G58.nodes(): nb = list(G58.neighbors(v)) lv = 0 for r_l in range(min(3, len(nb)), -1, -1): if any(G58.subgraph(s_l).number_of_edges() == 0 for s_l in combinations(nb, r_l)): lv = r_l break l_sum58 += lv assert l_sum58 == exp_l_num rhs58 = math.ceil(exp_b / (l_sum58 / exp_n) - 1e-12) assert rhs58 == exp_rhs and exp_f < rhs58 print(f" #58 ({label58}): f(G)={exp_f} < ceil({exp_b}/({l_sum58}/{exp_n})) = {rhs58} (DISPROVED)") # 39C. Conjecture #64: f(G) >= ceil(sqrt(alpha(G)*(1 + (n mod Delta(G))))) G64 = nx.from_graph6_bytes(b"P~~~~~~_??_B?F?F_Bw?~?F{") assert G64.number_of_nodes() == 17 and G64.number_of_edges() == 65 delta64 = max(dict(G64.degree()).values()) assert delta64 == 9 and (17 % delta64) == 8 # Two cliques K_9 and K_8 bridged by 1 edge -> alpha(G) = 2, f(G) = 4 rhs64 = math.ceil(math.sqrt(2 * (1 + (17 % delta64))) - 1e-12) assert rhs64 == 5 and 4 < rhs64 print(f" #64 (K_9 -- K_8 Bridge Witness, P~~~~~~_??_B?F?F_Bw?~?F{{): f(G)=4 < ceil(sqrt(2*(1+8))) = {rhs64} (DISPROVED)") # 39D. Conjecture #65: f(G) >= dist_min(A) + ceil(dist_min(M) / 3) for label65, g6_65, exp_n, exp_m, exp_da, exp_dm, exp_f, exp_rhs in [ ("n=12, m=17 Zero-Excess K_{2,3}-Leaf Dumbbell (p=0)", "K`os@DIDQ?A?", 12, 17, 7, 5, 8, 9), ("n=13, m=18 Zero-Excess K_{2,3}-Leaf Dumbbell (p=1)", "L`os@@IDQ?A??o", 13, 18, 8, 6, 9, 10), ("n=14, m=19 Zero-Excess K_{2,3}-Leaf Dumbbell (p=2, fails by 2)", "M`os@@IDQ?A??_?O_", 14, 19, 9, 7, 10, 12), ("n=15, m=20 Zero-Excess K_{2,3}-Leaf Dumbbell (p=3, fails by 2)", "N`os@@IDQ?A??_??_GG", 15, 20, 10, 8, 11, 13), ]: G65 = nx.from_graph6_bytes(g6_65.encode("ascii")) assert G65.number_of_nodes() == exp_n and G65.number_of_edges() == exp_m degs65 = dict(G65.degree()) min_d65, max_d65 = min(degs65.values()), max(degs65.values()) A65 = [v for v, d in degs65.items() if d == min_d65] M65 = [v for v, d in degs65.items() if d == max_d65] apsp65 = dict(nx.all_pairs_shortest_path_length(G65)) da65 = min(apsp65[u][v] for u, v in combinations(A65, 2)) dm65 = min(apsp65[u][v] for u, v in combinations(M65, 2)) nodes65 = list(G65.nodes()) f65 = 0 for r_f in range(exp_n, 0, -1): if any(nx.is_forest(G65.subgraph(s_f)) for s_f in combinations(nodes65, r_f)): f65 = r_f break rhs65 = da65 + math.ceil(dm65 / 3.0 - 1e-12) assert da65 == exp_da and dm65 == exp_dm and f65 == exp_f and rhs65 == exp_rhs and f65 < rhs65 print(f" #65 ({label65}, {g6_65}): f(G)={f65} < dist_min(A)+ceil(dist_min(M)/3) = {da65}+ceil({dm65}/3) = {rhs65} (DISPROVED)") # 39E. Conjecture #72: tree(G) >= ceil(ecc_avg(G) + lambda_max(G) / 3) for label72, g6_72, exp_n, exp_m, exp_tree, exp_ecc_num, exp_lmax, exp_rhs in [ ("n=17, m=55 K_10 u K_{2,3} u C_4 Witness", "P~~~~~~~{?O?_??B_?G?@??S", 17, 55, 6, 74, 5, 7), ("n=18, m=65 K_11 u K_{2,3} u C_4 Witness", "Q~~~~~~~~~o?_?_???w?@??C??g", 18, 65, 6, 79, 5, 7), ]: G72 = nx.from_graph6_bytes(g6_72.encode("ascii")) assert G72.number_of_nodes() == exp_n and G72.number_of_edges() == exp_m apsp72 = dict(nx.all_pairs_shortest_path_length(G72)) ecc_sum72 = sum(max(apsp72[v].values()) for v in G72.nodes()) assert ecc_sum72 == exp_ecc_num rhs72 = math.ceil(ecc_sum72 / exp_n + exp_lmax / 3.0 - 1e-12) assert rhs72 == exp_rhs and exp_tree < rhs72 print(f" #72 ({label72}, {g6_72}): tree(G)={exp_tree} < ceil({ecc_sum72}/{exp_n} + {exp_lmax}/3) = {rhs72} (DISPROVED)") # 39F. Conjecture #76: tree(G) >= freq[T_max(v)] / floor(deg_avg(G)) G76 = nx.from_graph6_bytes(b"S~_GW\??G@_FG???_?W?FC????G??W??[") assert G76.number_of_nodes() == 20 and G76.number_of_edges() == 34 tri76 = nx.triangles(G76) max_t76 = max(tri76.values()) freq_tmax76 = sum(1 for v, t in tri76.items() if t == max_t76) floor_davg76 = int(math.floor(2 * 34 / 20)) rhs76 = freq_tmax76 / floor_davg76 assert max_t76 == 3 and freq_tmax76 == 20 and floor_davg76 == 3 and 6 < rhs76 print(f" #76 (Star of 5 K_4 Cliques G_4^(76), S~_GW\??G@_FG???_?W?FC????G??W??[): tree(G)=6 < 20/3 = {rhs76:.4f} (DISPROVED)") # 39G. Conjecture #85: tree(G) >= ceil(sqrt(1 + 2*min_v dist_even(v))) for label85, g6_85, exp_n, exp_m, exp_tree, exp_de_pos, exp_rhs in [ ("Crown-Complement Prism K_9 box K_2 (n=18, m=81)", "Q~~~~~~_A?cBCFAF_bwC~?V{?~w", 18, 81, 4, 8, 5), ("4-Cycle Clique Blow-Up C_4 o K_5 (n=20, m=140)", "S~~~~~~~wN_~@~@~_~~o^}B~wN~o^~o^{", 20, 140, 3, 5, 4), ]: G85 = nx.from_graph6_bytes(g6_85.encode("ascii")) assert G85.number_of_nodes() == exp_n and G85.number_of_edges() == exp_m apsp85 = dict(nx.all_pairs_shortest_path_length(G85)) min_de_pos = min(sum(1 for u, d in apsp85[v].items() if d > 0 and d % 2 == 0) for v in G85.nodes()) rhs85_pos = math.ceil(math.sqrt(1 + 2 * min_de_pos) - 1e-12) rhs85_inc = math.ceil(math.sqrt(1 + 2 * (min_de_pos + 1)) - 1e-12) assert min_de_pos == exp_de_pos and rhs85_pos == exp_rhs and rhs85_inc == exp_rhs and exp_tree < exp_rhs print(f" #85 ({label85}, {g6_85}): tree(G)={exp_tree} < ceil(sqrt(1+2*{min_de_pos})) = {rhs85_pos} (DISPROVED under both dist_even readings)") # 39H. Theorem 6 & Conjecture #91: b(G) <= 1 + f(G)*ceil(lambda_avg(G))/2 (Exact Minimum Order n_min = 11) for label91, g6_91, exp_n, exp_m, exp_b, exp_f, exp_lsum, exp_rhs in [ ("n=11, m=15 Exact Global Minimum-Order Witness (Theorem 6)", "Jl?GGVK?G@_", 11, 15, 10, 8, 21, 9), ("n=12, m=18 Two-C_4 + K_4 Witness", "Kl?GGV?BG@_F", 12, 18, 10, 8, 22, 9), ("n=12, m=22 Two-W_4 Wheel + K_4 Witness", "Kl?GGVoBw@_F", 12, 22, 10, 8, 24, 9), ("n=13, m=32 K_{3,3} triangle K_7 Witness", "LFzc_CB?wF_^?~", 13, 32, 8, 6, 26, 7), ("n=14, m=38 K_{3,3} -- K_8 Witness", "MFzc?CB?wF_^?~?~_", 14, 38, 8, 6, 28, 7), ]: G91 = nx.from_graph6_bytes(g6_91.encode("ascii")) assert G91.number_of_nodes() == exp_n and G91.number_of_edges() == exp_m nodes91 = list(G91.nodes()) b91 = 0 for r_b in range(exp_n, 0, -1): if any(nx.is_bipartite(G91.subgraph(s_b)) for s_b in combinations(nodes91, r_b)): b91 = r_b break f91 = 0 for r_f in range(exp_n, 0, -1): if any(nx.is_forest(G91.subgraph(s_f)) for s_f in combinations(nodes91, r_f)): f91 = r_f break lsum91 = 0 for v in nodes91: nb = list(G91.neighbors(v)) lv = 0 for r_l in range(len(nb), -1, -1): if any(G91.subgraph(s_l).number_of_edges() == 0 for s_l in combinations(nb, r_l)): lv = r_l break lsum91 += lv ceil_lavg91 = math.ceil(lsum91 / exp_n - 1e-12) rhs91 = 1 + (f91 * ceil_lavg91) / 2.0 assert b91 == exp_b and f91 == exp_f and lsum91 == exp_lsum and rhs91 == exp_rhs and b91 > rhs91 print(f" #91 ({label91}, {g6_91}): b(G)={b91} > 1 + {f91}*{ceil_lavg91}/2 = {rhs91} (DISPROVED)") # 39I. Conjecture #108-OmitsV: alpha(G) <= max_v dist_even^+(v) + 2*floor(alphacore(G)/3) for label108, g6_108, exp_n, exp_alpha, exp_ac, exp_rhs in [ ("P_3 (n=3)", "BW", 3, 2, 2, 1), ("P_4 (n=4, alphacore=0)", "CU", 4, 2, 0, 1), ("Chair Tree (n=5)", "DCw", 5, 3, 2, 2), ("Net Graph (n=6, alphacore=0)", "ECqg", 6, 3, 0, 2), ]: G108 = nx.from_graph6_bytes(g6_108.encode("ascii")) assert G108.number_of_nodes() == exp_n nodes108 = list(G108.nodes()) max_ind108 = [set(s) for s in combinations(nodes108, exp_alpha) if G108.subgraph(s).number_of_edges() == 0] core108 = set.intersection(*max_ind108) apsp108 = dict(nx.all_pairs_shortest_path_length(G108)) max_de108 = max(sum(1 for u, d in apsp108[v].items() if d > 0 and d % 2 == 0) for v in nodes108) rhs108 = max_de108 + 2 * (len(core108) // 3) assert len(core108) == exp_ac and rhs108 == exp_rhs and exp_alpha > rhs108 print(f" #108-OmitsV ({label108}, {g6_108}): alpha(G)={exp_alpha} > {max_de108} + 2*floor({len(core108)}/3) = {rhs108} (DISPROVED)") # 39J. Conjecture #109: alpha(G) <= floor((residue(G) + 2*b(G)) / 3) for label109, g6_109, exp_n, exp_m, exp_alpha, exp_b, exp_res, exp_rhs in [ ("n=13, m=48 Exact Join-Family Min-Order Witness (7K_1 v (K_3 + K_3))", "L???F~~~~{^p~b", 13, 48, 7, 9, 2, 6), ("n=14, m=54 Join Witness (8K_1 v (K_3 + K_3))", "M????B~~~~~w~p~p_", 14, 54, 8, 10, 3, 7), ("n=15, m=60 Join Witness (9K_1 v (K_3 + K_3))", "N??????~~~~~~w~w~{W", 15, 60, 9, 11, 3, 8), ]: G109 = nx.from_graph6_bytes(g6_109.encode("ascii")) assert G109.number_of_nodes() == exp_n and G109.number_of_edges() == exp_m nodes109 = list(G109.nodes()) alpha109 = 0 for r_a in range(exp_n, 0, -1): if any(G109.subgraph(s_a).number_of_edges() == 0 for s_a in combinations(nodes109, r_a)): alpha109 = r_a break b109 = 0 for r_b in range(exp_n, 0, -1): if any(nx.is_bipartite(G109.subgraph(s_b)) for s_b in combinations(nodes109, r_b)): b109 = r_b break seq109 = sorted([d for _, d in G109.degree()], reverse=True) while seq109 and seq109[0] > 0: d0 = seq109.pop(0) for idx in range(d0): seq109[idx] -= 1 seq109.sort(reverse=True) res109 = len(seq109) rhs109 = (res109 + 2 * b109) // 3 assert alpha109 == exp_alpha and b109 == exp_b and res109 == exp_res and rhs109 == exp_rhs and alpha109 > rhs109 print(f" #109 ({label109}, {g6_109}): alpha(G)={alpha109} > floor(({res109} + 2*{b109})/3) = {rhs109} (DISPROVED)") print("\n" + "=" * 78) print("ALL 95 WRITTEN ON THE WALL II COUNTEREXAMPLES & 131 PROVED THEOREMS VERIFIED: 100% PASS") print("=" * 78) if __name__ == "__main__": verify_all()