noc19-mg45-lec17

IIT Kanpur July 201
20 followers
Dec 4, 2023
[Music]
[Music]
good morning everybody good afternoon
good evening to all of you wherever you
are in this part of the globe and once
again warm welcome to all the students
or the participants who is taking this
da dm3 which is data analysis and
decision-making three cores under and
patel mooc series and as you know i just
give you a very very brief about thirty
Seconds introduction about this general
idea of the course it is the course of
12 weeks and each week we have five
lectures each being for half an hour so
the total number of lectures is 16
number and the total contact hours goes
to 30 and my good name is reckonin and
Sengupta from Miami Department at IIT
Kanpur and we are as you can see we are
in the 17th lecture which is in the
fourth second class in the fourth week
we have already completed three weeks or
five lakes as each and after the each
week as you know there are assignments
so you have already completed three
assignments and total of another nine to
go so it will make 12 and obviously at
the end of this course you take one
final examination now if you remember
you are discussing about the concept of
simple use of Gauss Jordan method and
the concept that the basic solution or
physics so so this basis was basically
the concept in the constant when you are
using the concept of vectors and how you
span the whole space try to find out
that each and every vector or each other
only so called simon equation if you are
considering from the same equation point
of view which actually we would be doing
for problem solving if you are
considering any vector or any set of
simultaneous equations you will be able
to express all other vectors or all
other simultaneous equation by a convex
combination of the vectors of the
simultaneous equations which you have
and when you are considering from the
point of view of matrices and
if you have then the concept of rank
would come rank is basically the minimum
of M and n where m is the number of rows
n is the number of columns and as you
remember that we have mentioned that
this number of the rank of a matrix
would basically be utilized in order to
solve the set of equations which I said
that it is basically ax is equal to B
and you basically find out X by
pre-multiplying or post multiplying a
with this inverse
similarly you pre multiply or post
multiply B with a inverse and now when
you are going to start the algorithm so
if you remember the it was also
mentioned please excuse me if I am
repeating it so that differentiation the
concert differentiation would give you
the maximum of the minima but what is
the maximum and what is the minima at
from which point will start to do the
search and where we should end is it
cannot be obtained from the concept of
differentiation the concept or calculus
so you have to basically formulate the
plan from which point we start and where
we end and which direction we should go
and if you remember I have been
mentioning the movement direction would
be such that each unit of increase or
decrease of one decision variable with
respect to the cost factor would either
increase or decrease your objective
function by the maximum amount
considering is a maximization problem or
a minimization problem so we will
basically keep moving in this direction
along the corner points which is from
the edges and once we reach the optimal
solution considering these only one
obviously it can be multiple optimal
solutions also how I am going to come to
that later
will basically reach and the optimal
solution and any further movement along
the edge in the other direction you will
see that the overall objective function
starts decreasing even if by addition or
subtraction of the decision variables
now when you start the overall objective
solution of in the case of
in the simplex method you have basically
have a basic solution so that basic
solution has to be feasible it need not
be infeasible because if it is
infeasible that means if the point is
not inside the feasible State it's a bit
but it actually gives you some solution
but the results are not applicable now
how you do that from the point of view
of matrix multiplication and matrix
operations I will discuss that
theoretically and then basically proceed
accordingly now consider there are total
number of solutions or total number of
such corner points is basically any
number so it's not M it is N and you
divide this n into two groups this is
arbitrarily it can be anything so which
one you want to choose will basically
depend whether it's one of the basic
feasible solution monkeys towards basic
feasible solution from where we can
start the iteration process so consider
that you have one set of X's X's are
those variables which are the decision
variables and consider some j's of them
so J is 1 to P so one set of P out of n
for X's are greater than 0 and obviously
it would mean the rest of the decision
variables which is P plus 1 till n are
are 0 now if we remember in the problem
which had just discussed the last day or
this in the last class we basically took
X 1 as 0 X 2 as 0 X 3 and X 4 which were
the slack and the surplus variables we
put them as nonzero and we saw that one
of them was negative so obviously it
would mean that that cannot be one of
the basic feasible solution because the
considering the fact we are base we are
considering that all the slack surplus
actual decision variables are greater
than 0 greater than equal to 0 as per
the norm of assumptions which we have
assumed
now in this case you as you said that
you'll partition I am again repeating
partition the n number of decision
variables into two sets arbitrary sets
the first set basically consists of P
number of such decision variables next
considers from P plus 1 to n this P plus
1 to n are assumed to be 0 decision
variables and this 1 to P are considered
to be nonzero so this is what I said
supposing the feasible solution feasible
mark the word feasible solution it's J
is greater than 0 I'll come to when we
solve the problem you will understand
what I mean so this is just a
combination of matrix multiplication
deviation along with the concept of
basic feasible solution which you have
suppose in the feasible solution XJ is
greater than 0 so that is J is equal to
1 to P while XJ is equal to 0 for K
being P plus 1 to n now such that if you
put that in equation you get all the
solution which is fine which as I saw in
the in the last class so X 1 X 2 are 0
and still you are still getting the
answer now consider we will assume some
constants which will mention as alpha
suffix J's and on obviously any values
of alpha suffix case even if they are
nonzero the art actual multiplication
with the value of 0 obviously will
result in a value 0 and we'll consider
that this alpha J is j is equal to 1 to
p are nonzero such that when you find
out the convex combination is basically
leads to 0 which means technically means
that I want to have some set of of
constants so this constant would be the
operations which we'll be using and
throughout and it will keep changing
depending on the answer such that you
want to have some constants which will
might be multiplied with this values of
the vectors such that the net result of
the effect of the vectors which are
nonzero would be turned converted ms0 in
the sense that we want to start
the point which is basic feasible
solution such that it is inside that it
is one of the corner corner points in
the feasible region and that is the
point from where we can start off our
solution point one point number two it
will also mean that the the the non this
slack or the surplus whatever it was
there in the problem if they are put to
zero and we started from that point it
will give us a good point from where we
can start the search for the simplex
method so what we will do is that it's
like this I'll try to draw it here only
so consider so this is the matrix and
they would be a counter but also what is
that counter part I am going to come to
that later so this the set of points
which is written here with respect to
what I am writing are related need not
be exact the values would be same or the
symbols are the same but the concept
would be equal so you have 1 2 1 n I'm
considering number Here I am consider n
rows and n columns that you may think
that surprising that's not because I add
an extra number of rows or extra number
of columns it can be made depending on
whether M or n whichever is more than
the other so what I am doing is that so
this was a now I want to convert what
think I want to convert a in to an
identity matrix I because on the left
side if I am basically pre multiplying a
post multiplying a with a inverse slowly
at the end of that it will be converted
into I now I am doing some operations as
I do the operations on the left side I
do the same set of operations as I said
your balancing our weight is being
balanced in a balancing scale
so as I am taking out weights or putting
on weights I would do the same thing on
the right hand side so I am as I am
doing the operations on a I'll try to do
the same set of operations on B so as
that slowly a becomes I and B because
basically inverse V or B into a inverse
depending on pre multiplication or post
multiplication so what I will do now
this a should look in the end what I
will use a different color first would I
need a matrix first will be one all are
zero here in the last one all are zero
here did the last one all are zero yet
in the last one so what you have is this
principal diagonal values are all one
technically it means this should be
converted into one and these values I
will use some other color just for two
notation this becomes 0 this becomes 0
so a1 n becomes 0 and all the well so I
am using a different color scheme to not
make the notation so what I do I should
multiply I should divide a1 1 by a 1 1
so if I am doing that and if we time
concentrating on the row or the column I
will do the same operations for that row
or column accordingly so this is
actually what it means again I am
repeating as a11 gets converted to 1
I'll be using some multipliers the same
set of ratios or multipliers would be
utilized throughout this row or
throughout the column considering that
you want to basically convert into an
identity matrix considering the row or
the column for it
so this wants to go to here
[Music]
so you we will Express a are any other
fun as a minus sign because minus sign
is that if you if you add or subtract
the corresponding other elements in the
row or the column the end result should
be 0 because adding -2 to 2 would
basically make it 0 so the initial value
in the row or the column for that
particular value on the cell is 2 so
you'll basically subtract to make it at
0 so which I are not the along such that
0 becomes an element not along the
principle diagonal at is given here so
and based on the fact that you have
aimed at bringing back the elements
which are there in the principal
diagonal as 1 so express AR as minus of
a ratio now see this ratio which is
important this one this is important now
technically if if J was equal to R then
obviously that that ratio should be 1
such that a R minus of a R would
basically be leading to 0 which we do
not want anyone want to be there so you
will only ensure that 1 is there in the
principal diagonal let me continue
reading I may be repeating few things
but please bear with me so where the
vectors AR of the P set of so this I'm
aiming for those set of variables which
are greater than 0 because as such P
plus 1 to n are already 0 so you need
not be bothered about them so where
vectors AR of the P vectors are for
which AR is not equal to 0 would
basically be converted accordingly hence
as you do the operations from the left
hand side you will do the exactly the
same thing on the right hand side
because you will be asking why are we
doing that because on the right hand
side remember B is an element so
consider if I mentioned okay let
let me step back if I tell you that I
have a number three and I want to
convert into say for example any other
number so actually what is 3 3 is equal
to 3 into 1 so in the same way what is B
B has been either pre multiplied or post
multiplied by I and a identity matrix so
what I am doing is that I am converting
I with a mirror image so if if this is a
mirror I am basically seeing the picture
of way
multiplying it for a minus 1 and
conveying 2i and in a similar way as I
do the steps I do the similar steps on
the right hand side and that eye is
there it is converted into basically a
factor such that it is a minus 1 hence
it's the last point hence we would have
for all values of j j is equal to 1 to p
the fact which he has there on the right
hand side would basically be multiplied
or post multiplied depending on the same
set of operations which is there for the
left hand side again i am repeating
weighing balance take out with add
weight on the left hand side you do the
same quantum of operations on the right
hand side such that the balance remains
which means a gets converted into i and
i which was there on the right hand side
which was pre multiplied what postman
overhead by b gets converted step by
step in the same way thus when the whole
process ends obviously remember the for
the basic feasible solution the
variables which was 0 remains 0 because
the multiplying facts which you have for
alpha k's k is equal to p plus 1 into n
are all 0 so any pre multiplication post
multiplication addition subtraction
obviously would result in the value 0
because they remain same once the whole
process ends so technically there were
some they could have been some - values
also or positive values also in the row
or the column based on which you are
doing the operation so what you will do
is that you will basically multi pre
multi
my post multiplied with the value of
minus to bring bring them all with the
greater than zero sign now what now what
you do is that as you do that
technically now remember when you
basically complete the same operation
step by step you will look at the value
now the question okay let the question
would be that when I want to consider
the basic feasible solution I have
obtained it now what next you will take
that value now if you remember I said
they do move that direction where the
uphill is most so that the gain is
maximum according sitting the positive
value and down really is most in the
negative sense such that any one unit
drop in one of the variables will give
you the minimum the fastest rate so you
will consider that as your benchmark
based on which you will consider the
minimum of the maximum so the other
point would imply that you will
basically take the minimum of that with
a negative sign obviously it will be
maximum such that you ensure that the
movement along the direction later on we
will see that the movement along the
direction from the basic feasible
solution would be in that direction
where the addition of the subtraction of
the objective function is happening the
most or the least depending on what type
of problem you are trying to solve I
will show this problem from the point of
view of a simple optimization problem
and it will be replicated later on also
consider product one product two so it
would not immediately make sense once we
solve the problem we will understand
machine one machine two hours required
per unit is basically two one for
product one or two for product one one
for product two similarly for machine
two it becomes product one is one and
product two is three now on the same
hand this is the same problem minimum
hours of the machine per day which you
can basically have to utilize is five
and number minimum hours of machine per
day for machine two is three and
available number of hours for machine
birthday is eight and eight
so obviously that minimum need not be
possibly could be 0 also but you have to
basically utilize some amount of words
for machine 1 and machine to cost for
the products are given so the cost are
basically for product 1 2 units or 2
dollars 2 rupees - yen's two theorems -
Canadian dollars whatever it is and the
cost per unit for product 2 is 1 so that
means if you add subtract product 1 by 1
unit you add plus 2 or minus 2 similarly
I will be using the word plus so but
with the negative sign out obviously
means that is a negative and the cost
per unit of production for 2 would be
basically 1 that means addition and
subtraction gives you one now the
minimization problem is written here so
let me come here so what you have is
cost of product 1 is 2 so it is 2 X 1 +
1 X 2 I'll consider X 1 and X 2 as the
decision variables for product one and
product 2 now I will be switching
between these slides in order to bring
the semblance of what you have in
basically the constraints so if you see
the the first constraint is 2 X 1 plus X
2 is less than equal to 8 8 is what 8 is
the number of hours what is - what is 1
because X 2 is x 1 it means both total
amount of utilization on the number of
hours which you have basically from 4
machine 1 put and corresponding to the
product X 1 and X 2 is 1 + 2 so if you
see product 1 equals two hours product
took request one hour so obviously it
will be 2 X 1 + 2 1 X 2 is less than
equal to 8 similarly if I go to the
second one it will be 1 X 1 into 3 X 2
is less than equal to 8 let me see yes
it is matching so you are assured that
the set of constraints which you have
corresponding to the hours is met but
stop here there is some extra thing is
also mentioned so let me stick
so extra sting you mention about the
color scheme which you have put the
minimum number of are so let let us see
what is being done and obviously the
fact that X 1 and X 2 is greater than
equal to 0 would also remain so this is
the last equation so there is some space
here what is that going to come let us
see so the first equation basically
means 2 X 1 plus X 2 is greater than 5
now if you remember we had mentioned the
utilization of Machine 1 minimum 5 was
equalization machine to minimum 3 hours
does it meet the criteria which you have
put for the constraint third and fourth
let us see yes it means because if you
produce 2 units of product 1 sorry sorry
if you produce X 1 units of product 1
utilizing 2 hours and X 2 units of
product 2 utilizing one hours the total
sum has to be greater than is equal to 5
similarly for the last constraint before
X 1 is greater than 0 and X 2 is greater
than 0 it says that if you use X 1 units
of product 1 and X 2 units of product 2
the total number of utilization hours
will be X 1 only plus 3 X 2 because you
utilize 3 hours per unit production of X
2 so that is greater than 3 so now the
problem and the constants are written
now pause and see let us go back to
simple algebra which you have been
discussing so how many such equations
are there there are 4 equations how many
such constraints are there how many such
variables are there there after 2
variables now the first question would
come immediately into our anybody's mind
is does this constraint give you some
infeasible solutions from the matrix
concepts which means that are they
redundant that means are some of this
equation which are given being able to
we are able to express them as convex
combination of the other variables point
one point number two is that if we go
into the concept of solving it using
simplex method do we meet many of the
criterias of the problems which are
faced in if you remember in the one of
this classes in the last three classes I
mentioned
that they can beezie value can be
infinite arbitrary large similarly x1
and x2 convey arbitral large they can be
cases where one of the XS or more than
one of the XS are not arbitral large
they are some fixed values but
corresponding the fact that the other
X's are a bit arbitrary large Z it can
be infinite on arbitral large the third
case I showed that in in case you for
example few of the X's are arbitrarily
large steel you can have the case when Z
is finite for the Z value wedge which
was 4 then we also saw that the
constraints are in infeasible that you
cannot have such such constraints and
also the constraints are feasible but
you would not have the space or you
would not have an answer which is
feasible because all of these facts the
last 2 facts were work but in the case
where they were the feasible region
would basically be a null set Nantz
admit there no elements considering the
fact that X 1 and X 2 are greater than 0
so let us see and come back to this
issue now what we need to do is that we
need to basically add the these
variables in such a way that we will we
will be ending with some initial basic
feasible solution so let the problem be
stated so you have so so in this case
you you you had the problem so let us
consider this the third and the fourth
constants are not there so it was 2 X 1
plus X 2 is less than 8 3 8 3 X 1 plus 3
X 2 is less than 8 it can be expanded
don't worry we will do that now they are
all less than sign so if they're less
than sign when you're going to solve it
using the matrix multiplication you want
to basically add the slack variables so
let the slack variables here there you
consider X 3 into X 4 we use a symbol of
s s 1 and s 2 so the first slack for
constraint 1 would be s 1
second slack for the second constraint
would be xed s2 and the corresponding
values of X 1 greater than 0 X 2 greater
than 0 remain but also the main remember
the slacks we will consider would also
be applicable for the fact that they are
also greater than zeros which means if
we had two variables and you're adding
one slack what you are doing is that you
are now going from a two dimension
problem to a three dimension problem and
the corresponding solution would be
obtained in the exactly the similar way
if we had a two dimensional problem same
movement from corner points to basic
feasible solution to one of the corner
points and take that direction with the
addition and subtraction for the object
function is maximum so now as you add
the slacks in the constraint similarly
the slacks would be added in the in the
objective function now see here very
interestingly actually we weren't the
slacks in the long run to be zero why
if equality sign comes for constraint
one curve one constraint to which means
that we are able to utilize all the
constraint to the maximum possible
extent without any loss and obtain the
maximization problem hence when I
formulate the maximization problem it
will be 3 X 1 plus 2 X 2 is there plus
the slacks if they were nonzero they
would definitely come that means they
would pull it down or pull it up
depending on whether you are looking at
the slack or the surplus I am using the
word surplus also here so it will be 3 X
1 plus 2 X 2 plus 0 into X 1 plus 0 into
X 2 as the objective function and when
you add the slacks and the surpluses in
the slacks in this problem it will be
converting the first constant into 2 X 1
plus X 2 plus s 1 is equal to 8 and the
second one would be 3 X 1 plus 3 X 2
plus s 2 is equal to 8 now what we have
now look M is 2 there are two equations
n is 4 now
because first one is so X matrix which
will have would have four elements
the first element is x1 the second
element in x2 third element is s1 fourth
element is s2 so if I put X 1 and X 2 as
0 s1 and s2 would be corresponding
values which you will obtain so you will
ask yourself whether that's a basic
feasible solutions to start the solution
because I do not know how this Optima or
non optimum I want to start my iteration
process so how you start the iteration
process I will consider that in the
problem but now initially you had a two
dimension problem now I work under a
four dimension problem we will have
matrix accordingly and proceed to solve
the problem accordingly thank you very
much and have a nice day
[Music]
[Music]
[Music]
