Farkas certificate for linear inequalities Created 2026-10-07 Updated 2026-10-14
Let and . For unrestricted , the system of linear inequalities has no feasible point if and only if there is a vector with
The entries are nonnegative Lagrange multipliers for the rows. Multiplying inequalities by them preserves their direction; the condition cancels every variable, leaving the contradiction
This is a Farkas' lemma alternative for non-strict inequalities; no strict-feasibility assumption is needed. See Boyd and Vandenberghe, Convex Optimization (2004), §5.8.3, pp. 261–262.
Three individually possible requirements, jointly impossible. Suppose two unrestricted real coordinates , drawn as in the diagram, must satisfy
Write every row in the same direction:
Then and . The nonnegative weighted sum, with Lagrange multipliers , is visibly
Each individual requirement defines a half-space in the plane. Even every pair has a feasible point: satisfies the first two, the first and third, and the second and third. Their common intersection is empty, because the first two force , while the third demands at most .
Figure 1.
Each half-plane is nonempty, but their three constraints add to the contradiction
. The first three panels shade each half-space separately. The final panel compares the simultaneous requirements with ; the two regions are disjoint. The points , and satisfy only pairs of constraints. Details.
Why cancellation is necessary for unrestricted variables. A nonzero linear functional can be made arbitrarily positive or negative by varying unrestricted , so alone would not yield a contradiction. Equality is essential here. If is also imposed, the sufficient certificate becomes , , , because then . This is the sign convention used in robust infeasibility under uniform constraint relaxation. One can instead append the rows and use the equality certificate on the enlarged system. Reversing all constraints to reverses the scalar sign to , as in the normalized integer Farkas infeasibility gap.
Checking a solver's infeasibility claim. A returned Farkas certificate for linear inequalities gives a short verification procedure: compute and , and check the three displayed conditions against the original constraints. Any positive multiple is another certificate; division by normalizes to . With rational numbers as data and certificate, the tests can be exact. With floating-point arithmetic, a small residual is a diagnostic rather than an exact cancellation: unrestricted can amplify a nonzero residual without bound. A rigorous certificate therefore needs exact cancellation or justified error bounds and additional bounds on the variables. The strict negative scalar is the margin of contradiction.
The same weighted sums give dual bounds. For the linear program maximizing over unrestricted with , any satisfying gives
for every feasible point. Minimizing over these multipliers is the dual linear program; the bound itself is weak duality. For example, maximize subject to , , . The multipliers give the upper bound , attained at . The infeasibility example above uses the same row directions, but lower bounds of on both coordinates. Its multipliers cancel the objective function as well as the variables: with would bound zero by a negative number. Thus impossibility and linear programming optimality certificates use the same arithmetic. See Boyd and Vandenberghe, Convex Optimization slides, §§5.32–5.35 for infeasibility as a dual alternative.
Why every inconsistent system has such a certificate. Introduce a slack variable vector and write . Split the unrestricted vector as with . Applying Farkas' lemma to the column matrix gives , , and . The first two conditions together are exactly . This reduction explains both the equality and the nonnegative row multipliers.
For a transferable utility game, the characteristic function of a coalitional game assigns a coalition its largest total attainable revenue , with . The core of a cooperative game consists of payoff vectors satisfying efficiency, , and coalition stability, for every . A coalition receiving less could operate alone and distribute its extra value to make each member better off.
Use thousands of pounds as the monetary unit. The physical directed arcs are and , owned by , with capacities ; and , owned by , with capacities ; and , owned by , with capacity .
Figure 1.
Company ownership and capacities in the two-demand communication network
. Details.
The physical network is acyclic. There are exactly three – graph paths and one – graph path. Let be the – flows on , , , respectively, and let be the direct – demand. Their capacities and revenue are
Every feasible traffic pattern decomposes into these graph paths, so these inequalities are exact. The first is redundant, since and imply it.
Formulate this as a minimum-cost flow through the two-resource path packing as minimum-cost circulation reduction. Use auxiliary vertices and the following arcs, whose entries are (capacity, cost):
The first forward graph path carries , carries , carries , and carries . Conservation at imposes , and at imposes ; the individual finite-capacity arcs give the other bounds. The return arc closes the circulation. Its cost is exactly , so this is an ordinary minimum-cost circulation with precisely the required feasible traffic set. Unlimited capacities may all be replaced by , the maximum possible total graph path flow.
An linear programming optimality certificate is particularly short:
The feasible choice attains equality. Thus the actual traffic is three units from to and one from to , and
All four positive terms in the bound must be tight at any optimum, so these graph path amounts are unique.
The two traffic demands must retain their identities. Merely adding fictitious return arcs and to the physical graph can create an invalid graph cycle combining both rewards: would credit the -only network with revenue even though it carries neither requested demand. The resource-flow formulation above avoids that problem.
For the characteristic function, only complete physical graph paths owned by a coalition are available. Company or alone has no requested graph path; company carries two units of – traffic. The pair carries one unit on each of ; the pair sends two units on rather than selling them at the lower – rate; and has only the two direct – units. Therefore
Writing payments in thousands, all stable divisions of the revenue are exactly
Equivalently, , and . This is the entire core, not just one acceptable allocation.
The nucleolus minimizes in lexicographic order the sorted decreasing excesses of a coalition over imputations. Empty and grand-coalition coalition excesses are fixed zeros and can be omitted. For the six other coalitions, efficiency gives
The two -related coalition excesses sum to , so their maximum is at least . This bound is attainable, and attaining it forces . All six coalition excesses are then at most precisely when and . The fixed pair of coalition excesses equals throughout these first-stage minimizers.
Minimize the largest of the remaining coalition excesses. They become , whose maximum is . Its unique minimum is at . Hence and . The sorted proper coalition excesses there are , and
Use two-phase simplex to handle the constraint of the opposite inequality direction. Introduce nonnegative slack variables , a surplus variable , and an artificial variable . The equality constraints are
For Phase I maximize , initially with basis . Its initial simplex dictionary is
Choose to enter. The simplex ratio test compares , and , so leaves. The new dictionary is
Since , choose to enter. Its limiting ratios are from and from , so leaves. This gives
Now , so let enter. Its limiting ratios are from and from ; the artificial variable leaves. The simplex dictionary becomes
Setting all nonbasic variables to zero gives , a feasible original basis. Since , Phase I is optimal with value zero; delete .
For Phase II the original objective in this basis is
All nonbasic reduced costs are strictly negative, so no further improving simplex pivot exists. As the nonbasic variables are nonnegative, the dictionary also directly certifies , with equality only when . Therefore
The second original constraint has slack five and the other two are tight. As an independent linear programming optimality certificate, multiply the first constraint by and the third, after reversing it, by . This gives , and subtracting proves the same upper bound for the objective.
Write the amended primal as with , . A convenient linear programming duality convention uses and gives subject to . Explicitly the dual is
The optimal dual vector is the negative of the three payoff-row slack coefficients:
Indeed substitution gives , so all dual inequalities hold. To certify optimality directly by weak duality, for any feasible primal and dual vectors,
where the second inequality uses and . Our feasible primal and dual vectors have equal values , so neither can be improved. This is a linear programming optimality certificate.
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.
Introduce nonnegative slack variables for the four dual inequalities. The initial simplex dictionary is
At the origin all four basic slacks are positive. Enter : the simplex ratio test compares bounds from and from , so leaves at . Entering initially would tie two limiting bounds and produce degeneracy in linear programming; the chosen pivot avoids this. The new simplex dictionary is
Only has positive objective coefficient. Enter it; the limiting bound is from , rather than from . Thus leaves, giving
Every nonbasic variable has nonpositive objective coefficient, so this feasible simplex basis is optimal. Setting the nonbasic variables to zero yields
Both new basic solutions have strictly positive basic coordinates; neither pivot is degenerate.
The first and fourth dual constraints have positive slacks and . Complementary slackness therefore requires . Since , the second and third primal constraints must be equalities:
Consequently
The first primal left side is , so the vector is feasible. Its value matches the feasible dual value, giving a linear programming optimality certificate.
The feasible triangle has vertices
These come from the three pairs of active boundary lines and satisfy the remaining inequalities. Its denominator is positive at each vertex, with minimum , so is positive throughout the triangle because it is an affine function.
For a direct linear programming optimality certificate, add twice the second inequality to the third to get . Thus , equivalently . Division by the positive denominator gives an objective at most . Both inequalities used in the bound are equalities at , where the first inequality is also satisfied. Therefore
Equality requires the two bounding inequalities to be tight, so this optimizer is unique.
For every primal feasible solution , weak duality gives
Thus no primal feasible solution improves on . Similarly, for every dual feasible solution ,
Therefore both candidates are optimal, with the same objective function value. Equality is a linear programming optimality certificate and does not require a separate existence argument.