Back to Documentation
Algorithmic Invariant

Deterministic Math Proofs

Standard floating-point numbers in computer systems introduce precision loss (e.g., 0.1 + 0.2 = 0.30000000000000004). MicroSplit AI guarantees strict zero-cent loss by operating solely on integer minor currency units.

1. The Hare-Niemeyer Largest Remainder Method

To distribute a pool of P cents among n members with weights w₁, w₂, ..., wₙ (where sum of weights = W):

  1. Calculate each member's exact quota: qᵢ = (P × wᵢ) / W.
  2. Assign the integer floor: aᵢ = floor(qᵢ).
  3. Calculate the remainder: rᵢ = qᵢ - aᵢ.
  4. Compute the remaining unallocated cents: R = P - Σ aᵢ.
  5. Sort members by remainder rᵢ descending (with deterministic tie-breaking by member ID) and distribute 1 cent to each of the top R members.

2. Invariant Theorem: Exact Pool Equality

Proof of Exact Equality

By definition, R = P - Σ aᵢ. Exactly R members receive +1 cent, adding Σ 1 = R additional cents. Therefore:
Final Sum = Σ aᵢ + R = Σ aᵢ + (P - Σ aᵢ) = P.
The sum of all member allocations strictly equals the total pool P, down to the last single cent. Zero cents are created, and zero cents are lost.