关于「冲突图与传递闭包:藏在链条里的矛盾」,《冲突多半是冗余》给出的定量结论是什么?

结论:开关型规则构成冲突图,蕴含会传递,互斥沿蕴含传播。p31 的示意库里,4 条写下的互斥闭包后变成 6 对,并推出两条死规则:当天上线与常青页,后者正是会重置的倒计时为什么一律违规的形式化理由。随机库显示,蕴含的平均出度越过一,派生互斥与死规则成百倍增长。p32 显示,双向声明的重述能把 280 条规则缩成 40 个同义类,617 条牵连缩成 71 条骨架;每少声明一成,就多出约二十个单点类。图论告诉我们哪些规则等价、哪些冗余,但它处理的是一条一条的规则。如果几十条禁令各自只禁止一个很窄的组合,合起来其实等于几条宽的禁令,图上看不出来。怎样把它们合并成最少的本原?下一章请出 Quine 与 McCluskey。

数据口径:书中规则库与数值均为示意;全部计算由书中程序生成;本书属非个人化经营方法,不构成法律、合规或经营决策意见,规则的增删须由主事者人工放行。 第一章正面陈述并量化命题:一千条示意规则里,标红配对中真矛盾只占 0.0392,裁决后 971 条是冗余,只剩 18 条约束性规则;越界规则占一成时真矛盾比例也只有 0.2667,但无解指标已遍及全部。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 280, 40, 617, 71

K=40 meanings, 6 restatements each, 60 redundant shortcuts
p_bothrulesedgesclassessingletonsskeletonsaved
1.0280617400710.885
0.92805966121950.841
0.828057087471170.795
0.6280530127871610.696
rules = meanings + restatements; saved = 1 - skeleton / edges
查看完整验算程序
# Chapter 3. p32: synonym classes and the minimal implication skeleton
# Model: K hidden meanings linked by a random acyclic "forces" order;
# each meaning is restated by several writers. A restatement linked
# both ways to its original (declared "same as") falls in the same
# strongly connected class; one linked only one way does not. Classes
# come from the transitive closure (i ~ j iff each reaches the other);
# the skeleton is the transitive reduction of the class graph (Aho,
# Garey and Ullman 1972): edge A -> B is kept iff no third class C
# lies on a path A -> C -> B. Sizes and rates are illustrative; one
# fixed seed. Reachability rows are integers used as bit sets.

import random


def closure(n, imp):
    reach = [1 << i for i in range(n)]
    for a, b in imp:
        reach[a] |= 1 << b
    for k in range(n):
        bit = 1 << k
        rk = reach[k]
        for i in range(n):
            if reach[i] & bit:
                reach[i] |= rk
    return reach


def classes(n, reach):
    rep = [-1] * n
    for i in range(n):
        if rep[i] < 0:
            for j in range(i, n):
                if rep[j] < 0 and (reach[i] >> j) & 1 \
                        and (reach[j] >> i) & 1:
                    rep[j] = i
    return rep


def reduction(n, reach, rep):
    reps = sorted(set(rep))
    keep = 0
    for a in reps:
        for b in reps:
            if a == b or not (reach[a] >> b) & 1:
                continue
            via = False
            for c in reps:
                if c not in (a, b) and (reach[a] >> c) & 1 \
                        and (reach[c] >> b) & 1:
                    via = True
                    break
            if not via:
                keep += 1
    return keep


def library(rng, k, copies, p_both, extra):
    imp = []
    order = list(range(k))
    for b in range(1, k):
        for a in rng.sample(range(b), min(b, 2)):
            imp.append((order[a], order[b]))
    n = k
    for m in range(k):
        for _ in range(copies):
            imp.append((n, m))
            if rng.random() < p_both:
                imp.append((m, n))
            n += 1
    for _ in range(extra):
        a, b = sorted(rng.sample(range(k), 2))
        imp.append((a, b))
    return n, imp


rng = random.Random(20261113)
print("K=40 meanings, 6 restatements each, 60 redundant shortcuts")
print("p_both  rules  edges  classes  singletons  skeleton  saved")
for p in (1.0, 0.9, 0.8, 0.6):
    n, imp = library(rng, 40, 6, p, 60)
    reach = closure(n, imp)
    rep = classes(n, reach)
    nc = len(set(rep))
    single = 0
    for r in sorted(set(rep)):
        if rep.count(r) == 1:
            single += 1
    sk = reduction(n, reach, rep)
    print("  %.1f   %5d  %5d  %7d  %10d  %8d  %.3f"
          % (p, n, len(imp), nc, single, sk, 1 - sk / len(imp)))
print("rules = meanings + restatements; saved = 1 - skeleton / edges")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《跨卷规则消解与公理归约、千条机器规则阈值冲突检测与最小原语集母典》第 3 章「冲突图与传递闭包:藏在链条里的矛盾」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-258 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026258,
  author    = {Fan, Yafu},
  title     = {Cross-Volume Rule Resolution and Axiom Reduction: Detecting Threshold Conflicts among a Thousand Machine Rules and Finding a Minimal Primitive Set},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论