D1, C7 - This Simplex Algorithm Flashcards

1
Q

How do you turn inequalities into equations when formulating linear programming problems (what is added)

A

Add a slack variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Rewrite the inequality x1 + 3x2 + 5x3 <= 23 using the slack variable, r

A

x1 + 3x2 + 5x3 + r = 23

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the simplex algorithm do

A

Finds the optimal solution to a linear programming problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When would we use the simplex method

A

When you have more than 2 variables (x, y, z, …)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the steps of the simplex algorithm

A

1) Write in standard form
2) Set up tableau
3) Are there -ve’s on bottom row (No = optimal solution, yes –> step 4)
4) Select largest -ve as pivot column
5) Are there -ve’s in pivot column (No = optimal solution, yes = step 6)
6) Select pivot element and do pivot operations
7) Return to step 3 and repeat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the significance of slack variables in graphical representations of linear programming problems

A

The borders of the feasible region are when all of the variables (including slack) are equal to zero [x, y, r, s = 0]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you write the following in the ‘standard form’ for the simplex algorithm?
P = 3x + 2y
5x + 7y >= 70

A

P - 3x - 2y = 0
5x + 7y + r = 70

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How would you write an equation for minimising P = 3x - y in ‘standard form’

A

Multiply all by -1 to make it a ‘maximising’ equation
-P = -3x + y
Q + 3x - y = 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you find integer solutions to maximising functions

A

Consider the box of integer coordinate points around the optimal solution
If all constraints are valid, coordinate is correct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When more than one integer coordinate point satisfy all of the constraints, how do you determine the optimal solution

A

Sub in all values into maximising function and highest value of P is maximising coordinate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When do we use the two-stage simplex method

A

When we have >= constraints

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens to slack variables in the two-stage simplex method

A

They become surplus variables
(subtracted from inequality)
…-s1 …-s2 …-s3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you avoid surplus variables being negative

A

Add on an artificial variable
…+a1 …a2 …+a3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the steps of the two-stage simplex algorithm

A

Stage 1
1) Slack variables become surplus variables
2) To avoid surplus variables becoming -ve, add artificial variables
3) Create a temporary objective function I, to minimise sum of the artificial variables (a1 + a2 + a3 + …)
4) Apply simplex algorithm to get I = 0, if I not equal to 0, no feasible solution

Stage 2
1) Remove artificial variables from tableau and apply the simplex algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens if I cannot be equal to 0

A

No feasible solution to two-stage simplex algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Use surplus and artificial variables to write the following inequalities as equations:
3x - 27 >= 7
4x + 5y - 3z >=9

A

3x - 2y - s1 + a1 = 7
4x + 5y - 3z - s2 + a2 = 9

17
Q

What is equivalent to minimising I = a1 + a2

A

Maximising I = -(a1 + a2)

18
Q

Maximise P = 3x - 2y + z, subject to
x + y + 2z <= 10
2x - 3y + z >= 5
x + y >= 8
x, y, z >= 0
What would the equation for minimising I equal

A

Formulae containing artificial variables:
2x - 3y + z - s2 + a1 = 5
x + y - s3 + a2 = 8
Minimise sum of artificial variables:
I = a1 + a2
Equivalent to maximising:
I = -(a1 + a2)
a1 = 5 - 2x + 3y - z + s2
a2 = 8 - x - y + s3
Max I = -(13 - 3x + 2y - z + s2 + s3)
Max I - 3x + 2y - z + s2 + s3 = -13

19
Q

What does M stand for

A

An arbitrarily big number

20
Q

How is the Big-M method different to the two-stage simplex method

A

You can reduce the two-stage method to one stage

21
Q

How would you write maximise P = 3x - 2y using the Big-M methos

A

Max P = 3x - 2y - M(a1 + a2 + …)

22
Q

When will the maximum of P occur when using the Big M method

A

When M(a1 + a2 + …) = 0
(sum of artificial variables = 0)

23
Q

When maximising and minimising P do you add or subtract M(sum of artificial variables)

A

Max –> - M(a1 + …)
Min –> + M(a1 + …)

24
Q

Using the Big M method how would you write out:
Maximise P = x - y + z subject to:
2x + y + z <= 20
x - 2y - z <= 7
x >= 4
x, y, z >= 0

A

2x + y + z + S1 = 20
x - 2y - z + S2 = 7
x - S3 + a1 = 4
Max P = x - y + z - M(a1)

25
Q

How would you rearrange Max P + x - y + z - M(a1) if you know
x - S3 + a1 = 4

A

a1 = 4 - x + S3
P = x - y + z - M(4 - x + S3)
P = (1 + M)x - y + z - 4M - MS3
P - (1+M)x + y - z + MS3 = - 4M

26
Q

If you pivot value is 1, how would you get -(1+M) to equal 0 using multiples of the pivot value

A

-(1+M) + (1+M)1
Row 2 + (1+M)
Row 1

27
Q

Which column do you pick as your pivot if multiple have the same -ve value

A

It doesn’t matter

28
Q

Is (-1 + M) negative

A

No, M is huge