You are Here: Home >< Maths

# Linear programming using Simplex method question watch

1. Can someone solve this linear programming problem using the simplex method, I've tried and failed.

maximise P= 2x+y

given the constraints:
x+3y « 20
x+y « 10
2x+3y « 24

and obviously x » 0, y » 0
Thanks guys.
2. (Original post by Vijay1)
Can someone solve this linear programming problem using the simplex method, I've tried and failed.

maximise P= 2x+y

given the constraints:
x+3y « 20
x+y « 10
2x+3y « 24

and obviously x » 0, y » 0
Thanks guys.
Does it « means smalller than or equal ???
If it's like that, we have

P = 2x + y = x + y + x « 10 + x
As x + y « 10, and y»0 -> max of x = 10 as y = 0
As y = 0, x = 10, the other conditions are sastisfied.
So max P = 20.
3. (Original post by BCHL85)
Does it « means smalller than or equal ???
If it's like that, we have

P = 2x + y = x + y + x « 10 + x
As x + y « 10, and y»0 -> max of x = 10 as y = 0
As y = 0, x = 10, the other conditions are sastisfied.
So max P = 20.
yes « means smaller than or equal to.
I still don't understand how I would obtain x and y, in a general case of a linear programming problem using the simplex method.
I've tried so many times, with simplex, I keep getting it wrong.

Can you show me with the simplex method?
4. Simplex for that? It'd be quicker and easier to draw the graphs and slide the ruler along as far as it can go within the constraints.
5. look, I just want to learn how to use the simplex method, regardless of what the question is and which method would be faster.
I just picked this question at random, so someone can show me how to apply the simplex to it.
6. well, I don't really know how to use it . But I guess you must draw 3 lines
x + y = 10, x + 3y = 20 and 2x + 3y = 24.
Then determine the regions which represent the inequality equations.
From that, you can got maximum values for x and y (like here ... max of x = 10, and max of y = 20/3).
You use it to find the maximum value for P.
That's what I think
7. (Original post by Vijay1)
Can someone solve this linear programming problem using the simplex method, I've tried and failed.

maximise P= 2x+y

given the constraints:
x+3y « 20
x+y « 10
2x+3y « 24

and obviously x » 0, y » 0
Thanks guys.
ok

change the inequalities into equalities by doing this.
x + 3y + r = 20
x + y + s=10
2x + 3y + t =24

P - 2x - y - 0r - 0s - 0t =0

Draw the simplex tableau for the above equalities.
Then solve using the simplex algorithm.

You will have the variables in the top row as x,y,r,s,t
ANd the variables in the first column as :
B x y r s t value
r 1 3 1 0 0 20
s 1 1 0 1 0 10
t 2 3 0 0 1 24
P-2-1 0 0 0 0

B = Basic variable, i couldnt fit it in the above
Sorry bout my lousy attempt, i dunno how to do the table thing here.
Hope it helps.

Now do u know what to do from here?
8. Simplex method means you put the data into a simplex table.

Basically you do not want any greater than or equal to signs or anything in there, just equals signs. So to each equation you add a variable, usually the letters r s t, or something.

maximise P= 2x+y

given the constraints:
x+3y « 20
x+y « 10
2x+3y « 24

These would go to

P - 2x - y = 0
x + 3y + r = 20
x + y + s = 10
2x + 3y + t = 24

These would then go into a table of sorts with the columns labelled, P, x, y, r, s, t and l (l being the total).

I'd draw you a table but it's .... difficult, i will try tho.

P x y r s t l
1 -2 -1 0 0 0 0
0 1 3 1 0 0 20
0 1 1 0 1 0 10
0 2 3 0 0 1 24

Then you want to get negative numbers out of the top row by making it equal to zero.

To do this you have to find a pivot, the pivot is the value in that row that is lowest when u divide the l value by it. So if i was making the x value zero i'd find the lowest value out of 20 / 1, 10/1 and 24/2. It is clearly 10/1 so that is my pivot. You make the pivot value to 1, by any means and do exactly what you did to that value, to the rest of the values in that row. In this case nothing because the value is already 1. You then make the rest of the values in that column equal to zero. So to get the 2nd column of the 2nd row equal to zero i would subtract the 3rd row from the 2nd row. To get the 2nd column of the 4th row i would subtract (2 x row 3) from it. Then the 1st row to equal i would add (2 x row 3) to it.

This would leave me with the following :

P x y r s t l
1 0 1 0 2 0 20
0 0 2 1 -1 0 10
0 1 1 0 1 0 10
0 0 1 0 -2 1 4

That has given you the top line with no negative values, so the value for P is 20.

There is however, not much point using the simplex method for anything with less than 3 variables, as stated before, linear programming is much quicker and easier .

Hope that helps.
9. It's too complex to do on this message board thingy (unless somebody is really creative or knows some tex code). If you just want to learn it then google it or read the text book. The simplex very rarely comes up in the exams as it takes too long and if you make a mistake the examiner has to recalculate the whole thing to give follow through marks which is just stupid. Most of us only have the vaguest idea of how to do it.
10. It came up in the OCR June Decision Maths paper, and was a very difficult one.
11. (Original post by SsEe)
It's too complex to do on this message board thingy (unless somebody is really creative or knows some tex code). If you just want to learn it then google it or read the text book. The simplex very rarely comes up in the exams as it takes too long and if you make a mistake the examiner has to recalculate the whole thing to give follow through marks which is just stupid. Most of us only have the vaguest idea of how to do it.
If u are doing the edexcel exam board, then the simpelx algorithm has come up in every paper i have done. Basically it will definitely come up.
So its about practising and getting the pattern correct.
12. (Original post by SamTheLlama)
It came up in the OCR June Decision Maths paper, and was a very difficult one.
I agree, the difficulty about the simplex is that u handle with fractions and this takes time. One wrong fraction or calculation in the beginning would mean the rest of the other tableaux are wrong.

You would have to do the simplex question last and finish the other questions.
13. (Original post by goku999)
I agree, the difficulty about the simplex is that u handle with fractions and this takes time. One wrong fraction or calculation in the beginning would mean the rest of the other tableaux are wrong.

You would have to do the simplex question last and finish the other questions.
I hate fractions in there, i kept getting worried about the fractions that i almost forgot how to do the simplex. Every time i restart the question just makes me less and less confident about whether i got it correct or not.
14. (Original post by SamTheLlama)
I hate fractions in there, i kept getting worried about the fractions that i almost forgot how to do the simplex. Every time i restart the question just makes me less and less confident about whether i got it correct or not.
well atleast you can somehow manage to do the simplex, I'm getting really angry and can't get one question right.
15. EDIT - Ignore me, misread.
16. (Original post by SamTheLlama)
Simplex method means you put the data into a simplex table.

Basically you do not want any greater than or equal to signs or anything in there, just equals signs. So to each equation you add a variable, usually the letters r s t, or something.

maximise P= 2x+y

given the constraints:
x+3y « 20
x+y « 10
2x+3y « 24

These would go to

P - 2x - y = 0
x + 3y + r = 20
x + y + s = 10
2x + 3y + t = 24

These would then go into a table of sorts with the columns labelled, P, x, y, r, s, t and l (l being the total).

I'd draw you a table but it's .... difficult, i will try tho.

P x y r s t l
1 -2 -1 0 0 0 0
0 1 3 1 0 0 20
0 1 1 0 1 0 10
0 2 3 0 0 1 24

Then you want to get negative numbers out of the top row by making it equal to zero.

To do this you have to find a pivot, the pivot is the value in that row that is lowest when u divide the l value by it. So if i was making the x value zero i'd find the lowest value out of 20 / 1, 10/1 and 24/2. It is clearly 10/1 so that is my pivot. You make the pivot value to 1, by any means and do exactly what you did to that value, to the rest of the values in that row. In this case nothing because the value is already 1. You then make the rest of the values in that column equal to zero. So to get the 2nd column of the 2nd row equal to zero i would subtract the 3rd row from the 2nd row. To get the 2nd column of the 4th row i would subtract (2 x row 3) from it. Then the 1st row to equal i would add (2 x row 3) to it.

This would leave me with the following :

P x y r s t l
1 0 1 0 2 0 20
0 0 2 1 -1 0 10
0 1 1 0 1 0 10
0 0 1 0 -2 1 4

That has given you the top line with no negative values, so the value for P is 20.

There is however, not much point using the simplex method for anything with less than 3 variables, as stated before, linear programming is much quicker and easier .

Hope that helps.

Yep thats definitely what I seem to get, yet I'm confused, what is the value of x and value of y?
17. I'm not 100%, but i don't think you take into account the values in the x and y columns. Just take the value of P as the value in the l column. Not sure why ... maybe someone could explain.
18. (Original post by SamTheLlama)
I'm not 100%, but i don't think you take into account the values in the x and y columns. Just take the value of P as the value in the l column. Not sure why ... maybe someone could explain.
Yes I'm sure in the end, the values in the final tabulae allows the value of P to be found as we already know, but also the values of the number of variables (x and y)
19. (Original post by goku999)
If u are doing the edexcel exam board, then the simpelx algorithm has come up in every paper i have done. Basically it will definitely come up.
So its about practising and getting the pattern correct.
Yeah I did Edexcel. I think i saw it on one past paper and it wasn't in my exam. I think it was in Jan 2005. In fact, I completely got away with it because I didn't get it in my D2 exam either . It certainly won't definitely come up. But there's about a 1/5 chance it will. So as long as you know the basics you'll be fine. But certainly don't spend all your revision time on it. Just have a read through the method immediately before the exam to refresh your memory and pray all goes well .
20. (Original post by SsEe)
Yeah I did Edexcel. I think i saw it on one past paper and it wasn't in my exam. I think it was in Jan 2005. In fact, I completely got away with it because I didn't get it in my D2 exam either . It certainly won't definitely come up. But there's about a 1/5 chance it will. So as long as you know the basics you'll be fine. But certainly don't spend all your revision time on it. Just have a read through the method immediately before the exam to refresh your memory and pray all goes well .
Thanks for the advice. I spent the whole day today wasting time on this! Luckily I was able to do 1 out of 4 questions using this. Well I've got until Monday.
D1 is not bad, fairly easy - but thats why I make simple mistakes

Btw, its a D1 retake.

### Related university courses

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: June 19, 2005
The home of Results and Clearing

### 3,702

people online now

### 1,567,000

students helped last year
Today on TSR

### IT'S TODAY!

A-level results chat here

### University open days

1. Bournemouth University
Fri, 17 Aug '18
2. University of Bolton
Fri, 17 Aug '18
3. Bishop Grosseteste University
Fri, 17 Aug '18
Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams