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):
- Calculate each member's exact quota:
qᵢ = (P × wᵢ) / W. - Assign the integer floor:
aᵢ = floor(qᵢ). - Calculate the remainder:
rᵢ = qᵢ - aᵢ. - Compute the remaining unallocated cents:
R = P - Σ aᵢ. - Sort members by remainder
rᵢdescending (with deterministic tie-breaking by member ID) and distribute 1 cent to each of the topRmembers.
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.