Presentation is loading. Please wait.

Presentation is loading. Please wait.

4. Linear Programming (Graphics)

Similar presentations


Presentation on theme: "4. Linear Programming (Graphics)"— Presentation transcript:

1 4. Linear Programming (Graphics)
Objectives: Sketching a straight line Half-planes - sketching inequalities Simultaneous inequalities - determining a region Refs: B&Z

2 Graphing Inequalities
We know how to graph equations of the form y x c -c/m y=mx+c slope m An equation like is also the equation of a straight line.

3 Example 1: Written in this form, the y-intercept is c/b,
the x-intercept is c/a and the gradient is -a/b. Example 1: 2 x -4 y 4x-2y=8 y-intercept: 8/-2=-4 x-intercept: 8/4=2 gradient:-4/-2=2

4 Notice that the straight line has divided the plane
into two half-planes. In fact any straight line divides the plane into two half planes. Now let’s go back to our equation If we replace the equality by an inequality, can we represent this graphically? 2 x -4 y 4x-2y=8 Let’s do some exploration. Where do the points (0,0), (-2,1), (-1,-2) lie? They are all in the same half plane.

5 Notice that all of these values are ≤ 8.
Now let’s evaluate at these points. (0,0) 4(0)-2(0)=0 (-2,1) 4(-2)-2(1)=-10 (-1,-2) 4(-1)-2(-2)=0 Notice that all of these values are ≤ 8. 2 x -4 y 4x-2y=8 Indeed all points in the left half-plane give values ≤ 8. Try some more for yourself.

6 Now identify the points (3,0), (4,1), (2,-2) on the graph.
They are all in the right half-plane. 2 x -4 y 4x-2y=8 If we evaluate at these points (3,0) 4(3)-2(0)=12 (4,1) 4(4)-2(1)=14 (2,-2) 4(2)-2(-2)=12 we find that all of these values are ≥ 8.

7 It turns out if the function has value ≤ c (or ≥) for some
This is no accident! It turns out if the function has value ≤ c (or ≥) for some point in the half-plane, then the function has value ≤ c (or ≥) for all points in the half-plane. So to sketch the inequality we need only to check one point (not on the line). The value of the function at this point will tell us which half-plane is the one we want. Note that if the inequality is strict (<, > rather than ≤, ≥) we indicate this by a dotted line. So far this is too easy! What happens if we have a system of simultaneous inequalities?

8 Example 2: Sketch the region determined by
We must determine the region which satisfies all four inequalities. On the diagram we will shade the excluded region. 5x+2y=10 2 5 The first step is to indicate the lines y x 3 2x+2y=6 on the graph.

9 Now we can determine which half-planes to include. (a) x ≥ 0
y x 3 2x+2y=6 5x+2y=10 2 5 Now we can determine which half-planes to include. (a) x ≥ 0 - any point with negative x-co-ordinate is excluded. (b) y ≥ 0 - any point with negative y-co-ordinate is excluded. (c) 2x+2y ≤ 6 - try the point (3,3). 2(3)+2(3)=12 ≥ 6, so the half-plane containing (3,3) is excluded (d) 5x +2y ≤ 10 - try the point (1,1). 5(1)+2(1)=7 ≤ 10, so the half-plane containing (1,1) is included.

10 Any point within this region will satisfy all of the inequalities
x 3 2x+2y=6 5x+2y=10 2 5 Any point within this region will satisfy all of the inequalities

11 You may now do Questions 1 and 2, Example Sheet 2 From the Orange Book.


Download ppt "4. Linear Programming (Graphics)"

Similar presentations


Ads by Google