FE501 – 1019Graphical solution with Isoprofit linesChanging the slope of the Linear functionSimplex Algo StepsMake it to standard form First Hypothesis (x1=0,x2=0)Second Hypothesis (1,0,0,4)(Matrix) Transformation in the linear system of equationsSolving linear systems with matricesSolving the original problem with matrix notationShort - term finance ProblemExtra - Answers to the Book Excersises Exercise 2.1Exercise 2.2Exercise 2.3 **Exercise 2.4Example:Exercise 2.5 **
Steps
What happens if we change the objective function as:
slope of the original problem
slope of the changed problem (similarly):
We changed the slope, but the optimav value and the optimal solution (optimal point ) did not changed
In other words,
In the original problem, to get the maximum value
In other words,
is always the slope of the isoprofit line which are the slope of the objective functions of the linear programming.
Which corner point will be the optimal solution when the slope changed to the second one?
same
what happens if slope = -4 ?
What happens if slope = 1 ?
which is the optimal solution for this then?
In this case, we have
and we have two inequality functions
, so we will introduce two slack variables
:
We can not solve if we have two equations and 4 unknowns.
A system of linear equations, can be solved if you have n
equations and n
unknowns or variables.
So, this can be solved:
but we can not solve this:
To solve this, we need to assume and give z
some value, for example :
so we converted the problem to a solveable problem,
In general, we have n
decision variables and m
equations. most of the time we have:
what we do in simplex method is, in each iteration we make
So we have:
Non-basic variables: their value if equal to zero.
Basic variables: their value is non-zero
for our problem,
first change the shape of the problem:
Q: which one of the decision variables must be increased so that objective value increases ? ( in other words, words we have to select one of the non-basic vairables, whos value is currently zero, if we increase the value of one of the basic variables, which gives you increase in the objective value?)
We can see this from the objective function,
Either from
or from
For example:
x1
, from zero to 1
, let’s say then z=20
.x2
, which is currently zero, to 1
, then z=10
.Each unit increase in the
x1
in crease in z
in the 20 units, x2
……………………………… 10 units.
Now, in each iteration in the simplex method, we select one of the non-basic variables (current value is zero), and increase the values of the non-basic values to the positive values so that one of them becomes basic.
But this means that, one of the basic variables, must become non-basic. ( we can have only two variables non-basic and only two basic in our case)
Which is the point C (0,0)
Now, which of the basic variables will become non-basic? ( x3 or x4 ?)
We use the algebric check, the algebrick check is the following:
In the first constraint :
for example, if we give x1 the value of 1.1
then we have:
but because all x should be non-negative so, the constraints dose not satisfy, so the maximum number we can give to x1 is 1 then we have x3=0.
In the second constraint:
we have x2 =0
so the largest number we can give to x1 is 7
, in such case x4 = 0
If we consider both of them, what is the largest number we can give to x1 ?
So in order to satisfy both constraints, the maximum value can be given to x1 is min(max_1,max_2
that is min(1,7) = 1
In other words we have to take the minimum.
We forced x1
to be positive , so one of the current positive values (x3,x4) must become zero.
Which of the x3
or x4
should become 0 ?
Now we have :
which of the basic variables should be forced to zero?
we calcualted that, x1 is 1 then we have x3=0.
so we have :
so :
So our corresponding z value is :
Which is the Point B(1,0 )
if we have:
We can write the original problem as follows:
x1 | x2 | x3 | x4 | |
---|---|---|---|---|
-20 | -10 | 0 | 0 | 0 |
1 | -1 | 1 | 0 | 1 |
3 | 1 | 0 | 1 | 7 |
So that, we can get, x1 = x2 = 0, x3 = 1, x4 = 7. z = 0 (C)
This time we select x1 to be become basic and x3 to be non basic.
x1 | x2 | x3 | x4 | |
---|---|---|---|---|
0 | -30 | 20 | 0 | 20 |
1 | -1 | 1 | 0 | 1 |
0 | 4 | -3 | 1 | 4 |
z=20 (B)
We select x2 this time. and because r1 is negative , we select r4.
x1 | x2 | x3 | x4 | |
---|---|---|---|---|
0 | 0 | -2.5 | 7.5 | 50 |
1 | 0 | 1/4 | 1/4 | 2 |
0 | 1 | -3/4 | 1/4 | 1 |
z = 50 (A)
In a maximization problem. there is a negative value in the row of the objkective function, we continue. And also -2.5 is an indicator for us that x3 must become a basic variable this time.
x1 | x2 | x3 | x4 | |
---|---|---|---|---|
10 | 0 | 0 | 10 | 70 |
4 | 0 | 1 | 1 | 8 |
3 | 1 | 0 | 1 | 7 |
z = 70 (D)
Notice: Moved to the 1026 Note.
Draw all constraint lines as shown: where
Get all intersection points
Draw the feasible area
where we have:
eq4
goes to maximum at point D.
by drawing the feasible region, we can find that , feasible region goes infinite, so the minimum values of the problem occurs at either B and A.
because we have:
we can find that, minimum value of the Z will be at point B, where
We can also prove this with graphical solution:
Fro mthe given we have:
a:
A linear program is infeasible if there exists no solution that satisfies all of the constraints -- in other words, if no feasible solution can be constructed.
41min: x + y;
2c1: x >= 6;
3c2: y >= 6;
4c3: x + y <= 11;
b:
41max: x+y
2c1: -x+y <=2
3c2: x>=0
4c3: y>=0