D1 5.2, D1 5.3 - Solving linear programs

D1 5.2, D1 5.3 - Solving linear programs

Draw the feasible region of a two-variable linear program, then optimise using vertices or a sliding objective line in D1 5.2. In D1 5.3, restrict the answer to feasible integer points when the context requires whole objects, and interpret the optimal plan with its units and unused resources.

Feasible regions

What if the most profitable point on a graph calls for 2.82.8 drums of one product and 3.63.6 of another? The graph can solve a continuous model exactly, but a whole-drum requirement changes which points we may choose. First we need to know which plans satisfy the restrictions at all.

The feasible region consists of points satisfying every constraint together. Draw each boundary as an equality, then test which side satisfies its inequality. For x+y≤8x+y\le8, the point (0,0)(0,0) gives 0≤80\le8, so choose the side containing the origin. If the test point lies on a boundary, choose a different point: equality cannot distinguish the two sides.

Nonnegativity x≥0,y≥0x\ge0,y\ge0 restricts us to the first quadrant, including its axes. Non-strict inequalities include the boundary lines; draw them solid. State your shading convention clearly. The diagram below colours the feasible region green; an exam diagram may instead shade excluded regions and leave the feasible region unshaded.

[DIAGRAM: asset_name: A two-variable feasible polygon; asset_slug: linear-feasible-region; caption: The green polygon includes its boundaries and satisfies every inequality.; description: First-quadrant feasible polygon for x+y at most8 and2x+y at most10, with vertices(0,0),(5,0),(2,6),(0,8), both sloping boundaries labelled and solid.]
The green polygon includes its boundaries and satisfies every inequality.

Worked example 1: finding the feasible polygon

Find the vertices of the region satisfying

x≥0,y≥0,x+y≤8,2x+y≤10.x\ge0,\quad y\ge0,\quad x+y\le8,\quad2x+y\le10.

Plan. Draw the boundary lines, identify the common permitted region, and solve where its edges meet.

The sloping boundaries have intercepts (8,0),(0,8)(8,0),(0,8) and (5,0),(0,10)(5,0),(0,10). Their intersection satisfies

x+y=82x+y=10x=2subtract the first equationy=6\begin{aligned} x+y&=8\\ 2x+y&=10\\ x&=2 &&\text{subtract the first equation}\\ y&=6 \end{aligned}

On the xx-axis the tighter limit is x≤5x\le5; on the yy-axis it is y≤8y\le8.

Answer. Vertices (0,0),(5,0),(2,6),(0,8)(0,0),(5,0),(2,6),(0,8), joined by the included boundaries shown.

Check. Each vertex satisfies all four inequalities. The tempting intercept (8,0)(8,0) fails 2x+y≤102x+y\le10, so it is not a feasible vertex.

Change only the second resource limit from 1010 to 1212. The permitted side remains the same, but the vertices move.

Worked example 2: a changed capacity

Find the vertices when the constraints are

x≥0,y≥0,x+y≤8,2x+y≤12.x\ge0,\quad y\ge0,\quad x+y\le8,\quad2x+y\le12.

Plan. Recalculate the changed axis intercept and the two-line intersection.

(2x+y)−(x+y)=12−8⇒x=4,y=4.(2x+y)-(x+y)=12-8\quad\Rightarrow\quad x=4,\quad y=4.

The xx-axis bound is now x≤6x\le6, while y≤8y\le8 remains the tighter yy-axis bound.

Answer. Vertices (0,0),(6,0),(4,4),(0,8)(0,0),(6,0),(4,4),(0,8).

Check. At (4,4)(4,4), x+y=8x+y=8 and 2x+y=122x+y=12. The original region is contained in this enlarged region, as expected when a capacity increases.

Watch out

A boundary intersection is a candidate vertex, not automatically a feasible one. Check every constraint, including the axes. Contradictory restrictions can give an empty feasible region; a region extending indefinitely is unbounded.

Use the equations, rather than a graph reading alone, when exact coordinates are needed.

Vertex and objective-line methods

A linear objective changes at a constant rate, so a straight-edged feasible region allows two equivalent optimisation methods.

For a nonempty bounded polygon, a maximum and minimum occur at vertices. Evaluate the objective at all its vertices and compare. If the objective is constant along an edge at the optimal value, every point on that edge is also optimal; the optimum need not be unique.

The ruler method, or objective-line method, uses the family

ax+by=k.ax+by=k.

For fixed a,ba,b, these lines are parallel as kk changes. Draw a convenient line, then slide a ruler parallel to it in the direction of increasing kk for a maximum, or decreasing kk for a minimum. The last feasible contact gives the optimum. Check the direction with a test point: moving away from the origin is not a universal rule when objective coefficients have different signs. With b≠0b\ne0, the gradient is −a/b-a/b; a zero coefficient may give horizontal or vertical lines instead.

[DIAGRAM: asset_name: Parallel profit lines; asset_slug: linear-objective-lines; caption: Parallel objective lines increase until their last feasible contact at (2, 6).; description: The original polygon with vertices(0,0),(5,0),(2,6),(0,8), dashed line3x+2y=12 and parallel line3x+2y=18 touching(2,6). An arrow to the upper right indicates increasing objective.]
Parallel objective lines increase until their last feasible contact at (2, 6).

Worked example 3: a unique maximum

Maximise P=3x+2yP=3x+2y subject to

x,y≥0,x+y≤8,2x+y≤10.x,y\ge0,\quad x+y\le8,\quad2x+y\le10.

Plan. Compare the four vertex values; use a sliding line to check which corner is last touched.

Vertex3x+2y3x+2y
(0,0)(0,0)0
(5,0)(5,0)15
(2,6)(2,6)18
(0,8)(0,8)16

Answer. Maximum P=18P=18 at (2,6)(2,6).

Check. Lines 3x+2y=k3x+2y=k have gradient −3/2-3/2. Sliding from k=12k=12 towards larger values reaches the last contact at (2,6)(2,6), where k=18k=18. No feasible vertex has a larger value. For a minimum, the same table gives 00 at (0,0)(0,0).

Change only the objective to Q=2x+yQ=2x+y. It is now parallel to one of the feasible edges.

Worked example 4: an entire optimal edge

Maximise Q=2x+yQ=2x+y over the same feasible region.

Plan. Compare vertices and inspect the edge between tied optimal vertices.

(x,y)(0,0)(5,0)(2,6)(0,8)Q010108\begin{array}{c|rrrr} (x,y)&(0,0)&(5,0)&(2,6)&(0,8)\\\hline Q&0&10&10&8 \end{array}

The segment from (5,0)(5,0) to (2,6)(2,6) lies on 2x+y=102x+y=10.

Answer. Maximum Q=10Q=10, attained at every point on that whole segment, including its endpoints.

Check. The constraint already says Q=2x+y≤10Q=2x+y\le10; every feasible point on the segment achieves equality. The ruler touches an edge instead of a single corner.

A graph locates the optimal corner or edge; simultaneous equations give exact coordinates where required. If a region is unbounded, check whether the objective can improve without limit before claiming a finite optimum.

Integer feasible points

When variables count whole objects, only lattice points with integer coordinates are allowed, even if a fractional point is the continuous optimum.

Consider

x,y≥0,x+2y≤10,3x+y≤12,x,y\ge0,\qquad x+2y\le10,\qquad3x+y\le12,

and maximise P=4x+5yP=4x+5y. The sloping boundaries intersect at

x=145=2.8,y=185=3.6,x=\frac{14}{5}=2.8,\qquad y=\frac{18}{5}=3.6,

where P=29.2P=29.2. Rounding both coordinates gives (3,4)(3,4), which breaks both constraints. Rounding both down gives a feasible point (2,3)(2,3), but its value 2323 is not best. Neither rounding rule solves an integer optimisation problem.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account