You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add FeasibleBasisExtension model (#530) (#818)
* feat: add FeasibleBasisExtension model (closes#530)
Add the Feasible Basis Extension problem: given m x n integer matrix A,
vector a_bar, and required columns S, determine if a feasible basis
extending S exists. Uses exact rational arithmetic (Bareiss + rational
back-substitution) to avoid floating-point issues.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix paper citation, Bareiss overflow, and solve command
- Add missing Murty1972 BibTeX entry (fixes make paper failure)
- Correct paper: "3-SAT" → "Hamiltonian Circuit", @murty1980 → @Murty1972
- Widen Bareiss elimination to i128 to prevent overflow on large coefficients
- Fix pred solve command to use --solver brute-force (no ILP path exists)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
"DirectedTwoCommodityIntegralFlow": [Directed Two-Commodity Integral Flow],
159
160
"IntegralFlowHomologousArcs": [Integral Flow with Homologous Arcs],
@@ -6607,6 +6608,101 @@ A classical NP-complete problem from Garey and Johnson @garey1979[Ch.~3, p.~76],
6607
6608
]
6608
6609
}
6609
6610
6611
+
#{
6612
+
let x = load-model-example("FeasibleBasisExtension")
6613
+
let A = x.instance.matrix
6614
+
let m = A.len()
6615
+
let n = A.at(0).len()
6616
+
let rhs = x.instance.rhs
6617
+
let S = x.instance.required_columns
6618
+
let cfg = x.optimal_config
6619
+
// Free column indices (those not in S)
6620
+
let free-cols = range(n).filter(j => j not in S)
6621
+
// Selected free columns from config
6622
+
let selected = cfg.enumerate().filter(((i, v)) => v == 1).map(((i, v)) => free-cols.at(i))
6623
+
// Full basis: required + selected
6624
+
let basis = S + selected
6625
+
[
6626
+
#problem-def("FeasibleBasisExtension")[
6627
+
Given an $m times n$ integer matrix $A$ with $m < n$, a column vector $overline(a) in bb(Z)^m$, and a subset $S$ of column indices with $|S| < m$, determine whether there exists a _feasible basis_ $B$ --- a set of $m$ column indices including $S$ --- such that the $m times m$ submatrix $A_B$ is nonsingular and $A_B^(-1) overline(a) >= 0$ (componentwise).
6628
+
][
6629
+
The Feasible Basis Extension problem arises in linear programming theory and the study of simplex method pivoting rules. It was shown NP-complete by Murty @Murty1972 via a reduction from Hamiltonian Circuit, establishing that determining whether a partial basis can be extended to a feasible one is computationally intractable in general. The problem is closely related to the question of whether a given linear program has a feasible basic solution containing specified variables. The best known exact algorithm is brute-force enumeration of all $binom(n - |S|, m - |S|)$ candidate extensions, testing each for nonsingularity and non-negativity of the solution in $O(m^3)$ time.#footnote[No algorithm improving on brute-force enumeration is known for the general Feasible Basis Extension problem.]
6630
+
6631
+
*Example.* Consider the $#m times #n$ matrix $A = mat(#A.map(row => row.map(v => str(v)).join(", ")).join("; "))$ with $overline(a) = (#rhs.map(str).join(", "))^top$ and required columns $S = \{#S.map(str).join(", ")\}$. We need $#(m - S.len())$ additional column from the free set $\{#free-cols.map(str).join(", ")\}$. Selecting column #selected.at(0) gives basis $B = \{#basis.map(str).join(", ")\}$, which yields $A_B^(-1) overline(a) = (4, 5, 3)^top >= 0$. Column 4 makes $A_B$ singular, and column 5 produces a negative component.
caption: [Feasible Basis Extension instance ($#m times #n$). Orange columns are required ($S = \{#S.map(str).join(", ")\}$), blue column is the selected extension. Together they form a nonsingular basis with non-negative solution.],
6701
+
) <fig:feasible-basis-extension>
6702
+
]
6703
+
]
6704
+
}
6705
+
6610
6706
// Completeness check: warn about problem types in JSON but missing from paper
0 commit comments