Farkas' lemma
In mathematics, Farkas' lemma is a solvability theorem for a finite system of linear inequalities. It was originally proven by the Hungarian mathematician Gyula Farkas.
Farkas' lemma is the key result underpinning the linear programming duality and has played a central role in the development of mathematical optimization. Remarkably, in the area of the foundations of quantum theory, the lemma also underlies the complete set of Bell inequalities in the form of necessary and sufficient conditions for the existence of a local hidden-variable theory, given data from any specific set of measurements.
Generalizations of the Farkas' lemma are about the solvability theorem for convex inequalities, i.e., infinite system of linear inequalities. Farkas' lemma belongs to a class of statements called "theorems of the alternative": a theorem stating that exactly one of two systems has a solution.
Statement of the lemma
There are a number of slightly different formulations of the lemma in the literature. The one given here is due to Gale, Kuhn and Tucker.Here, the notation means that all components of the vector are nonnegative.
Example
Let, and The lemma says that exactly one of the following two statements must be true :- There exist, such that and, or
- There exist such that,, and.
- If and, then option 1 is true, since the solution of the linear equations is and Option 2 is false, since so if the right-hand side is positive, the left-hand side must be positive too.
- Otherwise, option 1 is false, since the unique solution of the linear equations is not weakly positive. But in this case, option 2 is true:
- * If, then we can take e.g. and.
- * If, then, for some number,, so: Thus we can take, for example,,.
Geometric interpretation
Consider the closed convex cone spanned by the columns of ; that is,Observe that is the set of the vectors for which the first assertion in the statement of Farkas' lemma holds. On the other hand, the vector in the second assertion is orthogonal to a hyperplane that separates and The lemma follows from the observation that belongs to if and only if there is no hyperplane that separates it from
More precisely, let denote the columns of. In terms of these vectors, Farkas' lemma states that exactly one of the following two statements is true:
- There exist non-negative coefficients such that
- There exists a vector such that for and
The second statement tells that there exists a vector such that the angle of with the vectors is at most 90°, while the angle of with the vector is more than 90°. The hyperplane normal to this vector has the vectors on one side and the vector on the other side. Hence, this hyperplane separates the cone spanned by from the vector.
For example, let,, and. The convex cone spanned by and can be seen as a wedge-shaped slice of the first quadrant in the plane. Now, suppose. Certainly, is not in the convex cone. Hence, there must be a separating hyperplane. Let. We can see that,, and. Hence, the hyperplane with normal indeed separates the convex cone from.
Logic interpretation
A particularly suggestive and easy-to-remember version is the following: if a set of linear inequalities has no solution, then a contradiction can be produced from it by linear combination with nonnegative coefficients. In formulas: if is unsolvable then has a solution. Note that is a combination of the left-hand sides, a combination of the right-hand side of the inequalities. Since the positive combination produces a zero vector on the left and a −1 on the right, the contradiction is apparent.Thus, Farkas' lemma can be viewed as a theorem of logical completeness: is a set of "axioms", the linear combinations are the "derivation rules", and the lemma says that, if the set of axioms is inconsistent, then it can be refuted using the derivation rules.
Implications in complexity theory
Farkas' lemma implies that the decision problem "Given a system of linear equations, does it have a non-negative solution?" is in the intersection of NP and co-NP. This is because, according to the lemma, both a "yes" answer and a "no" answer have a proof that can be verified in polynomial time. The problems in the intersection are also called well-characterized problems. It is a long-standing open question whether is equal to P. In particular, the question of whether a system of linear equations has a non-negative solution was not known to be in P, until it was proved using the ellipsoid method.Variants
The Farkas Lemma has several variants with different sign constraints :- Either has a solution or has a solution ' with
- Either has a solution or has a solution ' with
- Either has a solution or has a solution ' with.
- Either has a solution or has a solution ' with
There are also Farkas-like lemmas for integer programs. For systems of equations, the lemma is simple:
- Assume that A and b have rational coefficients. Then either has an integral solution or there exists 'such that is integral and is not integral.
- Given inequalities and coefficients, infer the inequality.
- Given an inequality, infer the inequality .
- Assume that A and b have rational coefficients. Then either has an integral solution, or it is possible to infer from using finitely many applications of inference rules 1,2 the inequality.
| System | Constraints on x | Alternative system | Constraints on y | |
| , | ' | |||
| , | ', ' | |||
| , | ', ' | |||
| , | ' | |||
| integral, not integral | ' | |||
| can be inferred from |
Generalizations
Generalized Farkas' lemma can be interpreted geometrically as follows: either a vector is in a given closed convex cone, or there exists a hyperplane separating the vector from the cone; there are no other possibilities. The closedness condition is necessary, see Separation theorem I in Hyperplane separation theorem. For original Farkas' lemma, is the nonnegative orthant hence the closedness condition holds automatically. Indeed, for polyhedral convex cone, i.e., there exists a such that the closedness condition holds automatically. In convex optimization, various kinds of constraint qualification, e.g. Slater's condition, are responsible for closedness of the underlying convex coneBy setting and in generalized Farkas' lemma, we obtain the following corollary about the solvability for a finite system of linear equalities:
Further implications
Farkas' lemma can be varied to many further theorems of alternative by simple modifications, such as Gordan's theorem: Either has a solution, or has a nonzero solution with.Common applications of Farkas' lemma include proving the strong duality theorem associated with linear programming and the Karush–Kuhn–Tucker conditions. An extension of Farkas' lemma can be used to analyze the strong duality conditions for and construct the dual of a semidefinite program. It is sufficient to prove the existence of the Karush–Kuhn–Tucker conditions using the Fredholm alternative but for the condition to be necessary, one must apply von Neumann's minimax theorem to show the equations derived by Cauchy are not violated.
This is used for Dill's Reluplex method for verifying deep neural networks.