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 (alternatively, mathematical programming).[citation needed] 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 (but equivalent) formulations of the lemma in the literature. The one given here is due to Gale, Kuhn and Tucker (1951).

Farkas' lemmaβ€” Let π€βˆˆβ„mΓ—n and π›βˆˆβ„m. Then exactly one of the following two assertions is true:

  1. There exists an π±βˆˆβ„n such that 𝐀𝐱=𝐛 and 𝐱β‰₯0.
  2. There exists a π²βˆˆβ„m such that π€βŠ€π²β‰₯0 and π›βŠ€π²<0.

Here, the notation 𝐱β‰₯0 means that all components of the vector 𝐱 are nonnegative.

Example

Let m, n = 2, 𝐀=[6430], and 𝐛=[b1b2]. The lemma says that exactly one of the following two statements must be true (depending on b1 and b2):

  1. There exist x1 β‰₯ 0, x2 β‰₯ 0 such that 6x1 + 4x2 = b1 and 3x1 = b2, or
  2. There exist y1, y2 such that 6y1 + 3y2 β‰₯ 0, 4y1 β‰₯ 0, and b1 y1 + b2 y2 < 0.

Here is a proof of the lemma in this special case:

Geometric interpretation

Consider the closed convex cone C(𝐀) spanned by the columns of A; that is,

C(𝐀)={π€π±βˆ£π±β‰₯0}.

Observe that C(𝐀) is the set of the vectors b for which the first assertion in the statement of Farkas' lemma holds. On the other hand, the vector y in the second assertion is orthogonal to a hyperplane that separates b and C(𝐀). The lemma follows from the observation that b belongs to C(𝐀) if and only if there is no hyperplane that separates it from C(𝐀).

More precisely, let 𝐚1,…,𝐚nβˆˆβ„m denote the columns of A. In terms of these vectors, Farkas' lemma states that exactly one of the following two statements is true:

  1. There exist non-negative coefficients x1,…,xnβˆˆβ„ such that 𝐛=x1𝐚1+β‹―+xn𝐚n.
  2. There exists a vector π²βˆˆβ„m such that 𝐚i⊀𝐲β‰₯0 for i=1,…,n, and π›βŠ€π²<0.

The sums x1𝐚1+β‹―+xn𝐚n with nonnegative coefficients x1,…,xn form the cone spanned by the columns of A. Therefore, the first statement tells that b belongs to C(𝐀).

The second statement tells that there exists a vector y such that the angle of y with the vectors ai is at most 90Β°, while the angle of y with the vector b is more than 90Β°. The hyperplane normal to this vector has the vectors ai on one side and the vector b on the other side. Hence, this hyperplane separates the cone spanned by 𝐚1,…,𝐚n from the vector b.

For example, let n, m = 2, a1 = (1, 0)T, and a2 = (1, 1)T. The convex cone spanned by a1 and a2 can be seen as a wedge-shaped slice of the first quadrant in the xy plane. Now, suppose b = (0, 1). Certainly, b is not in the convex cone a1x1 + a2x2. Hence, there must be a separating hyperplane. Let y = (1, βˆ’1)T. We can see that a1 Β· y = 1, a2 Β· y = 0, and b Β· y = βˆ’1. Hence, the hyperplane with normal y indeed separates the convex cone a1x1 + a2x2 from b.

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 π²βŠ€π€=0, π²βŠ€π›=βˆ’1, 𝐲β‰₯0 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.:β€Š92–94β€Š

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 NP∩coNP are also called well-characterized problems. It is a long-standing open question whether NP∩coNP 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.:β€Š25β€Š

Variants

The Farkas Lemma has several variants with different sign constraints (the first one is the original version)::β€Š92β€Š

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.:β€Š12--14β€Š For systems of equations, the lemma is simple:

For system of inequalities, the lemma is much more complicated. It is based on the following two rules of inference:

  1. Given inequalities a1Tx≀b1,…,amTx≀bm and coefficients w1,…,wm, infer the inequality (βˆ‘i=1mwiaiT)xβ‰€βˆ‘i=1mwibi.
  2. Given an inequality a1x1+β‹―+amxm≀b, infer the inequality ⌊a1βŒ‹x1+β‹―+⌊amβŒ‹xmβ‰€βŒŠbβŒ‹.

The lemma says that:

The variants are summarized in the table below.

System Constraints on x Alternative system Constraints on y
𝐀𝐱=𝐛 π±βˆˆβ„n,xβ‰₯0 π€βŠ€π²β‰₯0, π›βŠ€π²<0 π²βˆˆβ„m
𝐀𝐱≀𝐛 π±βˆˆβ„n,xβ‰₯0 π€βŠ€π²β‰₯0, π›βŠ€π²<0 π²βˆˆβ„m, 𝐲β‰₯0
𝐀𝐱≀𝐛 π±βˆˆβ„n π€βŠ€π²=0, π›βŠ€π²<0 π²βˆˆβ„m, 𝐲β‰₯0
𝐀𝐱=𝐛 π±βˆˆβ„n π€βŠ€π²=0, π›βŠ€π²β‰ 0 π²βˆˆβ„m
𝐀𝐱=𝐛 π±βˆˆβ„€n π€βŠ€π² integral, π›βŠ€π² not integral π²βˆˆβ„n
𝐀𝐱≀𝐛 π±βˆˆβ„€n,xβ‰₯0 0Txβ‰€βˆ’1 can be inferred from 𝐀𝐱≀𝐛

Generalizations

Generalized Farkas' lemmaβ€” Let π€βˆˆβ„mΓ—n, π›βˆˆβ„m, 𝐒 is a closed convex cone in ℝn, and the dual cone of 𝐒 is π’βˆ—={π³βˆˆβ„n∣𝐳⊀𝐱β‰₯0,βˆ€π±βˆˆπ’}. If convex cone C(𝐀)={π€π±βˆ£π±βˆˆπ’} is closed, then exactly one of the following two statements is true:

  1. There exists an π±βˆˆβ„n such that 𝐀𝐱=𝐛 and π±βˆˆπ’.
  2. There exists a π²βˆˆβ„m such that π€βŠ€π²βˆˆπ’βˆ— and π›βŠ€π²<0.

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 ℝ+n, hence the closedness condition holds automatically. Indeed, for polyhedral convex cone, i.e., there exists a πβˆˆβ„nΓ—k such that 𝐒={ππ±βˆ£π±βˆˆβ„+k}, 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 cone C(𝐀).

By setting 𝐒=ℝn and π’βˆ—={0} in generalized Farkas' lemma, we obtain the following corollary about the solvability for a finite system of linear equalities:

Corollary (Fredholm alternative)β€” Let π€βˆˆβ„mΓ—n and π›βˆˆβ„m. Then exactly one of the following two statements is true:

  1. There exists an π±βˆˆβ„n such that 𝐀𝐱=𝐛.
  2. There exists a π²βˆˆβ„m such that π€βŠ€π²=0 and π›βŠ€π²β‰ 0.

Further implications

Farkas' lemma can be varied to many further theorems of alternative by simple modifications, such as Gordan's theorem: Either 𝐀𝐱<0 has a solution x, or π€βŠ€π²=0 has a nonzero solution y with y β‰₯ 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.

This is used for Dill's Reluplex method for verifying deep neural networks.

See also