Solving Linear Programming Problems Graphically

In summary, the conversation discusses solving a linear programming problem graphically. The problem involves maximizing the expression (x-y) subject to certain constraints. The lines representing the constraints are drawn and a mistake is pointed out in one of the lines. The conversation then discusses how to find the optimal solution and concludes that the point C(4,0) is the optimal solution based on the last line drawn. The formal method for solving the problem is also mentioned as being the simplex tableau.
  • #1
evinda
Gold Member
MHB
3,836
0
The following linear programming problem is given and I want to solve it graphically.

$$\max (x-y) \\ x+y \leq 4 \\ 2x-y \geq 2 \\ x,y \geq 0$$

I have drawed the lines :

$$(\ell_1) x+y=4 \\ (\ell_2) 2x-y=2 \\ (\ell_3) x=0 \\ (\ell_4) y=0$$

as follows:

View attachment 5092I have drawed the line $2x-y=0$ taking into consideration the following:

For $y=0 \Rightarrow x=1$ and for $y=2 \Rightarrow x=\frac{1}{2}$.But I found that this is the graph of $2x-y=2$ :View attachment 5093

So are the points that I have found above wrong? Or where is my mistake? (Thinking)
 

Attachments

  • gr22.png
    gr22.png
    3.6 KB · Views: 78
  • gr44.JPG
    gr44.JPG
    39.7 KB · Views: 76
Physics news on Phys.org
  • #2
Hey evinda! (Smile)

In your drawing you have the line $2x+y=2$ instead of the line $2x-y=2$. :eek:
 
  • #3
I like Serena said:
Hey evinda! (Smile)

In your drawing you have the line $2x+y=2$ instead of the line $2x-y=2$. :eek:

If we take pick $y=0$ we get $x=1$ and if we pick $y=2$ we get $x=2$.

Then we would get a line like this:
View attachment 5094

But picking $y=-2 \Rightarrow x=0$ and $y=1 \Rightarrow x=\frac{3}{2}$ we get a line as below:

View attachment 5095

Or am I wrong? (Thinking)
 

Attachments

  • l1.png
    l1.png
    328 bytes · Views: 70
  • l2.png
    l2.png
    311 bytes · Views: 71
  • #4
Your first line is for $2x+y=2$ while the second is for $2x-y=2$.
It should be like the second.

Note that if we substitute $y=2$ in $2x-y=2$, we get $-2=2$.
 
  • #5
I like Serena said:
Your first line is for $2x+y=2$ while the second is for $2x-y=2$.
It should be like the second.

Note that if we substitute $y=2$ in $2x-y=2$, we get $-2=2$.

Yes, I noticed it too now... I am sorry... Thank you! (Smile)

I will try to find now the optimal solution...
 
  • #6
We also draw at the same graph the line $x-y=0$.
We consider the line $x-y=\lambda, \lambda>0$ where $\lambda$ is increasing.

View attachment 5096

Do we deduce from the graph that the optimal solution is $C(4,0)$ since it is the last line? (Thinking)
 

Attachments

  • fre.png
    fre.png
    8.4 KB · Views: 72
  • #7
evinda said:
Do we deduce from the graph that the optimal solution is $C(4,0)$ since it is the last line? (Thinking)

Yep. (Nod)
 
  • #8
I like Serena said:
Yep. (Nod)

Nice...And how could we explain it more formally? (Thinking)
 
  • #9
evinda said:
Nice...And how could we explain it more formally? (Thinking)

Erm... I believe that for the graphical method this is pretty much it.
The formal method is with a simplex tableau. (Emo)
 
  • #10
I like Serena said:
Erm... I believe that for the graphical method this is pretty much it.
The formal method is with a simplex tableau. (Emo)

A ok... Thanks a lot! (Smirk)
 

FAQ: Solving Linear Programming Problems Graphically

What is linear programming?

Linear programming is a mathematical optimization technique used to find the best possible solution to a problem with linear constraints. It involves maximizing or minimizing a linear objective function while satisfying a set of linear constraints.

How do you solve linear programming problems graphically?

To solve a linear programming problem graphically, you first plot the constraints on a coordinate plane. Then, you identify the feasible region where all constraints are satisfied. Finally, you find the optimal solution by finding the point within the feasible region that maximizes or minimizes the objective function.

What are the advantages of solving linear programming problems graphically?

One advantage of solving linear programming problems graphically is that it provides a visual representation of the problem, making it easier to understand and interpret. It also allows for quick identification of the optimal solution and sensitivity analysis can be easily performed by shifting the constraints or changing the objective function.

What are the limitations of solving linear programming problems graphically?

Graphical solutions are only feasible for problems with two decision variables. They also do not work well for problems with a large number of constraints or a highly complex objective function. Additionally, they can be time-consuming and less accurate compared to other methods such as the simplex algorithm.

Can linear programming problems have multiple optimal solutions?

Yes, it is possible for a linear programming problem to have multiple optimal solutions. This occurs when the objective function is parallel to one of the constraints, resulting in an infinite number of points that can be the optimal solution. In such cases, any point within the feasible region that satisfies the objective function can be considered an optimal solution.

Back
Top