What does Most Conflicts Are Redundancy conclude, in numbers, about “Prime Implicants: Merging Forty Narrow Prohibitions into Four Primitives”?
Answer: Chapter 4 merges 40 narrow prohibitions into 4 primitives.
Scope of the numbers: The rule libraries and values are illustrative; every calculation is generated by the book's programs; the book offers general business method, not legal, compliance or business-decision advice, and adding or deleting a rule must be released by its owner. Marked boxes separate published evidence, runnable Python calculations (19 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 40
written rules 40 (distinct 35), switches 5, combinations 32 forbidden by written rules 18; by the true policy 18 prime implicants 5, essential 4, minimum cover 4 minimum cover (F M C B L): 0-11- covers 4 true cube -11-- covers 8 true cube 1---0 covers 8 true cube 11--- covers 8 true cube prime not needed: --110 compression: 40 written rules -> 4 primitives
Show the full program
# Chapter 4. p41: forty forbidding rules collapse to a handful of primes
# Model: five switches F flash sale, M member price, C coupon, B
# bundle, L live stock feed. The true policy forbids four illustrative
# combinations (cubes): M&F, C&M, F&~L, C&B&~F. Writers add 40 rules,
# each a random over-specific sub-cube of one true cube (fixed seed),
# so every written rule is correct but narrow. Quine-McCluskey (Quine
# 1952, McCluskey 1956) merges the forbidden minterms into prime
# implicants; a minimum cover of the written minterms is then chosen
# by exhaustive search over the primes. Cube notation per switch in
# the order F M C B L: 1 on, 0 off, - free.
import random
from itertools import combinations
VARS = "FMCBL"
NV = len(VARS)
TRUE = ["11---", "-11--", "1---0", "0-11-"]
def cube_minterms(cube):
out = [0]
for ch in cube:
nxt = []
for x in out:
if ch in "0-":
nxt.append(x << 1)
if ch in "1-":
nxt.append((x << 1) | 1)
out = nxt
return out
def text(v, mask):
s = ""
for i in range(NV - 1, -1, -1):
s += "-" if (mask >> i) & 1 else str((v >> i) & 1)
return s
def primes(minterms):
cur = {(m, 0) for m in minterms}
found = set()
while cur:
nxt = set()
used = set()
for a, b in combinations(sorted(cur), 2):
if a[1] == b[1]:
d = a[0] ^ b[0]
if d and d & (d - 1) == 0:
nxt.add((a[0] & b[0], a[1] | d))
used.add(a)
used.add(b)
found |= cur - used
cur = nxt
return sorted(found)
def covers(p, m):
return (m & ~p[1]) == p[0]
def min_cover(pr, ms):
for k in range(1, len(pr) + 1):
for combo in combinations(pr, k):
if all(any(covers(p, m) for p in combo) for m in ms):
return list(combo)
return []
rng = random.Random(20261113)
written = []
for _ in range(40):
cube = list(rng.choice(TRUE))
for i, ch in enumerate(cube):
if ch == "-" and rng.random() < 0.6:
cube[i] = rng.choice("01")
written.append("".join(cube))
ms = sorted({m for c in written for m in cube_minterms(c)})
truth = sorted({m for c in TRUE for m in cube_minterms(c)})
pr = primes(ms)
ess = [p for p in pr if any(
covers(p, m) and not any(covers(q, m) for q in pr if q != p)
for m in ms)]
cov = min_cover(pr, ms)
print("written rules %d (distinct %d), switches %d, combinations %d"
% (len(written), len(set(written)), NV, 1 << NV))
print("forbidden by written rules %d; by the true policy %d"
% (len(ms), len(truth)))
print("prime implicants %d, essential %d, minimum cover %d"
% (len(pr), len(ess), len(cov)))
print("minimum cover (F M C B L):")
for p in cov:
tag = "true cube" if text(*p) in TRUE else "narrower"
print(" %s covers %2d %s" % (text(*p), 1 << bin(p[1]).count("1"),
tag))
print("prime not needed: %s"
% ", ".join(text(*p) for p in pr if p not in cov))
print("compression: %d written rules -> %d primitives"
% (len(written), len(cov)))Single source and citation
Fan, Y. (2026). Cross-Volume Rule Resolution and Axiom Reduction: Detecting Threshold Conflicts among a Thousand Machine Rules and Finding a Minimal Primitive Set (Version 1.0.0), Chapter 4: Prime Implicants: Merging Forty Narrow Prohibitions into Four Primitives. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 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}
}Other chapter answers in this book
- Chapter 1 · Most Conflicts among a Thousand Rules Are Redundancy
- Chapter 2 · Rules as Intervals: Deciding Threshold Conflicts Mechanically
- Chapter 3 · Conflict Graphs and Transitive Closure: Contradictions Hidden in Chains
- Chapter 5 · Greedy Set Cover and ln n: Provable Bounds on a Minimal Primitive Set
- Chapter 6 · Judging Synonyms: Two Errors of Text Similarity, and Canonical Keys
- Chapter 7 · Classical Sources East and West: the Xunzi on Correct Names and Book I of Euclid's Elements
- Chapter 8 · Closing the Loop: Plugging in the Pruner, Monthly Reduction and a Pre-Registered Test