The methods the labs share

I built the twelve labs one at a time, and the same methods kept coming back in different fields. This page lists the 25 methods the labs compute, which labs use each one and what for, with a link to the place on each lab page where the method is written out.

Methods by lab

Each square opens the part of that lab where the method is described.

25 methods across twelve labs.
MethodLabsIntelligenceSecurityBiologyMarketsLegalMachinesCommerceReal estatePerfumerySoundDecisionsLogistics
Exact rational arithmetic6Commerce and operations: intermediate cent products in BigIntReal estate: the loan payment as an exact fraction, rounded oncePerfumery and product: rounding quotas as exact integer fractionsSound and harmony: interval ratios reduced by an exact gcdDecisions and evidence: every probability and payoff as a reduced fractionLogistics and routing: every tour length as an exact integer sum
Largest-remainder rounding2Commerce and operations: inbound charges and purchase cost split to the centPerfumery and product: batch mass split into whole balance units
Minimum-cost flow and assignment2Commerce and operations: lots matched to orders by shortest augmenting pathsLogistics and routing: an assignment lower bound by the Hungarian method
Dynamic programming3Markets and mathematics: the HJB value function solved backward in timeLegal intelligence: a longest common subsequence redline of clause tokensLogistics and routing: the Held and Karp exact tour over subsets of stops
Graph search and cycle detection5Intelligence and systems: workflow cycles rejected and ancestry checkedMachines and engineering: edge incidence, vertex links and componentsCommerce and operations: Bellman-Ford shortest paths in the residual networkPerfumery and product: nested stocks resolved to leaves, cycles refusedLogistics and routing: a Prim spanning tree for the 1-tree bound
Least squares2Biology and human potential: a trend-adjusted model by pivoted Householder QRPerfumery and product: a blend fitted to a target descriptor profile
Projected gradient descent1Perfumery and product: blend weights on a capped simplex
Bisection2Real estate: the monthly IRR inside a fixed bracketPerfumery and product: the shift that projects onto the capped simplex
Runge-Kutta integration1Markets and mathematics: the HJB equation behind the quoting policy
Closed-form and refinement checks2Markets and mathematics: the exact zero-flow solution and a run at twice the stepsMachines and engineering: analytic bounds and a doubling resolution ladder
Monte Carlo simulation1Markets and mathematics: paired price paths on one shared tape
Discrete-event simulation2Intelligence and systems: workflow tasks, slots and retries by tickMarkets and mathematics: order arrivals, fills and price jumps
Bootstrap resampling2Biology and human potential: a moving-block bootstrap of residualsMarkets and mathematics: a paired interval on per-path profit differences
Bayesian updating1Decisions and evidence: the posterior after each evidence item
Sliding time windows1Cybersecurity: spray, brute-force and recovery rules
Sensitivity grids4Cybersecurity: case counts at nearby windows and thresholdsBiology and human potential: block lengths 1, 3, 7 and 14, with and without travelMarkets and mathematics: nine stressed markets on the same seedsReal estate: vacancy against exit cap in up to nine cells
Certificates4Commerce and operations: a residual cut and reduced costs for the flowSound and harmony: coprime harmonic numbers rechecked for each chordDecisions and evidence: the Murphy identity reconciled exactlyLogistics and routing: a 1-tree or assignment bound under the optimum
Abstention rules6Cybersecurity: an unknown role or missing field gives UNKNOWNBiology and human potential: a rank failure leaves no fitted modelLegal intelligence: ambiguous, repeated or negated clause wordingMachines and engineering: no STL file for a mesh that fails a checkReal estate: an IRR outside the supported cash-flow patternDecisions and evidence: a zero normaliser or an undefined log score
Stated tie rules5Intelligence and systems: specification order, then arrival orderCommerce and operations: ascending IDs and the first predecessor keptPerfumery and product: equal remainders taken in source orderDecisions and evidence: equal actions listed together as a tieLogistics and routing: the lowest input index wins
Fault injection2Intelligence and systems: injected failures on chosen workflow stepsMachines and engineering: missing, reversed, duplicated, split or collapsed faces
Source spans and citations4Cybersecurity: each case drawn from its evidence IDsBiology and human potential: original CSV line numbers in the exportLegal intelligence: zero-based UTF-16 spans and line numbersCommerce and operations: source labels and every failed rule per pair
Event replay and idempotency2Intelligence and systems: repeated event IDs and identical payloads ignoredCybersecurity: events deduplicated by ID and replayed in time order
Replayable exports9Intelligence and systems: commands replayed and the trace comparedCybersecurity: a pasted export rerun from its own inputsBiology and human potential: a pasted export compared key by keyMachines and engineering: a validation file rebuilt from its parametersCommerce and operations: the audit rerun through the same engineReal estate: the source and grid steps replayed togetherSound and harmony: the exact input text replayed in NodeDecisions and evidence: the exact input text replayed in NodeLogistics and routing: the exact input text replayed in Node
SHA-256 fingerprints2Cybersecurity: the normalized events and the policyLegal intelligence: both documents and the playbook
Stale-input guards12Intelligence and systems: an approval bound to the exact version it sawCybersecurity: any edit clears the results and the reviewBiology and human potential: an input change disables the exportMarkets and mathematics: export blocked after a settings changeLegal intelligence: edits hide results and block the exportMachines and engineering: downloads wait for a fresh checkCommerce and operations: the download recomputes from the current editorsReal estate: the download stays off until the next calculationPerfumery and product: the download stays off until the next runSound and harmony: the download stays off until the next runDecisions and evidence: the download stays off until the next runLogistics and routing: the download stays off until the next run
Methods in each lab787856968478

Each method and where it is used

Exact rational arithmetic

Values are kept as whole numbers or as fractions of arbitrary-precision integers, so sums and products carry no rounding error until a stated display step.

Largest-remainder rounding

Each share is floored to a whole unit and the units left over go to the largest fractional remainders, so the parts always add back to the total.

Minimum-cost flow and assignment

Supply is routed through a network to meet demand at the least total cost; the assignment problem is the case that pairs each row with exactly one column.

Dynamic programming

A large problem is solved by tabulating the best answer to each smaller subproblem once and reading the final answer back out of the table.

Graph search and cycle detection

Nodes and edges are walked to order dependencies, find connected parts and refuse any cycle that would make a definition circular.

Least squares

A fit is chosen to make the sum of squared differences between the model and the data as small as possible.

Projected gradient descent

Each step moves against the gradient and then projects back onto the allowed set, here mixtures whose weights sum to one under per-stock caps.

Bisection

An interval known to contain a root is halved again and again until it pins down the value where a function changes sign.

Runge-Kutta integration

A differential equation is stepped through time with the classical fourth-order Runge-Kutta scheme.

Closed-form and refinement checks

A numerical result is compared with an exact formula where one exists, and with a finer run to show how the error shrinks.

Monte Carlo simulation

Many random paths are simulated from seeded generators, and competing policies run on the same paths so their differences are paired.

Discrete-event simulation

Time advances one event or one logical tick at a time, and every change of state follows from the events before it.

Bootstrap resampling

Uncertainty is estimated by recomputing a statistic on many resamples drawn with replacement and reading percentiles from the results.

Bayesian updating

Each probability is multiplied by the likelihood of the evidence under its hypothesis and the results are renormalised to sum to one.

Sliding time windows

Events are counted inside a window that slides along the timeline, with each endpoint stated as open or closed.

Sensitivity grids

The whole computation is run again across a small grid of nearby settings, so the reader can see how far the answer moves.

Abstention rules

When an answer would have to be invented, the lab says it abstains and why, and reports no number in its place.

Fault injection

A known defect is introduced on purpose to show that the checks catch it and name the right cause.

Event replay and idempotency

State is rebuilt by replaying recorded events in order, and an event repeated with identical content changes nothing.

Replayable exports

A download holds the exact inputs, and the same engine can run them again and compare every result with the saved file.

SHA-256 fingerprints

Inputs are hashed with SHA-256 so that an export names exactly which bytes it was computed from.

Stale-input guards

Editing an input hides the old result and turns its download off until the computation runs again on what is now on the page.