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 (alternatively, mathematical programming). It is used amongst other things in the proof of the Karush–Kuhn–Tucker theorem in nonlinear programming.[1] 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.[2]
There are a number of slightly different (but equivalent) formulations of the lemma in the literature. The one given here is due to Gale, Kuhn and Tucker (1951).[3] Here, the notation
x\geq0
x
Let,
A=\begin{bmatrix}6&4\\3&0\end{bmatrix},
b=\begin{bmatrix}b1\\b2\end{bmatrix}.
Here is a proof of the lemma in this special case:
x1=\tfrac{b2}{3}
x2=\tfrac{b1-2b2}{4}.
C(A)
C(A)=\{Ax\midx\geq0\}.
Observe that
C(A)
C(A).
C(A)
C(A).
More precisely, let
a1,...,an\in\Rm
x1,...,xn\in\R
b=x1a1+...+xnan.
y\in\Rm
\top | |
a | |
i |
y\geq0
i=1,...,n,
b\topy<0.
The sums
x1a1+...+xnan
x1,...,xn
C(A).
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
a1,...,an
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 .
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
Ax\leb
y\topA=0,
y\topb=-1,
y\ge0
y\topA
y\topb
Thus, Farkas' lemma can be viewed as a theorem of logical completeness:
Ax\leb
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
NP\capcoNP
NP\capcoNP
The Farkas Lemma has several variants with different sign constraints (the first one is the original version):
Ax=b
x\geq0,
A\topy\geq0
y\in\Rm
b\topy<0.
Ax\leqb
x\geq0,
A\topy\geq0
y\geq0
b\topy<0
Ax\leqb
x\in\Rn,
A\topy=0
y\geq0
b\topy<0
Ax=b
x\in\Rn,
A\topy=0
y\in\Rm
b\topy ≠ 0.
The latter variant is mentioned for completeness; it is not actually a "Farkas lemma" since it contains only equalities. Its proof is an exercise in linear algebra.
There are also Farkas-like lemmas for integer programs. For systems of equations, the lemma is simple:
Ax=b
x\in\Zn,
y\in\Rn
A\topy
b\topy
T | |
a | |
1 |
x\leqb1,\ldots,
T | |
a | |
m |
x\leqbm
w1,\ldots,wm
m | |
\left(\sum | |
i=1 |
wi
T\right) | |
a | |
i |
x\leq
m | |
\sum | |
i=1 |
wibi
a1x1+ … +amxm\leqb
\lfloora1\rfloorx1+ … +\lflooram\rfloorxm\leq\lfloorb\rfloor
Ax\leqb
x\in\Zn,x\geq0
Ax\leqb
0Tx\leq-1
Ax=b | x\in\Rn,x\geq0 | A\topy\geq0 b\topy<0 | y\in\Rm | ||
Ax\leqb | x\in\Rn,x\geq0 | A\topy\geq0 b\topy<0 | y\in\Rm y\geq0 | ||
Ax\leqb | x\in\Rn | A\topy=0 b\topy<0 | y\in\Rm y\geq0 | ||
Ax=b | x\in\Rn | A\topy=0 b\topy ≠ 0 | y\in\Rm | ||
Ax=b | x\in\Zn | A\topy b\topy | y\in\Rn | ||
Ax\leqb | x\in\Zn,x\geq0 | 0Tx\leq-1 Ax\leqb |
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,
S
n, | |
\R | |
+ |
B\in\Rn
S=\{Bx\midx\in
k | |
\R | |
+ |
\},
C(A).
By setting
S=\Rn
S*=\{0\}
Farkas's lemma can be varied to many further theorems of alternative by simple modifications, such as Gordan's theorem: Either
Ax<0
A\topy=0
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.