Constraint Satisfaction
TL;DR
Constraint satisfaction treats a decision as variables to assign under rules that must all hold at once: enumerate the variables, state every binding constraint with its source, propagate to prune assignments that cannot work, and search what remains. The graph’s discipline is twofold: no constraint lives in anyone’s head — each is an explicit artifact with a citation — and the satisfaction gate admits only solutions that meet all of them, with the near-misses recorded. Its most valuable output is sometimes a proof that no solution exists: infeasible is an answer, and a governed system says it out loud instead of quietly relaxing whichever rule was in the way.
The deal that always almost works
A lending officer is structuring a small-business loan, and every version almost closes. Stretch the term and it clears debt-service coverage — but crosses the concentration limit. Shrink the amount and concentration is fine — but now it fails the borrower’s stated need and the covenant math. Reprice it and the yield works — outside the fair-lending band the last exam flagged. Three hours of whack-a-mole, each fix breaking a rule that was satisfied a version ago.
The problem was never any single rule. It was that the rules were consulted one at a time, each fix checked only against the constraint currently complaining. Written down together — coverage ≥ 1.25, concentration ≤ policy cap, price within band, amount ≥ need — the whole space collapses in minutes: either a narrow window exists, or it provably does not, and the honest next step is an exception request with the binding constraints named — not a fourth hour of hopeful tweaking.
An unguided model satisfies the constraint in front of it — the one the prompt mentions, the one the last sentence raised. The constraint graph holds all of them at once, because they are artifacts on a list, not memories in a context.
How the graph works, step by step
Generate the variables and domains. What is actually being decided, and what values could each piece take? Making the variable list explicit prevents the commonest silent failure — optimizing three visible knobs while a fourth (the one that will fail the exam) never enters the problem.
Retrieve the constraints, with sources. Every rule that binds the decision arrives as an artifact: the policy limit with its policy cite, the regulatory band with its section, the covenant with its clause. Retrieval — not recollection — is the discipline; a constraint without a source is a preference wearing a uniform.
Evaluate by propagation. Constraints interact, and propagation works those interactions: each rule prunes the domains of the variables it touches, and each pruning tightens the others. This is where the whack-a-mole dies — the interaction between coverage, concentration, and price is computed once, as a shrinking space, rather than discovered serially as surprises.
Verify and gate. A candidate assignment is checked against every constraint — not the ones recently discussed — and the gate records the margin on each. If the space is empty, the gate’s output is a finding: infeasible, with the minimal conflicting set of constraints named. That finding routes to a human as an exception decision with its trade-off made explicit — which rule would have to bend, by whose authority.
The gates, operationally
| Gate | What it checks | Fails when |
|---|---|---|
| Enumeration gate | The variable list covers everything the decision actually sets, and every constraint carries a source citation | A decided quantity never appears as a variable, or a “constraint” has no authority behind it |
| Propagation gate | Interactions between constraints were computed — domains reflect all rules jointly, not each rule alone | A candidate satisfies each rule checked one-at-a-time but violates their combination |
| Satisfaction gate | The final assignment holds under every constraint, with margins recorded; empty space yields an explicit infeasibility finding with the conflicting set named | A rule was quietly relaxed to make the answer exist — the fix that turns a constraint problem into a finding at the next exam |
Where it fits — three use cases
1. Structuring under policy and regulation
Loan terms, coverage limits, product configurations — anything set inside a lattice of policy caps, regulatory bands, and contractual floors. The graph’s trace shows each binding rule and its margin, which is precisely the artifact a credit committee or examiner wants: not “it complies” but here is every rule it had to satisfy, and by how much it does.
2. Eligibility with interacting criteria
Program eligibility rarely fails on one criterion; it fails on combinations — income passes and residency passes, but jointly they trigger a different threshold. Propagation is built for exactly this, and the recorded pruning explains an adverse outcome by the interaction that caused it.
3. Conflicting-obligation analysis
Retention schedules vs. deletion rights, disclosure duties vs. confidentiality — compliance regularly holds rules that pull against each other. Running them as a constraint set makes the conflict a computed finding with the clashing citations attached, turning “legal is looking into it” into a documented, escalatable object.
When to reach for it
Reach for constraint satisfaction when the decision must hold under many rules at once and the rules come from different owners — policy, statute, contract — because that is exactly when checking them serially fails. Its companion virtue is honest infeasibility: when the window is empty, the system says so with the conflict named, rather than delivering the fluent almost-answer that satisfied whichever constraint spoke last.
- Constraints as cited artifacts
- Every binding rule enters the graph with its source; an uncited constraint is a preference and is gated out.
- Propagation
- Rules prune each other’s domains jointly, so interactions are computed up front instead of discovered as serial surprises.
- Infeasibility as a finding
- An empty solution space is reported with its minimal conflicting constraint set — the escalation-ready alternative to quietly bending a rule.