Vai al contenuto

delpi

Pubblicato:

Verified Linear Programming through Tolerance-Aware Precision Boosting

Ernesto Casablanca Martin Sidaway Paolo Zuliani Sadegh Soudjani

E. Casablanca

M. Sidaway

P. Zuliani

S. Soudjani

Newcastle University Newcastle University La Sapienza
Max Plank Institute Max Plank Institute
VSTTE 2026 conference

VSTTE 2026

Bits of computer architecture

Computers use bits to store data, including numbers.

Floating point
0.2,42.42,100.100.2, -42.42, 100.10

Rationals
12,34,33\frac{1}{2}, -\frac{3}{4}, \frac{3}{3}

We only have a finite number of bits.

110+210=310\frac{1}{10} + \frac{2}{10} = \frac{3}{10}

0.1+0.2=0.30.1 + 0.2 = 0.3

13+23=1\frac{1}{3} + \frac{2}{3} = 1

0.3333+0.6666=1.0?0.3333\ldots + 0.6666\ldots = 1.0?

Motivation

Standard linear program (LP)

min{cxAx=b, x0}\min \{ c^\top x \mid Ax=b,\ x \ge 0 \}

with AQm×nA \in \mathbb{Q}^{m \times n}, bQmb \in \mathbb{Q}^m, cQnc \in \mathbb{Q}^n.

  • Linear Programming is a core component of:
    • Optimization
    • SMT Solving
    • Program Analysis
  • Numerical errors undermine soundness.
    • Commercial floating-point LP solvers can produce incorrect results.

Solutions

  • Rational arithmetic
    • Easy to implement, exactness guarantee.
    • Slow and memory-intensive.
  • Iterative refinement (SoPlex1^{1})
    • Generally faster.
    • Can struggle with numerical issues.
  • Precision boosting (QSopt_ex2^{2})
    • Can solve difficult LPs.
    • Limited theoretical justification.

[1] A. Gleixner, D. Steffy, K. Wolter (2016), Iterative Refinement for Linear Programming

[2] D. L. Applegate, W. Cook, S. Dash, D. G. Espinoza (2009), QSopt_ex Rational LP Solver

Goal

Loading diagram...

IEEE 754 Standard

Modern computers implement the IEEE 754 standard3^{3} for floating-point arithmetic.

Floating-point number=±mβet\text{Floating-point number} = \pm m \cdot \beta ^{e-t}

where β\beta is the base, tt is the precision, mm is the integer significand and ee is the exponent.

Loading diagram...

[3] IEEE (2019) IEEE Standard for Floating-Point Arithmetic

Operations with floating-point numbers

The IEEE 754 standard provides the following guarantees for floating-point operations:

flϵ(xy)=(xy)(1+ε)±1with εϵ.\textbf{fl}_{\epsilon}\left({x \odot y}\right) = (x \odot y)(1 + \mathbb{\varepsilon})^{\pm 1} \quad \text{with } |\mathbb{\varepsilon}| \le \epsilon .

where ϵ\epsilon is the unit roundoff (2531.1×10162^{-53} \approx 1.1 \times 10^{-16} for double precision) and flϵ(xy)\textbf{fl}_{\epsilon}\left({x \odot y}\right) is the floating-point computation of xyx \odot y.

Any operation can introduce an error.

Error analysis

Error analysis is the study of how floating-point computations affect our results.

Forward error analysis VS Backward error analysis4^{4}.

Input Output Backwarderror Forwarderror

[4] N. J. Higham (2002), Accuracy and Stability of Numerical Algorithms

Ensuring backward stability in the simplex

Given an initial sequence of indices B1,B2,,Bm\mathcal{B}_1, \mathcal{B}_2, \dots, \mathcal{B}_m corresponding to the columns of AA, at each iteration:

  1. Construct the basis: B=[A:,B1A:,B2A:,Bm]B = \begin{bmatrix} A_{:,\mathcal{B}_1} & A_{:,\mathcal{B}_2} & \dots A_{:,\mathcal{B}_m} \end{bmatrix}
  2. Compute primal vector: xB=B1bx_\mathcal{B} = B^{-1}b
  3. Compute dual vector: y=BTcBy = B^{-T}c_\mathcal{B}
  4. Evaluate reduced costs: r=cAyr = c - A^\top y
  5. Determine entering variable.
  6. Determine leaving variable: d=B1A:,ed = B^{-1}A_{:,e}.
  7. Pivot and update basis.

Bartels-Golub update

After the initial LULU decomposition of BB, the factor UU is updated5^{5}:

1 2 ... l-1 l l+1 ... m-1 m
U(i)U^{(i)}
0 1 ... l-1 l+1 ... m-1 m e
H(i+1)H^{(i+1)}
0 1 ... l-1 l+1 ... m-1 m e
U(i+1)U^{(i+1)}

[5] R. H. Bartels (1971), A Stabilization of the Simplex Method

Error analysis

In the backward-error analysis formulation,

(B(i)+E(i))x=b,x,bQm,(B^{(i)} + \mathcal{E}^{(i)})x = b, \qquad x, b \in \mathbb{Q}^m,

we find that

E(i)1=O(ϵ).\|\mathcal{E}^{(i)}\|_1 = O(\epsilon).

As long as the number of iterations is limited, the backward error is reasonably bounded.

Variable precision floating-point simplex

Loading diagram...

Characteristic constants

For a given input AA, bb, and cc, we can define the following constants:

  • rmaxr^-_{\max} is the maximum negative across all reduced costs;
  • dmin+d^+_{\min} is the minimum positive element across all dds;
  • umin12u^{1\sim2}_{\min} is the smallest difference between the two smallest distinct values of u=xB/du = x_{\mathcal{B}}/d across all bases.

Computing them directly would require exploring all the possible bases.

Convergence of precision boosting

If (1)(1) and (2)(2) hold, then the floating-point simplex makes the same decisions as the exact rational simplex.

(1)τ<rmax/2τ<dmin+/2τ<umin12(1) \quad \tau < -r^-_{\max} / 2 \qquad \tau < d^+_{\min} / 2 \qquad \tau < u^{1\sim2}_{\min} (2)εr1τεd1τεu1min(τ,umin12τ)/2(2) \quad \|\varepsilon r\|_1 \le \tau \qquad \|\varepsilon d\|_1 \le \tau \qquad \|\varepsilon u\|_1 \le \min(\tau, u^{1\sim2}_{\min} - \tau) / 2

Delta-optimality

Theorem

Given δ>0\delta > 0, a δ\delta-complete LP algorithm returns exactly one of the following:

  • δ\delta-optimal: iff it produces a δ\delta-optimal certificate (xU,yL)(x_U, y_L) such that 0cxUbyLδ0 \le c^\top x_U - b^\top y_L \le \delta;
  • infeasible: iff the LP is infeasible;
  • unbounded: iff the LP is unbounded.

If δ=0\delta = 0, then the algorithm is exact.

Precision boosting simplex

Loading diagram...

Delpi

  • Delta-complete Exact Linear ProgrammIng framework: Delpi.
  • C++ library with python interface.
  • QSopt_ex as a basis.
  • Implements the δ\delta-complete procedure.
  • Can interface with SoPlex.

Results

  • Sloane–Stufken benchmarks6^6.
  • Dense and feasible.
  • Numerically challenging.
    • Incorrect results from FP SOTA solvers.
  • Performance profile plot.

delpi-benchmarks

[6] N. J. A. Sloane, J. Stufken (1996), A linear programming bound for orthogonal arrays with mixed levels

Future Work

  • Integration into SMT solvers (work in progress!)
  • Stronger practical heuristics for choosing tolerances
  • Extensions to MILP

References

Thank you!