Farkas' lemma

From HandWiki
Revision as of 18:50, 6 February 2024 by Rtexter1 (talk | contribs) (simplify)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Solvability theorem for finite systems of linear inequalities

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.[1] 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.[2] 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.[3]

Generalizations of the Farkas' lemma are about the solvability theorem for convex inequalities,[4] 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.[5]

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).[6]

Farkas' lemma —  Let [math]\displaystyle{ \mathbf{A} \in \R^{m\times n} }[/math] and [math]\displaystyle{ \mathbf{b} \in \R^m. }[/math] Then exactly one of the following two assertions is true:

  1. There exists an [math]\displaystyle{ \mathbf{x} \in \R^n }[/math] such that [math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] and [math]\displaystyle{ \mathbf{x} \geq 0. }[/math]
  2. There exists a [math]\displaystyle{ \mathbf{y} \in \R^m }[/math] such that [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} \geq 0 }[/math] and [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0. }[/math]

Here, the notation [math]\displaystyle{ \mathbf{x} \geq 0 }[/math] means that all components of the vector [math]\displaystyle{ \mathbf{x} }[/math] are nonnegative.

Example

Let m, n = 2, [math]\displaystyle{ \mathbf{A} = \begin{bmatrix}6 & 4 \\3 & 0\end{bmatrix}, }[/math] and [math]\displaystyle{ \mathbf{b} = \begin{bmatrix}b_1 \\b_2\end{bmatrix}. }[/math] 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:

  • If b2 ≥ 0 and b1 − 2b2 ≥ 0, then option 1 is true, since the solution of the linear equations is [math]\displaystyle{ x_1 = \tfrac{b_2}{3} }[/math] and [math]\displaystyle{ x_2 = \tfrac{b_1 - 2b_2}{4}. }[/math] Option 2 is false, since [math]\displaystyle{ b_1 y_1 + b_2 y_2 \ge b_2 (2y_1 + y_2) = b_2 \frac{6y_1 + 3y_2}{3}, }[/math] 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 b2 < 0, then we can take e.g. y1 = 0 and y2 = 1.
    • If b1 − 2b2 < 0, then, for some number B > 0, b1 = 2b2B, so: [math]\displaystyle{ b_1 y_1 + b_2 y_2 = 2b_2 y_1 + b_2 y_2 - By_1 = b_2 \frac{6y_1 + 3y_2}{3} - By_1. }[/math] Thus we can take, for example, y1 = 1, y2 = −2.

Geometric interpretation

Consider the closed convex cone [math]\displaystyle{ C(\mathbf{A}) }[/math] spanned by the columns of A; that is,

[math]\displaystyle{ C(\mathbf{A}) = \{\mathbf{A}\mathbf{x} \mid \mathbf{x} \geq 0 \}. }[/math]

Observe that [math]\displaystyle{ C(\mathbf{A}) }[/math] 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 [math]\displaystyle{ C(\mathbf{A}). }[/math] The lemma follows from the observation that b belongs to [math]\displaystyle{ C(\mathbf{A}) }[/math] if and only if there is no hyperplane that separates it from [math]\displaystyle{ C(\mathbf{A}). }[/math]

More precisely, let [math]\displaystyle{ \mathbf{a}_1, \dots, \mathbf{a}_n \in \R^m }[/math] 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 [math]\displaystyle{ x_1, \dots, x_n \in \R }[/math] such that [math]\displaystyle{ \mathbf{b} =x _1 \mathbf{a}_1 + \dots + x_n \mathbf{a}_n. }[/math]
  2. There exists a vector [math]\displaystyle{ \mathbf{y} \in \R^m }[/math] such that [math]\displaystyle{ \mathbf{a}_i^\top \mathbf{y} \geq 0 }[/math] for [math]\displaystyle{ i = 1, \dots, n, }[/math] and [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0. }[/math]

The sums [math]\displaystyle{ x_1 \mathbf{a}_1 + \dots + x_n \mathbf{a}_n }[/math] with nonnegative coefficients [math]\displaystyle{ x_1, \dots, x_n }[/math] form the cone spanned by the columns of A. Therefore, the first statement tells that b belongs to [math]\displaystyle{ C(\mathbf{A}). }[/math]

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 [math]\displaystyle{ \mathbf{a}_1, \dots, \mathbf{a}_n }[/math] 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 [math]\displaystyle{ \mathbf{Ax} \le \mathbf{b} }[/math] is unsolvable then [math]\displaystyle{ \mathbf{y}^\top \mathbf{A} = 0, }[/math] [math]\displaystyle{ \mathbf{y}^\top \mathbf{b} = -1, }[/math] [math]\displaystyle{ \mathbf{y} \ge 0 }[/math] has a solution.[7] Note that [math]\displaystyle{ \mathbf{y}^\top \mathbf{A} }[/math] is a combination of the left-hand sides, [math]\displaystyle{ \mathbf{y}^\top \mathbf{b} }[/math] 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: [math]\displaystyle{ \mathbf{Ax} \le \mathbf{b} }[/math] 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.[8]: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 [math]\displaystyle{ NP \cap coNP }[/math] are also called well-characterized problems. It is a long-standing open question whether [math]\displaystyle{ NP \cap coNP }[/math] 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.[9](p25)

Variants

The Farkas Lemma has several variants with different sign constraints (the first one is the original version):[8]:92

  • Either [math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] has a solution [math]\displaystyle{ \mathbf{x} \geq 0, }[/math] or [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} \geq 0 }[/math] has a solution [math]\displaystyle{ \mathbf{y} \in \R^m }[/math] with [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0. }[/math]
  • Either [math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math] has a solution [math]\displaystyle{ \mathbf{x} \geq 0, }[/math] or [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} \geq 0 }[/math] has a solution [math]\displaystyle{ \mathbf{y} \geq 0 }[/math] with [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0 }[/math]
  • Either [math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math] has a solution [math]\displaystyle{ \mathbf{x} \in \R^n, }[/math] or [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} = 0 }[/math] has a solution [math]\displaystyle{ \mathbf{y} \geq 0 }[/math] with [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0 }[/math].
  • Either [math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] has a solution [math]\displaystyle{ \mathbf{x} \in \R^n, }[/math] or [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} = 0 }[/math] has a solution [math]\displaystyle{ \mathbf{y} \in \R^m }[/math] with [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \neq 0. }[/math]

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.[9](pp12--14) For systems of equations, the lemma is simple:

  • Assume that A and b have rational coefficients. Then either [math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] has an integral solution [math]\displaystyle{ \mathbf{x} \in \Z^n, }[/math]or there exists [math]\displaystyle{ \mathbf{y} \in \R^n }[/math]such that [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} }[/math] is integral and [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} }[/math] is not integral.

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

  1. Given inequalities [math]\displaystyle{ a_1^T x \leq b_1,\ldots , a_m^T x \leq b_m }[/math] and coefficients [math]\displaystyle{ w_1,\ldots,w_m }[/math], infer the inequality [math]\displaystyle{ \left(\sum_{i=1}^m w_i a_i^T\right) x \leq \sum_{i=1}^m w_i b_i }[/math].
  2. Given an inequality [math]\displaystyle{ a_1 x_1 + \cdots + a_m x_m \leq b }[/math], infer the inequality [math]\displaystyle{ \lfloor a_1\rfloor x_1 + \cdots + \lfloor a_m \rfloor x_m \leq \lfloor b \rfloor }[/math].

The lemma says that:

  • Assume that A and b have rational coefficients. Then either [math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math] has an integral solution [math]\displaystyle{ \mathbf{x} \in \Z^n, x\geq 0 }[/math], or it is possible to infer from [math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math] using finitely many applications of inference rules 1,2 the inequality [math]\displaystyle{ 0^T x \leq -1 }[/math].

The variants are summarized in the table below.

System Constraints on x Alternative system Constraints on y
[math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] [math]\displaystyle{ \mathbf{x} \in \R^n, x\geq 0 }[/math] [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} \geq 0 }[/math], [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0 }[/math] [math]\displaystyle{ \mathbf{y} \in \R^m }[/math]
[math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math] [math]\displaystyle{ \mathbf{x} \in \R^n, x\geq 0 }[/math] [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} \geq 0 }[/math], [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0 }[/math] [math]\displaystyle{ \mathbf{y} \in \R^m }[/math], [math]\displaystyle{ \mathbf{y} \geq 0 }[/math]
[math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math] [math]\displaystyle{ \mathbf{x} \in \R^n }[/math] [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} = 0 }[/math], [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0 }[/math] [math]\displaystyle{ \mathbf{y} \in \R^m }[/math], [math]\displaystyle{ \mathbf{y} \geq 0 }[/math]
[math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] [math]\displaystyle{ \mathbf{x} \in \R^n }[/math] [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} = 0 }[/math], [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \neq 0 }[/math] [math]\displaystyle{ \mathbf{y} \in \R^m }[/math]
[math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] [math]\displaystyle{ \mathbf{x} \in \Z^n }[/math] [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} }[/math] integral, [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} }[/math] not integral [math]\displaystyle{ \mathbf{y} \in \R^n }[/math]
[math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math] [math]\displaystyle{ \mathbf{x} \in \Z^n, x\geq 0 }[/math] [math]\displaystyle{ 0^T x \leq -1 }[/math] can be inferred from [math]\displaystyle{ \mathbf{Ax} \leq \mathbf{b} }[/math]

Generalizations

Generalized Farkas' lemma —  Let [math]\displaystyle{ \mathbf{A} \in \R^{m \times n}, }[/math] [math]\displaystyle{ \mathbf{b} \in \R^m, }[/math] [math]\displaystyle{ \mathbf{S} }[/math] is a closed convex cone in [math]\displaystyle{ \R^n, }[/math] and the dual cone of [math]\displaystyle{ \mathbf{S} }[/math] is [math]\displaystyle{ \mathbf{S}^* = \{ \mathbf{z} \in \R^n \mid \mathbf{z}^\top \mathbf{x} \geq 0, \forall \mathbf{x} \in \mathbf{S} \}. }[/math] If convex cone [math]\displaystyle{ C(\mathbf{A}) = \{\mathbf{A}\mathbf{x} \mid \mathbf{x} \in \mathbf{S} \} }[/math] is closed, then exactly one of the following two statements is true:

  1. There exists an [math]\displaystyle{ \mathbf{x} \in \R^n }[/math] such that [math]\displaystyle{ \mathbf{Ax} = \mathbf{b} }[/math] and [math]\displaystyle{ \mathbf{x} \in \mathbf{S}. }[/math]
  2. There exists a [math]\displaystyle{ \mathbf{y} \in \R^m }[/math] such that [math]\displaystyle{ \mathbf{A}^\top \mathbf{y} \in \mathbf{S}^* }[/math] and [math]\displaystyle{ \mathbf{b}^\top \mathbf{y} \lt 0. }[/math]

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, [math]\displaystyle{ \mathbf{S} }[/math] is the nonnegative orthant [math]\displaystyle{ \R_+^n, }[/math] hence the closedness condition holds automatically. Indeed, for polyhedral convex cone, i.e., there exists a [math]\displaystyle{ \mathbf{B} \in \R^{n \times k} }[/math] such that [math]\displaystyle{ \mathbf{S} = \{\mathbf{B}\mathbf{x} \mid \mathbf{x} \in \R_+^k \} , }[/math] 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 [math]\displaystyle{ C(\mathbf{A}). }[/math]

By setting [math]\displaystyle{ \mathbf{S} = \R^n }[/math] and [math]\displaystyle{ \mathbf{S}^* = \{0\} }[/math] in generalized Farkas' lemma, we obtain the following corollary about the solvability for a finite system of linear equalities:

Corollary —  Let [math]\displaystyle{ \mathbf{A} \in \R^{m \times n} }[/math] and [math]\displaystyle{ \mathbf{b} \in \R^m. }[/math] Then exactly one of the following two statements is true:

  1. There exists an [math]\displaystyle{ \mathbf{x} \in \R^n }[/math] such that [math]\displaystyle{ \mathbf{Ax} = \mathbf{b}. }[/math]
  2. There exists a [math]\displaystyle{ \mathbf{y} \in \R^m }[/math] such that [math]\displaystyle{ \mathbf{A}^\top\mathbf{y} = 0 }[/math] and [math]\displaystyle{ \mathbf{b}^\top\mathbf{y} \neq 0. }[/math]

Further implications

Farkas's lemma can be varied to many further theorems of alternative by simple modifications,[5] such as Gordan's theorem: Either [math]\displaystyle{ \mathbf{Ax} \lt 0 }[/math] has a solution x, or [math]\displaystyle{ \mathbf{A}^\top \mathbf{y} = 0 }[/math] 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.

See also

Notes

  1. Farkas, Julius (Gyula) (1902), "Theorie der Einfachen Ungleichungen", Journal für die reine und angewandte Mathematik 1902 (124): 1–27, doi:10.1515/crll.1902.124.1, http://gdz.sub.uni-goettingen.de/en/dms/load/img/?PPN=PPN243919689_0124&DMDID=dmdlog4 
  2. Takayama, Akira (1985). Mathematical Economics (2nd ed.). New York: Cambridge University Press. p. 48. ISBN 0-521-31498-4. https://archive.org/details/mathematicalecon00taka. 
  3. Garg, Anupam; Mermin, N. D. (1984), "Farkas's Lemma and the Nature of Reality: Statistical Implications of Quantum Correlations", Foundations of Physics 14: 1–39, doi:10.1007/BF00741645, https://link.springer.com/article/10.1007%2FBF00741645 
  4. Dinh, N.; Jeyakumar, V. (2014), "Farkas' lemma three decades of generalizations for mathematical optimization", TOP 22 (1): 1–22, doi:10.1007/s11750-014-0319-y 
  5. 5.0 5.1 Border, KC (2013). "Alternative Linear Inequalities". https://healy.econ.ohio-state.edu/kcb/Notes/Alternative.pdf. 
  6. Gale, David; Kuhn, Harold; Tucker, Albert W. (1951), "Linear Programming and the Theory of Games - Chapter XII", in Koopmans, Activity Analysis of Production and Allocation, Wiley, http://cowles.econ.yale.edu/P/cm/m13/m13-19.pdf . See Lemma 1 on page 318.
  7. Boyd, Stephen P.; Vandenberghe, Lieven (2004), "Section 5.8.3", Convex Optimization, Cambridge University Press, ISBN 978-0-521-83378-3, https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf#page=275, retrieved October 15, 2011 .
  8. 8.0 8.1 Gärtner, Bernd; Matoušek, Jiří (2006). Understanding and Using Linear Programming. Berlin: Springer. ISBN 3-540-30697-8.  Pages 81–104.
  9. 9.0 9.1 Template:Cite Geometric Algorithms and Combinatorial Optimization

Further reading