What does The Cliff of Stacked Rules conclude, in numbers, about “Real Rules Are Not Random Rules: Mixed Lengths, the 2+p Model and the Balance of Demands and Prohibitions”?
Answer: Chapter 5 shows that short rules govern the cliff and that deadlock needs demands and prohibitions together, the most dangerous balance bringing the clause ratio at deadlock down to 2.638.
Scope of the numbers: The rulebooks and data are illustrative; every calculation is generated by the book's programs; the book offers general business method, not legal, compliance or business-decision advice. Chapter 4 checks an illustrative rulebook of 24 switches: bare ratio 0.958, load 0.475, a median clause ratio at deadlock of only 1.292, and a minimal conflict core spanning three rule families.
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: 2.638
| q demands | never deadlocked | median m*/n | median demands/n |
|---|---|---|---|
| 0.0 | 60 | never | never |
| 0.1 | 0 | 4.062 | 0.400 |
| 0.2 | 0 | 2.987 | 0.600 |
| 0.3 | 0 | 2.700 | 0.800 |
| 0.4 | 0 | 2.638 | 1.050 |
| 0.5 | 0 | 2.713 | 1.363 |
| 0.6 | 0 | 2.662 | 1.575 |
| 0.7 | 0 | 3.188 | 2.162 |
| 0.8 | 0 | 3.925 | 3.150 |
| 0.9 | 0 | 5.612 | 5.075 |
| 1.0 | 60 | never | never |
Show the full program
# Chapter 5. p52: deadlock needs both demands and prohibitions
# Model: a share q of rules are demands ("at least one of these 3
# switches is on", all signs positive) and the rest prohibitions
# ("never these 2 together", both signs negative). With only one
# kind the set is always satisfiable (all on, or all off). Median
# last-straw ratio m* / n over 60 formulas on n = 40 switches,
# rules capped at 12 n; "never" if over half never deadlock.
import random
import statistics
from collections import Counter
N, RUNS, CAP = 40, 60, 12
def assign(cls, lit):
out = []
for c in cls:
if lit in c:
continue
if -lit in c:
c = [x for x in c if x != -lit]
if not c:
return None
out.append(c)
return out
def dpll(cls):
while True:
unit = next((c[0] for c in cls if len(c) == 1), None)
if unit is None:
break
cls = assign(cls, unit)
if cls is None:
return False
if not cls:
return True
w = Counter()
for c in cls:
for x in c:
w[x] += 1 << max(0, 8 - len(c))
lit = max(w, key=lambda x: (w[x] + w[-x], w[x], -abs(x), x))
for b in (lit, -lit):
nxt = assign(cls, b)
if nxt is not None and dpll(nxt):
return True
return False
def last_straw(rules):
lo, hi = 0, len(rules)
if dpll([list(c) for c in rules]):
return None
while hi - lo > 1:
mid = (lo + hi) // 2
if dpll([list(c) for c in rules[:mid]]):
lo = mid
else:
hi = mid
return hi
rng = random.Random(20261122)
print("q demands never deadlocked median m*/n median demands/n")
for q in (0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0):
vals, dem, never = [], [], 0
for _ in range(RUNS):
rules = []
for _ in range(CAP * N):
if rng.random() < q:
rules.append(rng.sample(range(1, N + 1), 3))
else:
rules.append([-v for v in rng.sample(range(1, N + 1), 2)])
ms = last_straw(rules)
if ms is None:
never += 1
vals.append(float("inf"))
dem.append(float("inf"))
else:
vals.append(ms / N)
dem.append(len([c for c in rules[:ms] if c[0] > 0]) / N)
med = statistics.median(vals)
if med == float("inf"):
txt = "%11s %16s" % ("never", "never")
else:
txt = "%11.3f %16.3f" % (med, statistics.median(dem))
print("%9.1f %16d %s" % (q, never, txt))Single source and citation
Fan, Y. (2026). Boolean Satisfiability Phase Transitions: the Critical Constraint Ratio at Which Stacked Promotion, Compliance and Gate Rules Deadlock, and How to See It Coming (Version 1.0.0), Chapter 5: Real Rules Are Not Random Rules: Mixed Lengths, the 2+p Model and the Balance of Demands and Prohibitions. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-252 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026252,
author = {Fan, Yafu},
title = {Boolean Satisfiability Phase Transitions: the Critical Constraint Ratio at Which Stacked Promotion, Compliance and Gate Rules Deadlock, and How to See It Coming},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Cliff of Stacked Rules: the Satisfiability Phase Transition of Random 3-SAT
- Chapter 2 · DPLL with the Standard Library: Unit Propagation, Branching and "Easy, Hard, Easy"
- Chapter 3 · Where the Cliff Lies: the First-Moment Bound, the Exact Threshold of 2-SAT and Rule Length
- Chapter 4 · Measuring a Rulebook: Load, Forced Values, Minimal Conflict Cores and Headroom
- Chapter 6 · Signals on the Eve of Deadlock: Solution Counts, the Backbone and the Hazard of the Next Rule
- Chapter 7 · Classical Sources East and West: the Spear and Shield of the Han Feizi, and Boole's x² = x
- Chapter 8 · Closing the Loop: a Monthly Constraint-Ratio Scan of the Five-Kit Rulebooks and a Pre-Registered Test