Quadratic programming
Quadratic programming (QP) is a special type of mathematical optimization problem. It is the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.
The quadratic programming problem can be formulated as:[1]
Assume x belongs to space. The n×n matrix Q is symmetric, and c is any n×1 vector.
Minimize (with respect to x)
Subject to one or more constraints of the form:
- (inequality constraint)
- (equality constraint)
where indicates the vector transpose of . The notation means that every entry of the vector Ax is less than or equal to the corresponding entry of the vector .
If the matrix is positive semidefinite matrix, then is a convex function: In this case the quadratic program has a global minimizer if there exists some feasible vector x (satisfying the constraints) and if is bounded below on the feasible region. If the matrix Q is positive definite and the problem has a feasible solution, then the global minimizer is unique.
If is zero, then the problem becomes a linear program.
A related programming problem, quadratically constrained quadratic programming, can be posed by adding quadratic constraints on the variables.
Solution methods
If there are only equality constraints, then the QP can be solved by a linear system. Otherwise, a variety of methods for solving the QP are commonly used, including
Convex quadratic programming is a special case of the more general field of convex optimization.
Lagrangian duality
The Lagrangian dual of a QP is also a QP. To see that let us focus on the case where and Q is positive definite. We write the Lagrangian function as
Defining the (Lagrangian) dual function , defined as , we find an infimum of , using :
- , hence the dual function is
hence the Lagrangian dual of the QP is
maximize:
subject to: .
Besides the Lagrangian duality theory, there are other duality pairings (e.g. Wolfe, etc.).
Complexity
For positive definite Q, the ellipsoid method solves the problem in polynomial time.[4] If, on the other hand, Q is indefinite, then the problem is NP-hard.[5] In fact, even if Q has only one negative eigenvalue, the problem is NP-hard.[6]
Solvers and scripting (programming) languages
Free open-source permissive licenses:
Name | License | Brief info |
---|---|---|
OpenOpt | BSD | Universal cross-platform numerical optimization framework, see its QP page and other problems involved. Uses NumPy arrays and SciPy sparse matrices. |
qp-numpy | BSD | Built around the qld code written by K.Schittkowski of the University of Bayreuth, Germany |
Free open-source copyleft (reciprocal) licenses:
Name | License | Brief info |
---|---|---|
CVXOPT | GPL | General purpose convex optimization solver written in Python |
Name | Brief info |
---|---|
AIMMS | |
AMPL | |
CPLEX | Popular solver with an API for several programming languages |
EXCEL Solver Function | |
GAMS | |
Gurobi | |
Lingo | |
MATLAB | A general-purpose and matrix-oriented programming-language for numerical computing. Quadratic programming in MATLAB requires the Optimization Toolbox in addition to the base MATLAB product |
Mathematica | A general-purpose programming-language for mathematics, including symbolic and numerical capabilities. |
MOSEK | A solver for large scale optimization with API for several languages (C++,java,.net, Matlab and python) |
OptimJ | Free Java-based Modeling Language for Optimization supporting multiple target solvers and available as an Eclipse plugin[7][8] |
Solver Foundation | A .NET platform for modeling, scheduling, and optimization |
TOMLAB | |
Xpress |
References
Notes
- ^ Nocedal, Jorge; Wright, Stephen J. (2006). Numerical Optimization (2nd ed.). Berlin, New York: Springer-Verlag. p. 449. ISBN 978-0-387-30303-1..
- ^ Murty, K. G. (1988). Linear complementarity, linear and nonlinear programming. Sigma Series in Applied Mathematics. Vol. 3. Berlin: Heldermann Verlag. pp. xlviii+629 pp. ISBN 3-88538-403-5. (Available for download at the website of Professor Katta G. Murty.) MR949214
- ^ Murty, K. G. (1988). Linear complementarity, linear and nonlinear programming. Sigma Series in Applied Mathematics. Vol. 3. Berlin: Heldermann Verlag. pp. xlviii+629 pp. ISBN 3-88538-403-5. (Available for download at the website of Professor Katta G. Murty.) MR949214
- ^ Kozlov, M. K. (1979). Doklady Akademii Nauk SSSR. 248: 1049–1051.
{{cite journal}}
: Missing or empty|title=
(help); Unknown parameter|coauthors=
ignored (|author=
suggested) (help); Unknown parameter|trans_title=
ignored (|trans-title=
suggested) (help) Translated in: Soviet Mathematics - Doklady. 20: 1108–1111.{{cite journal}}
: Missing or empty|title=
(help) - ^ Sahni, S. "Computationally related problems," in SIAM Journal on Computing, 3, 262--279, 1974.
- ^ Quadratic programming with one negative eigenvalue is NP-hard, Panos M. Pardalos and Stephen A. Vavasis in Journal of Global Optimization, Volume 1, Number 1, 1991, pg.15-22.
- ^ http://www.in-ter-trans.eu/resources/Zesch_Hellingrath_2010_Integrated+Production-Distribution+Planning.pdf OptimJ used in an optimization model for mixed-model assembly lines, University of Münster
- ^ http://www.aaai.org/ocs/index.php/AAAI/AAAI10/paper/viewFile/1769/2076 OptimJ used in an Approximate Subgame-Perfect Equilibrium Computation Technique for Repeated Games
Bibliography
- Cottle, Richard W.; Pang, Jong-Shi; Stone, Richard E. (1992). The linear complementarity problem. Computer Science and Scientific Computing. Boston, MA: Academic Press, Inc. pp. xxiv+762 pp. ISBN 0-12-192350-9. MR1150683
- Garey, Michael R.; Johnson, David S. (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman. ISBN 0-7167-1045-5. A6: MP2, pg.245.
- Murty, K. G. (1988). Linear complementarity, linear and nonlinear programming. Sigma Series in Applied Mathematics. Vol. 3. Berlin: Heldermann Verlag. pp. xlviii+629 pp. ISBN 3-88538-403-5. (Available for download at the website of Professor Katta G. Murty.) MR949214
See also
- Linear programming
- Support vector machine
- Sequential quadratic programming
- Quadratically constrained quadratic programming