Linear Programming in 2D 1 Linear Programming geometric problem formulation problem specification 2 Incremental 2D Linear Programming adding constraints one by one algorithm for 2D bounded LP MCS 481 Lecture 10 Computational Geometry Jan Verschelde, 8 February 2019 Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 1 / 21
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Linear Programming in 2D
1 Linear Programminggeometric problem formulationproblem specification
2 Incremental 2D Linear Programmingadding constraints one by onealgorithm for 2D bounded LP
MCS 481 Lecture 10Computational Geometry
Jan Verschelde, 8 February 2019
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 1 / 21
Linear Programming in 2D
1 Linear Programminggeometric problem formulationproblem specification
2 Incremental 2D Linear Programmingadding constraints one by onealgorithm for 2D bounded LP
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 2 / 21
linear programming in d variables
In standard form, a linear programming problem is given by1 an objective function in d variables, and2 a finite number n of contraints.
For all half planes a1x1 + a2x2 ≤ b, with b = max(x1,x2)∈P
a1x1 + a2x2.
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 5 / 21
Linear Programming in 2D
1 Linear Programminggeometric problem formulationproblem specification
2 Incremental 2D Linear Programmingadding constraints one by onealgorithm for 2D bounded LP
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 6 / 21
problem specification
On input are1 the coefficients (c1, c2, . . . , cd) of the objective function, and2 a tuple H of n half planes H = (h1,h2, . . . ,hn), given by
I outward pointing normal vectors (ai,1,ai,2, . . . ,ai,d ), andI corresponding bounds bi , for i = 1,2, . . . ,n.
Let P =n⋂
i=1
hi , the polyhedron defined by all half planes.
The output is the point (x1, x2, . . . , xn) ∈ P at whichthe objective function c1x1 + c2x2 + · · ·+ cdxd is maximized.
Questions:1 Does this problem always have a solution?2 Is the solution unique?
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 7 / 21
four cases
Answering the questions1 Does this problem always have a solution?2 Is the solution unique?
leads to the following case analysis:1 The solution is unique.2 The problem is infeasible if P = ∅.3 The problem is unbounded if the optimal value is∞.4 The solution is not unique if the coefficient vector of the objective
is parallel to one of the outward pointing normal vectors of P.
Exercise 1: If the coefficient vector of the objective is parallel to one ofthe outer normals of P, then the solution is not unique. Does theopposite direction hold as well? Can you prove the if and only if?Otherwise make a drawing why such a proof is not possible.
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 8 / 21
making problems bounded with unique solution
To make the problem bounded, we can impose restrictions as follows.
Let M be some large enough number.
For a given objective (c1, c2, . . . , cd), add the constraints:
mi =
{xi ≤ M, if ci > 0,−xi ≤ M, if ci ≤ 0,
for i = 1,2, . . . ,d .
Then m1 ∩m2 ∩ · · · ∩md is an orthogonal wedge.
In case the solution is not unique,then we choose the lexicographically smallest solution as the solution.
Any feasible program has thus a unique bounded solution,which is a vertex of P, called the optimal vertex.
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 9 / 21
Linear Programming in 2D
1 Linear Programminggeometric problem formulationproblem specification
2 Incremental 2D Linear Programmingadding constraints one by onealgorithm for 2D bounded LP
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 10 / 21
adding constraints one by one
Let H = (h1,h2, . . . ,hn) be the tuple of half planes,with the added constraints m1 and m2.
Consider Pi as the region defined by1 m1 and m2, the added constraints, and2 the first i half planes of the tuple H.
Formally, for i = 0,1, . . . ,n:
Pi = m1 ∩m2 ∩ h1 ∩ h2 ∩ · · · ∩ hi .
The regions are getting smaller as we add more constraints:
P0 ⊇ P1 ⊇ P2 ⊇ · · · ⊇ Pn = P.
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 11 / 21
updating the optimal vertex
For i = 0,1, . . . ,n: the region Pi =i⋂
j=1
hi ∩m1 ∩m2,
has the optimal vertex vi with coordinates (xi,1, xi,2):c1xi,1 + c2xi,2 = max
(x1,x2)∈Pi
c1x1 + c2x2.
Lemma (update the optimal vertex)Consider adding hi to Pi−1 with current optimal vertex vi−1.
1 If vi−1 ∈ hi , then vi = vi−1.2 If vi−1 6∈ hi , then either Pi = ∅ or vi ∈ `, the line bounding hi .
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 12 / 21
two cases illustrated
We start with four half planes and the optimal vertex v4.1 Adding h5 does not change the optimal vertex, v5 = v4.2 Adding h6 changes the optimal vertex, v6 6= v5.
v4
(c1, c2)
P4
h5
v5
(c1, c2)
P5
h5
h6
v6
(c1, c2)
P6
Observe that v6 lies on the line of the half plane h6.
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 13 / 21
proof of the first case
1 If vi−1 ∈ hi , then vi = vi−1.
v4
(c1, c2)
P4
h5
v5
(c1, c2)
P5
If vi−1 ∈ hi , then vi−1 is the optimal vertex over Pi , as Pi ⊆ Pi−1,the maximum cannot increase over a smaller set, so vi = vi−1.
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 14 / 21
proof of the second case
2 If vi−1 6∈ hi , then either Pi = ∅ or vi ∈ `, the line bounding hi .
h5
v5
(c1, c2)
P5
h5
h6
v6
(c1, c2)
P6
If Pi = ∅, then we are done. Assume Pi 6= ∅.
Assume v6 6∈ `, we will derive a contradiction.
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 15 / 21
looking for a contradiction
Assume v6 6∈ `, we will derive a contradiction.Consider the line segment (vi−1, vi).
v5
h5
h6
v6
P6
(vi−1, vi) ∈ Pi−1, as Pi ⊆ Pi−1
As the objective is linear,moving from vi to vi−1 increasesthe objective monotonically.
Consider q ∈ (vi−1, vi) ∩ `.q exists because vi−1 6∈ hi
and vi ∈ Pi .As the objective is monotoneincreasing from vi to vi−1,its value at q is higher than at vi .
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 16 / 21
Linear Programming in 2D
1 Linear Programminggeometric problem formulationproblem specification
2 Incremental 2D Linear Programmingadding constraints one by onealgorithm for 2D bounded LP
Computational Geometry (MCS 481) Linear Programming in 2D L-10 8 February 2019 17 / 21
linear programming in one dimensionIf vi−1 6∈ hi and Pi 6= ∅, then vi ∈ `, the line bounding hi .How to compute vi?
The line ` has equation ai,1x1 + ai,2x2 = bi ,we eliminate x2: x2 = (bi − ai,1x1)/ai,2.