Given finitely encoded linear inequalities, a maximum feasible subsystem is a largest collection that can be simultaneously satisfied. Its decision version asks whether some inequalities admit a common solution. This is NP-complete, despite polynomial time feasibility testing for each fixed collection. For a graph, use nonnegative variables , constraints for vertices, and copies of for each edge. A subsystem of size must retain a copy of every edge constraint and at least vertex constraints; those vertices form an independent set. Conversely an independent set of size supplies such a feasible subsystem by its indicator vector.
Introduce nonnegative slack variables and write . A maximizing simplex dictionary is dual feasible when every nonbasic coefficient in the objective is nonpositive. After inserting a constraint, the dual simplex algorithm retains this property while repairing any negative basic value. For a leaving row with , only can enter; choose a column minimizing the ratio of its objective penalty to .
For the first linear program, has the best profit-to-resource ratio. Pivot it into the initial slack basis to obtain
All basic values are nonnegative and all reduced costs are nonpositive, so the optimal point is , with value five. Adding the second constraint gives
The same basis remains feasible and optimal: the second constraint does not change the answer.
The third constraint gives the new row
The current dictionary is dual feasible but primal infeasible. The eligible entering variables are , with dual ratio-test values and respectively. Enter and leave ; solving that row and substituting into the old rows yields
This is a feasible optimal simplex dictionary. Thus the new optimal point is , with value three. As an independent linear programming optimality certificate, dual multipliers have weighted objective bound and weighted coefficient row , which dominates the profit row.
On inserting the fourth constraint the slack is
It has a negative constant and no eligible entering column. Since all its nonbasic variables are nonnegative, this row cannot be satisfied: the fourth linear program is infeasible, and adding the fifth constraint cannot restore feasibility. The requested optimal values are therefore
The arbitrary-data selection question is a maximum feasible subsystem problem. With rational input it is in NP: guess the selected row indices, and test their linear programming feasibility in polynomial time. Equivalently, a nonempty rational polyhedron has a feasible rational point of polynomially bounded encoding length, which serves as a certificate.
For an explicit NP-hardness reduction, take an independent set instance with graph having vertices and desired independent-set size . Use variables , one inequality for each vertex, and identical copies of for each edge. Ask for a feasible subsystem of size . An independent set of size gives such a subsystem: include all edge rows and those vertex rows, and use its indicator vector. Conversely, omitting every copy of even one edge row leaves at most selectable rows. Hence any qualifying subsystem retains every edge inequality and at least vertex inequalities. Their vertices must be independent, since two adjacent selected vertices would force . The construction has polynomial size; is irrelevant to feasibility. Thus the rational-input decision problem is NP-complete, not merely difficult because there are many subsets to enumerate.