my-server
← Wiki

Quadratic programming

Quadratic programming (QP) is the process of solving certain mathematical optimization problems involving quadratic functions. Specifically, one seeks to optimize (minimize or maximize) a multivariate quadratic function subject to linear constraints on the variables. Quadratic programming is a type of nonlinear programming.

"Programming" in this context refers to a formal procedure for solving mathematical problems. This usage dates to the 1940s and is not specifically tied to the more recent notion of "computer programming." To avoid confusion, some practitioners prefer the term "optimization" — e.g., "quadratic optimization."

Problem formulation

The quadratic programming problem with variables and constraints can be formulated as follows. Given:

  • a real-valued, -dimensional vector ,
  • an -dimensional real symmetric matrix ,
  • an -dimensional real matrix , and
  • an -dimensional real vector ,

the objective of quadratic programming is to find an -dimensional vector , that will

where denotes the vector transpose of , and the notation means that every entry of the vector is less than or equal to the corresponding entry of the vector (component-wise inequality).

Constrained least squares

As a special case when is symmetric positive-definite, the cost function reduces to least squares:

where follows from the Cholesky decomposition of and . Conversely, any such constrained least squares program can be equivalently framed as a quadratic programming problem, even for a generic non-square matrix.

Generalizations

When minimizing a function in the neighborhood of some reference point , is set to its Hessian matrix and is set to its gradient . A related programming problem, quadratically constrained quadratic programming, can be posed by adding quadratic constraints on the variables.

Solution methods

For general problems a variety of methods are commonly used, including

*interior point,
*active set,
*augmented Lagrangian,
*conjugate gradient,
*gradient projection,
*extensions of the simplex algorithm.

In the case in which is positive definite, the problem is a special case of the more general field of convex optimization.

Equality constraints

Quadratic programming is particularly simple when is positive definite and there are only equality constraints; specifically, the solution process is linear. By using Lagrange multipliers and seeking the extremum of the Lagrangian, it may be readily shown that the solution to the equality constrained problem

is given by the linear system

where is a set of Lagrange multipliers which come out of the solution alongside .

The easiest means of approaching this system is direct solution (for example, LU factorization), which for small problems is very practical. For large problems, the system poses some unusual difficulties, most notably that the problem is never positive definite (even if is), making it potentially very difficult to find a good numeric approach, and there are many approaches to choose from dependent on the problem.

If the constraints don't couple the variables too tightly, a relatively simple attack is to change the variables so that constraints are unconditionally satisfied. For example, suppose (generalizing to nonzero is straightforward). Looking at the constraint equations:

introduce a new variable defined by

where has dimension of minus the number of constraints. Then

and if is chosen so that the constraint equation will be always satisfied. Finding such entails finding the null space of , which is more or less simple depending on the structure of . Substituting into the quadratic form gives an unconstrained minimization problem:

the solution of which is given by:

Under certain conditions on , the reduced matrix will be positive definite. It is possible to write a variation on the conjugate gradient method which avoids the explicit calculation of .

Lagrangian duality

The Lagrangian dual of a quadratic programming problem is also a quadratic programming problem. To see this let us focus on the case where and is positive definite. We write the Lagrangian function as

Defining the (Lagrangian) dual function as , we find an infimum of , using and positive-definiteness of :

Hence the dual function is

and so the Lagrangian dual of the quadratic programming problem is

Besides the Lagrangian duality theory, there are other duality pairings (e.g. Wolfe, etc.).

Run-time complexity

Convex quadratic programming

For positive definite , the minization problem is convex. Hence, the ellipsoid method can be used to solve the problem in (weakly) polynomial time. This was explicitly shown in 1979 by Kozlov, Tarasov and Khachiyan.

Ye and Tse present a polynomial-time algorithm, which extends Karmarkar's algorithm from linear programming to convex quadratic programming. On a system with n variables and L input bits, their algorithm requires O(L n) iterations, each of which can be done using O(L n<sup>3</sup>) arithmetic operations, for a total runtime complexity of O(L<sup>2</sup> n<sup>4</sup>).

Kapoor and Vaidya present another algorithm, which requires O(L * log L * n<sup>3.67</sup> * log n) arithmetic operations.

Non-convex quadratic programming

When is not positive-definite (so the problem is non-convex), quadratic programming is NP-hard. One way to prove it is using the Motzkin-Straus theorem. It states that, for any undirected graph G, a certain quadratic program associated with G has a maximum that is function of the clique number of G. Computing the clique number of a graph is a well-known NP-hard problem; hence, solving the quadratic program is NP-hard too. Some important special cases are also NP-hard:

  • Sahni proved NP-hardness for the case that Q is negative-definite (has n negative eigenvalues);
  • Pardalos and Vavasis proved (strong) NP-hardness whenever Q has at least one negative eigenvalue. They do this by showing a reduction from the Clique problem to a particular quadratic program with varialbes w, x<sub>1</sub>...x<sub>n</sub>, y<sub>1,2</sub>...y<sub>(n-1),n</sub>, z and objective function z-w<sup>2</sup>. They prove that the input graph has a clique of size k, if and only if the corresponding quadratic program has a solution with value 0.

Moreover, finding a KKT point of a non-convex quadratic program is CLS-hard.

Mixed-integer quadratic programming

There are some situations where one or more elements of the vector will need to take on integer values. This leads to the formulation of a mixed-integer quadratic programming (MIQP) problem. Applications of MIQP include water resources and the construction of index funds.

Solvers and scripting (programming) languages

Extensions

Polynomial optimization is a more general framework, in which the constraints can be polynomial functions of any degree, not only 2.

See also

References

Further reading

  • A6: MP2, pg.245.

External links