Problemcore
Linear complementarity problem
Also called linear complementarity.
Given a matrix M and vector q, find z >= 0 with w = Mz + q >= 0 and z^T w = 0. Nash equilibria of bimatrix games are solutions of one.
The linear complementarity problem (LCP) asks: given an matrix and a vector , find such that and for every . Each index is a switch with two states: either and is free to be positive, or and is free to be positive. In rigid-body simulation, is the impulse (or force) at contact and is the velocity at which the two bodies separate there: a contact can push but not pull, it pushes only if the bodies stay together, and says how the impulses at all the contacts change all the velocities (rigid contact complementarity). Physics engines often solve it approximately with projected Gauss-Seidel, and pivoting methods such as Lemke's algorithm solve it exactly. The same problem describes the optimality conditions of linear and quadratic programs and the Nash equilibria of two-player games. The general problem is NP-complete; what is easy or hard depends on the class of .
In plain words
There are pairs of numbers. In each pair both numbers must be zero or positive, and at least one of them must be zero. The second number of each pair is a fixed linear function of all the first numbers: a matrix times them, plus a vector. Find the first numbers. If you knew which member of each pair is zero, a linear system would give the answer. So the problem is a choice among patterns, and the matrix decides whether there is one answer, many, or none, and how hard it is to find.
Definition
LCP. Input: and . Find with
Because and , the last condition is the same as for each . A vector with and is feasible; a feasible with is a solution. A short form is .
For each set the pattern " for and for " gives the linear system . A solution is a pattern whose system has a solution with and with the other entries of nonnegative. This gives a finite but exponential algorithm.
The class of decides the main properties.
| class of | definition | what it gives |
|---|---|---|
| positive definite | for (not necessarily symmetric) | a P-matrix: a unique solution for every ; polynomial time |
| P-matrix | every principal minor is positive | a unique solution for every , and P-matrices are exactly the matrices with this property; Lemke's method finds it |
| positive semidefinite | for all | if feasible, solvable; the solution set is convex; polynomial time by interior point methods |
| copositive-plus | for , and , imply | if feasible, solvable, and Lemke's method finds a solution or proves infeasibility |
| strictly copositive | for , (for example entrywise) | a solution for every ; Lemke's method finds one |
| copositive | for | no guarantee by itself; the LCP of a bimatrix game has such an |
| general | none | deciding whether a solution exists is NP-complete |
The statement that P-matrices are exactly the matrices for which LCP has a unique solution for every is a classical theorem of Samelson, Thrall and Wesler (1958).
Variants
- Mixed LCP. Some variables are free and some rows are equations, as in the KKT conditions with equality constraints, or in contact with bilateral joints. It reduces to the standard form by splitting free variables or by eliminating them when their block is nonsingular.
- Box-constrained LCP. Each lies in an interval , and has the sign that points into the box, or is 0 inside it. Physics engines use this form for friction with a bound proportional to the normal force.
- Nonlinear complementarity problem. for a nonlinear map .
- Variational inequality. Find in a convex set with for all ; the LCP is the case and .
- Search versus decision. For P-matrices and strictly copositive matrices a solution always exists, so the problem is a total search problem; for general the question is whether a solution exists.
Examples
- A block on the floor. One contact, unit mass, . If the block moves down at speed 2, and the solution is , : the floor gives an impulse of 2 and the block stops. If it moves up at speed 1, and the solution is , : no impulse.
- Two coupled contacts. , . The solution is with ; the worked pivots are on the Lemke's algorithm page.
- No solution. , : for all .
- Two solutions. , : , and , both work. is not a P-matrix, because its only principal minor is negative.
- Bimatrix games. For an game with positive payoff matrices and , the problem , on the best response polytopes is an LCP whose solutions other than , , with and scaled to sum 1, are the Nash equilibria; the Lemke-Howson algorithm solves it.
Known algorithms
- Enumeration of the patterns. Exact and exponential; useful as a reference for small .
- Lemke's algorithm (1965). A complementary pivoting method with an artificial variable. It solves P-matrix, strictly copositive and copositive-plus problems, the last with a proof of infeasibility when it ends on a ray. Exponential in the worst case (Murty 1978).
- Lemke-Howson algorithm (1964). The special case for bimatrix games, started from the artificial solution by dropping a label.
- Principal pivoting methods. Murty's least index method and the Cottle-Dantzig method work on P-matrices and some other classes, without an artificial variable.
- Iterative splitting methods. Projected Gauss-Seidel and projected SOR update one at a time and clip it at 0. They converge for symmetric positive definite , and they are the usual choice in real-time physics, with a fixed number of sweeps.
- Interior point methods. Polynomial time for positive semidefinite , where the LCP is a convex quadratic program.
- Newton-type methods. Semismooth Newton methods on a reformulation such as the Fischer-Burmeister function, with fast local convergence.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Lemke's algorithm | O(2^n n^3) worst | O(n^2) extra | deterministicexactofflineiterative | 1 language |
Bounds
- The general LCP is NP-complete: Chung (1989) showed that deciding whether a solution exists is NP-complete.
- The LCP of a bimatrix game always has a nontrivial solution, and finding one is PPAD-complete, because it is the problem of finding a Nash equilibrium of a two-player game (Nash equilibrium computation).
- For a P-matrix a solution always exists and is unique, and the problem is in the class CLS (Daskalakis and Papadimitriou, 2011); no polynomial-time algorithm is known.
- For positive semidefinite the LCP is solvable in polynomial time, by interior point or ellipsoid methods for convex quadratic programs.
- Complementary pivot methods take pivots on some LCPs of order (Murty 1978).
Reductions
- Linear programming to LCP. The pair of LPs subject to , and subject to , has optimal solutions , exactly when solves the LCP with and . This is complementary slackness, and is skew-symmetric, so it is positive semidefinite.
- Convex quadratic programming to LCP. The KKT conditions of subject to , , with positive semidefinite, are the LCP with , .
- Bimatrix games to LCP. The example above is LCP with , and . Because , the trivial solution is always there and gives no equilibrium; Lemke-Howson starts from it. The Lemke's algorithm page gives a different LCP with a positive and , on which Lemke's method with the all-ones covering vector always ends with an equilibrium.
- Extensive-form games to LCP. With the sequence form, an equilibrium of a two-player game tree with perfect recall is a solution of an LCP of size linear in the tree.
Applications
- Contact and friction in physics simulation. The impulses at the contacts of rigid bodies at each time step, with a linearized friction cone, solve an LCP (rigid contact complementarity). Cloth and particle contact give similar problems.
- Game theory. Equilibria of two-player games in strategic and in extensive form.
- Optimization. Linear and convex quadratic programs, through their optimality conditions.
- Economics and engineering. Market equilibrium models, traffic equilibrium, and the analysis of structures with unilateral supports and of circuits with ideal diodes.
References
- Richard W. Cottle, Jong-Shi Pang and Richard E. Stone, The Linear Complementarity Problem, the problem, its sources (quadratic programs, bimatrix games, contact problems), the matrix classes and the pivoting and iterative methods
- Sung-Jin Chung, NP-completeness of the linear complementarity problem, Journal of Optimization Theory and Applications 60(3) (1989), 393-399, deciding whether an LCP has a solution is NP-complete
- C. E. Lemke, Bimatrix equilibrium points and mathematical programming, Management Science 11(7) (1965), 681-689, the LCP of a bimatrix game and the complementary pivot method for the general LCP
- Noam Nisan, Tim Roughgarden, Éva Tardos and Vijay V. Vazirani (eds.), Algorithmic Game Theory, Cambridge University Press, 2007, Chapter 3 (Bernhard von Stengel), the equilibria of a bimatrix game as the solutions of an LCP
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag B708RE Edit this page History Report an error Markdown