Homepage of Boris Haase




Euclidean Geometry • Equitable Distributing • Linear Programming • Set Theory • Nonstandard Analysis • Representations • Topology • Transcendental Numbers • Number Theory • Calculation of Times  (Previous | Next)



Linear Programming

Linear Programming

In the following section, we solve linear programmes (LPs). The well-known simplex method is described, together with the polynomial normal method. Smale's 9th problem is demonstrated to be unsolvable. We may generalise the normal method to (non-) convex programmes (with vector-valued functions). The diameter theorem for polytopes is proven. It is shown that (mixed) integer LPs are polynomial.

Proof and algorithm: Let M := {x ∈ κn : Ax ≤ b, b ∈ κm, A ∈ κm×n, m, n ∈ κℕ*} be the feasible domain of the LP max {cTx : c ∈ κn, x ∈ M}. By taking the dual or setting x := x+ - x- with x+, x- ≥ 0, we obtain x ≥ 0. We first solve max {-z : Ax - b ≤ (z, , z)Tκm, z ≥ 0} to obtain a feasible x when b ≥ 0 does not hold. Initial and target value are z := |min {b1, ..., bm}| resp. z = 0 and we begin with x := 0 as in the first case. Pivoting if necessary, we may assume that b ≥ 0.

Let i, j, k ∈ κℕ* and let aiT the i-th row vector of A. If cj ≤ 0 for all j, the LP is solved. If for some cj > 0, aij ≤ 0 for all i, the LP is positively unbounded. Otherwise, we divide all aiTx ≤ bi by ||ai|| and all cj and aij by the minimum of |aij| such that aij ≠ 0 for each j. This will be reversed later. If necessary, renormalise by ||ai||. This yields good runtime performance even on strongly deformed polytopes.

In each step, we can remove multiple constraints and such with ai ≤ 0, since they are redundant (avoidable by adding an extra slack variable in each case). The second case is analogous. If in both cases bi = 0 and ai ≥ 0 for some i, then the LP has maximum 0 and solution x = 0 if b ≥ 0, otherwise it has no solutions. In each step, for each cj > 0 and non-base variable xj, we select the minimum ratio bk/akj for aij > 0.

The variables with * are considered in the next step. The next potential vertex is given by xj* = xj + bk/akj for feasible x*. To select the steepest edge, select the pivot akj corresponding to xj that maximises cT(x* - x)/||x* - x|| i.e. cj|cj|/(1 + Σ aij2) in the k-th constraint. If there are multiple maxima, select max cjbk/akj or alternatively the smallest angle min Σ cj*/||c*||, according to the rule of best pivot value.

If there are more than n values bi equal 0 and we cannot directly maximise the objective function, we relax (perturb) the constraints with bi = 0 by the same, minimal modulus. These do not need to be written into the tableau: We simply set bi = ||ai||. If another multiple vertex is encountered, despite this being unlikely, simply increase the earlier bi by ||ai||.

The cost of eliminating a multiple vertex, after which we revert the relaxation, corresponds to the cost of solving an LP with b = 0. The same task is potentially required at the end of the process when checking whether the LP admits any other solutions if at least two of the cj are 0. Along the chosen path, the objective function increases (effectively) strictly monotonically. We can then simply calculate cj*, aij* and bi* using the rectangle rule.

In the worst-case scenario, the simplex method is not strongly polynomial despite the diameter formula for polytopes (see below) under any given set of pivoting rules, since an exponential "drift" can be constructed with Klee-Minty or Jeroslow polytopes, or others, creating a large deviation from the shortest path by forcing the selection of the least favourable edge. This is consistent with existing proofs. The result follows.⃞

Theorem: The normal method solves the LP in O(mnh0/Δh) with Δh as the average loss of the height h assuming h0 := max(max(Σ xj)/√n, max(Σ yi)/√m), if possible.

Proof and algorithm: We compute the LP min {h ∈ κ≥0 : ±(cTx - bTy) ≤ h, 0 ≤ x ∈ κn, 0 ≤ y ∈ κm, Ax - b ≤ (h, , h)Tκm, c - ATy ≤ (h, , h)Tκn} via the (dual) programme min {bTy : 0 ≤ y ∈ κm, ATy ≥ c} for the (primal) programme max {cTx : c ∈ κn, x ∈ M≥0}. Initial and target value of the height h are |min {b1, ..., bm, -c1, , -cn}| resp. 0. To obtain h* as h0 from h, we normalise ±(cTx - bTy) ≤ h, Ax ≤ b and ATy ≥ c. Let v := (xT, yT)Tκm+n.

We begin with v := 0 and successively define a few times all vk* := (max vk + min vk)/2. Then, we solve the two-dimensional LPs min hk in hk, vkκ≥0. We compute a favourable direction d ∈ κm+n with dk := Δvk Δhk/min Δhk. Thereafter, we solve the two-dimensional LP min h in h, w ∈ κ≥0 with v* := v + wd. We always continue with the v* that belongs to the smallest h resp. hk reached so far. We solve the two-dimensional LPs via bisection method.

We basically may extrapolate h und v in O(m + n). When we cannot leave v, we relax all constraints except v ≥ 0 a bit and undo that at the end of one step of an iteration in O(mn). We compute bk = akTx/√n = -max(Σ xj)/√n reaching its minimum for ak = -(1, ..., 1)T. An analogous computation for y yields h0 as stated above. Beginning with v ≠ 0 is mutatis mutandis possible. By the strong duality theorem, the claim follows.⃞

Corollary: Every linear system (LS) of equations Ax = b with x ∈ κn may be solved in O(mnh0/Δh), provided that a solution exists, where ai ≠ 0 must hold for bi ≠ 0 and x = 0 solves the case b = 0.

Proof: We write Ax = b as Ax ≤ b and -Ax ≤ -b where x = x+ - x- with x+, x- ≥ 0 and solve min h with h ∈ κ≥0 and Ax - b ≤ (h, , h)Tκm, -Ax + b ≤ (h, , h)T plus h0 := max |bi|/||ai||.⃞

Remark: This is only really interesting for a small h0/Δh.

Theorem: Smale's 9th problem is unsolvable. Thus, there is no strongly polynomial algorithm to solve an LP or a system of linear inequalities (SLI).

Proof: We normalise and relax the SLI by (h, , h)Tκn with h ≥ 0 so that 0 ∈ κn solves it and min h is the corresponding LP. Let C be n-dimensional axes of coordinates (of equal length) inscribed in a polytope of the LP. We can linear often juxtapose this C along a "diagonal", changing its direction again and again, so that extrapolation is not possible, until the minimum for h = 0 is reached, if the LP can be solved.

The minimum hk of every iteration step is assumed always to be located above the centre of C and is computed for all axes of C in two-dimensional cuts. The length of the axes of C may change here. The linear factor k ∈ κℕ* is proportional to the extent of the polytope along the "diagonal" passed and hence dependent on the size of the input of the initial problem, even if we would align C always differently.⃞

Theorem: Every convex programme min {f1(x) : 0 ≤ x ∈ κn, (f2(x), , fm(x))T ≤ 0} where the fiκℝ are convex posynomials is strongly polynomial and may be solved by the normal method and Newton's method, which handles the fi, in O(ph0/Δh), assuming that it is solvable, where p ∈ κℕ* denotes the number of operands xj of the fi and the objective function f1 is linearised.

Proof: The claim follows from the existence of the normal method.⃞

Remarks: The normal method is numerically very stable, since the initial data are barely altered, and currently the fastest known worst-case LP-solving algorithm. It may also be applied to (mixed) integer problems and branch-and-bound, in particular for nonconvex optimisation. It can be better paralleled than the simplex method. It can easily be extended to convex programmes with vector-valued or other convex fi.

Diameter theorem for polytopes: The diameter of a n-dimensional polytope defined by m constraints with m, n ∈ κℕ* is at most max(2(m - n), 0).

Proof: Each vertex of a (potentially deformed) hypercube is formed by at most n hyperplanes. If we complete the polytope by adding or removing hyperplanes, the claim follows for the chosen path, since each step adds at most two additional edges. This theorem can be extended to polyhedra analogously by dropping the requirement of finiteness.⃞

Further thoughts: Gomory or Lenstra cuts can find an integer solution of the original problem in polynomial time if we additionally assume that a, b, and c are integers wlog and that m and n are fixed. By dualising, a full-dimensional LP may be obtained as described before within the normal method. This shows that the problem of (mixed) integer linear programming is not NP-complete:

Theorem: (Mixed) integer LPs may be solved in polynomial time.⃞

code of simplex method and data file example

© 2008-2017 by Boris Haase


Valid XHTML 1.0 • disclaimer • mail@boris-haase.de • pdf-version • bibliography • subjects • definitions • statistics • php-code • rss-feed • top