simplex_max

std.optim.simplex_max · Level L4

Maximize cᵀx subject to A·x ≤ b and x ≥ 0, for integer A, b ≥ 0 and c, by the fraction-free simplex method with Bland's rule: a While over simplex_step on the integer tableau [A | I | b; −c | 0 | 0]. Every entry stays an integer, so every decision is exact. status is 1 at an optimum and 0 when the objective is unbounded. The optimum is z_num/z_den in lowest terms; x and the duals y are x_num/den and y_num/den, and bᵀy = cᵀx by strong duality. The reference is the ordinary simplex method on Fractions.

max cᵀx s.t. A·x ≤ b, x ≥ 0

Signature

simplex_max(A: i64[m, n], b: i64[m], c: i64[n]) → i64[], i64[], i64[], i64[n], i64[m], i64[]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

Ai64[m, n]ci64[n]bi64[m]0IotacjSizenfIotariReshapebcNegatenegcMultiplyzmReshapez1ReshapecjrAddyi_fAddbas_fReshapericReshaperirConcatobjvCastyiCastbasis0EqualeyefReshapeobjrCasteyeConcatrows1ConcatT02While·simplex_stepT_end, basis_end, D_end, status_endCastbfSlicebrowsEqualokReshapeD1SlicelastrIdentitystatusReshapebfcCastokiSlicerhscReshapeobjWhereDmEqualhotReshaperhsGatheryvSlicezlIdentitydenCasthotiReshaperhsrMultiplyymReduceSumz_rawMatMulxrIdentityy_numNegatenzReshapexvMaximumzaMultiplyxmReshapeza1Identityx_numgcdgReduceSumg0FloorDivzdFloorDivznWherez_denWherez_numz_deni64[]x_numi64[n]y_numi64[m]z_numi64[]deni64[]statusi64[]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference the ordinary simplex method on Fractions, Bland's rule; den = |det B| in exact rational arithmetic, on all 40 test cases.
  • All 384 int64 results are exact: the error is zero.
  • Interpreter and NumPy backend return bit-identical results.
  • At float32 too: the 40 test cases rounded to float32, and 40 of them exact, with zero error.
Accuracy in detail
correctly rounded (the int64 nearest the exact value)
100%
bit-equal to the NumPy formula in int64
100%
largest error, in units in the last place
0

Note

b ≥ 0 makes the origin feasible, so no first phase is needed. Exact while the tableau's integers, which are minors of [A | I | b], stay below 2⁵³; the verification uses m, n ≤ 5 and entries up to 20.

Identity

sha256:7681986778429b28a54d2d410b6ddb4792c80f849706ad475a7a39df41f0342c

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.

Control handle

Symbol
Ω:std.optim.simplex_max · Ω:simplex_max
Pins
sha256:13d7ebfb3752006e6192bc70e7712534474fc3222e80835ec481526e84f06c8fthis graph and the 5 it reaches through calls
Evidence
sha256:a667c30a48586ed3ebf83078cac76ed7189642c492b18f3956a23f670e275fe2the hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.

ΣEML 2026

Efficient New Language — a high-density semantic overlay for humans and AI agents.

This site’s demos run on the real EML toolchain, in your browser.

© 2026 EveMissLab (一言諾科技有限公司) / Neo.K. All rights reserved.