You are Here: Home >< Maths

# Linear programming using Simplex method question watch

1. Introduce slack variables r s and t.
P - 2x - y - 0r - 0s - 0t = 0
x + 3y + r = 20
x + y + s = 10
2x + 3y + t = 24

Hope this works...
Initial tableaux:

...| 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

- Find the pivot. The pivotal column is the most negative entry from the P row (-2)
- Divide the numbers in the value column by the corresponding value from the pivot column (these are "theta" values).
For the r row: 20/1 = 20
For the s row: 10/1 = 10
For the t row: 24/2 = 12
- The pivotal row is the smallest non-negative theta value. In this case, 10 (the s row). The pivot is bolded.
- Divide the pivotal row by the pivot (to make the pivot 1). This is already done.
- Add or subtract multiples of the pivotal row from the other rows to make all other entries in the pivotal column zero. In this case:
Subtract 1 times row 2 from row 1
Subtract 2 tmes row 2 from row 3
Add 2 times row 2 to row 4
- You also replace s at the start of the pivot row with the x at the top of the pivot column. This means that you are solving for r, x and t (the basic variables) and y and s are set to 0. The simplex method moves around the verticies of the feasable reigon (if you draw the graphs). At the start r, s and t were solved and x and y were zero. This corresponds to starting at the origin. Now we're moving anticlockwise to the point (10,0) which is where the line x+y = 10 meets the x axis. Anyway...

...| x | y | r | s | t | Value
r | 0 | 2 | 1 | -1| 0 | 10
x | 1 | 1 | 0 | 1 | 0 | 10
t | 0 | 1 | 0 | -2| 1 | 4
P | 0 | 1 | 0 | 2 | 0 | 20

I think the definition of an optimal tableaux is zeros in the P row for columns of basic variables (r x and t) and non-negative numbers in the rest of the P row and Value column. So this is optimal. Corresponding to x=10, y=0 and P=20.
2. (Original post by SsEe)

...| x | y | r | s | t | Value
r | 0 | 2 | 1 | -1| 0 | 10
x | 1 | 1 | 0 | 1 | 0 | 10
t | 0 | 1 | 0 | -2| 1 | 4
P | 0 | 1 | 0 | 2 | 0 | 20

I think the definition of an optimal tableaux is zeros in the P row for columns of basic variables (r x and t) and non-negative numbers in the rest of the P row and Value column. So this is optimal. Corresponding to x=10, y=0 and P=20.
You will know when the tableau is optimal when there are non-negative values in the objective row.
On the LHS are the variables r, x, t.
r has the value of 10
x has the value of 10
t has the value of 4
If a question says the profit has to be maximised then the profit P here is 20.

If they ask u the value for the other variables, it is:
y = 0
s = 0
3. (Original post by goku999)
You will know when the tableau is optimal when there are non-negative values in the objective row.
I was playing around with the theta values stuff. I know realise the importance of them! If you don't use them you can end up with negative values in the value column which is rubbish as we define all the slack variables and x and y to be positive. If we don't constrain the slacks to be positive then we might as well not have the inequalities in the first place (think about it ).

In conclusion, if you don't work out theta values then you can end up with negatives in the value column so it's a good idea to remember that all numbers in the value column must be positive in the final tableau and if they aren't then somethings gone wrong.
4. (Original post by SsEe)
I was playing around with the theta values stuff. I know realise the importance of them! If you don't use them you can end up with negative values in the value column which is rubbish as we define all the slack variables and x and y to be positive. If we don't constrain the slacks to be positive then we might as well not have the inequalities in the first place (think about it ).

In conclusion, if you don't work out theta values then you can end up with negatives in the value column so it's a good idea to remember that all numbers in the value column must be positive in the final tableau and if they aren't then somethings gone wrong.
Ah! I see now, thanks so much, I know how to do this now, isn't it just more better to do it the algebraic way?
5. (Original post by Vijay1)
Ah! I see now, thanks so much, I know how to do this now, isn't it just more better to do it the algebraic way?
Yeah. At the start of the thread we were saying that this question would be easier to do algebraically or by sketching the graphs and sliding a straight edge along as there are only 2 variables (x and y) so it's easy to draw graphs. The simplex is better to use if you have 3 variables (x, y and z) as you can't really sketch 3d graphs easily.
6. (Original post by SsEe)
Yeah. At the start of the thread we were saying that this question would be easier to do algebraically or by sketching the graphs and sliding a straight edge along as there are only 2 variables (x and y) so it's easy to draw graphs. The simplex is better to use if you have 3 variables (x, y and z) as you can't really sketch 3d graphs easily.

### 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

### 1,012

people online now

### 1,567,000

students helped last year
Today on TSR

### University open days

1. Keele University
Sun, 19 Aug '18
2. University of Melbourne
Sun, 19 Aug '18
3. Sheffield Hallam University
Tue, 21 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