Question
Question: How do you do linear programming?...
How do you do linear programming?
Solution
In this question, we have to find the steps of doing the linear programming. As we know, linear programming is a method to find the best possible outcome from linear relationships. Thus, to solve a linear program problem, it is given to us with objective functions and inequality constraints. Therefore, we will first take the equality sign of the constraints inequalities and solve for both the variables. Then, we will plot those equality equations in the graph. After that, we will find the constraint region by putting the value of the variables equal to 0 in the inequations. After that, we will shade the region and thus find the closed or open region. In the last, we will find the corner points of the feasibility region and put it in the objective function, to get the optimal solution of the problem.
Complete step-by-step answer:
According to the question, we have to solve the linear programming problem. As we know, a linear programming is the method to find the best optimal solution from linear relationships. Thus, to solve this problem, we will first let a programming linear function, that is
We have to find the maximal and minimal value for the objective function z=5x+3y with the constraints x+2y≤14,3x−y≥0,x−y≤2 where both x,y≥0 .
So, the constraints given to us are:
x+2y≤143x−y≥0x−y≤2
So, now we will first plot the above three inequations in the graph by taking the equality of all the three inequation, we get
x+2y=14 --------- (1)
3x−y=0 ----------- (2)
x−y=2 --------- (3)
Now, we will solve equation (1), by letting different values of y and solve for x, that is
Let us suppose y=0 . Now, we will put it in equation (1), we get
⇒x+2.(0)=14
On further solving, we get
⇒x=14
Let us suppose y=1 . Now, we will put it in equation (1), we get
⇒x+2.(1)=14
On further solving, we get
⇒x+2=14
Now, we will subtract 2 on both sides in the above equation, we get
⇒x+2−2=14−2
As we know, the same term with opposite signs cancel out each other, thus we get
⇒x=12
Therefore, the coordinates for the equation x+2y=14 are (14,0),(12,1) ---- (4)
Similarly, we will solve equation (2), by letting different values of x and solve for y, that is
Let us suppose x=0 . Now, we will put it in equation (2), we get
⇒3.(0)−y=0
On further solving, we get
⇒y=0
Let us suppose x=1 . Now, we will put it in equation (2), we get
⇒3(1)−y=0
On further solving, we get
⇒3−y=0
Now, we will add y on both sides in the above equation, we get
⇒3−y+y=0+y
As we know, the same term with opposite signs cancel out each other, thus we get
⇒3=y
Therefore, the coordinates for the equation 3x−y=0 are (0,0),(1,3) ---- (5)
Similarly, we will solve equation (3), by letting different values of y and solve for x, that is
Let us suppose y=0 . Now, we will put it in equation (3), we get
⇒x−0=2
On further solving, we get
⇒x=2
Let us suppose y=1 . Now, we will put it in equation (3), we get
⇒x−1=2
Now, we will add 1 on both sides in the above equation, we get
⇒x−1+1=2+1
As we know, the same term with opposite signs cancel out each other, thus we get
⇒x=3
Therefore, the coordinates for the equation x−y=2 are (2,0),(3,1) ----- (6)
Now, we will plot the value of equations (4), (5), and (6) on the graph, we get
Now, we will find the shaded region for all the inequalities that is we will put the value of the variables equal to some constants, and thus find whether the inequality condition is true or false, that is
Let us suppose (x,y)=(0,0) in equation x+2y≤14 , we get
⇒0+2(0)≤14
Therefore, we get
⇒0≤14
It is a true statement; therefore we will shade the region for inequation x+2y≤14 towards the coordinates (0,0) -------- (7)
Let us suppose (x,y)=(1,1) in equation 3x−y≥0 , we get
⇒3(1)−1≥0
Therefore, we get
⇒2≥0
It is a true statement; therefore we will shade the region for inequation 3x−y≥0 towards the coordinates (1,1) -------- (8)
Let us suppose (x,y)=(0,0) in equation x−y≤2 , we get
⇒0−0≤2
Therefore, we get
⇒0≤2
It is a true statement, therefore we will shade the region for inequation x−y≤2 towards the coordinates (0,0) -------- (9)
So, now we will shade the values of equation (7), (8), and (9), we get
So, the end points of the closed region that is the feasibility region are (2,6),(6,4),(−1,−3) . Thus, we will not substitute the above coordinates in the objective function, which is z=5x+3y , that is
We will first substitute the value (2,6) in the objective equation, we get
⇒z=5(2)+3(6)
⇒z=10+18
Therefore, we get
⇒z=28 ------ (10)
We will first substitute the value (6,4) in the objective equation, we get
⇒z=5(6)+3(4)
⇒z=30+12
Therefore, we get
⇒z=42 ------- (11)
We will first substitute the value (−1,−3) in the objective equation, we get
⇒z=5(−1)+3(−3)
⇒z=−5−9
Therefore, we get
⇒z=−14 ------- (12)
Thus, from the value of equation (10), (11), and (12), we get the maximal value of the linear programming as 42 and minimal value as -14.
Thus, 42 is the maximal value with the coordinate (6,4) and -14 is the minimal value with the coordinate (−1,−3) .
Note: While solving this problem, do mention all the steps properly to avoid confusion and mathematical error. Always remember that in linear programming problems, we have to put the end points of the feasibility region in the objective function, to get the accurate answer.