Friday, September 4, 2020

Simplex Method for Minimize Objective


In this article steps of the Simplex Method for solving Linear Programming Problem for Minimizing Objective Function has been explained with the help of an example where all the constraints are of >= type.
 
Minimize Z= 4x1 + 3x2
Subject to,
200x1 + 100x2 >= 4000
   x1 +   2x2 >= 50
 40x1 +  40x2 >= 1400

x1, x2 >= 0

The first step is to convert the inequalities into equalities by subtracting surplus variables s1, s2 and s3 respectively.
 
The resulting equations are,
200x1 + 100x2 -s1 = 4000
   x1 +   2x2 -s2 = 50
 40x1 +  40x2 -s3 = 1400
Now, if we let x1 and x2 are zero, that implies s1= -4000, s2= -50 and s3= -1400 which is not possible as surplus variables cannot be negative. So, we need to set s1= s2= s3= 0 in the initial solution. So, we need to introduce artificial variables A1, A2, A3. We need to assume A1, A2 and A3 are very expensive and say price is M, where M is very large.
So, the LP problem now becomes,

Minimize Z= 4x1 + 3x2 + 0.s1 + 0.s2 + 0.s3 + M.A1 + M.A2 + M.A3
Subject to,

200x1 + 100x2 -s1 + A1 = 4000
   x1 +   2x2 -s2 + A2 = 50
 40x1 +  40x2 -s3 + A3 = 1400

x1, x2, s1, s2, s3, A1, A2, A3 >= 0

In the initial solution, assume that,

x1= x2= s1= s2= s3= 0

Table 1

__________________________________________________________________
Cj                     4    3    0    0    0    M    M    M
------------------------------------------------------------------
   Basic    Solution  x1   x2   s1   s2   s3   A1   A2   A3   Min
   Variable Variable                                        Ratio
CB  B        b(=Xb)                                        
------------------------------------------------------------------
M   A1      4000     200  100   -1   0    0    1    0    0   20
M   A2        50       1    2    0  -1    0    0    1    0   50
M   A3      1400      40   40    0   0   -1    0    0    1   35
------------------------------------------------------------------
Z=       Zj=⅀(CBi*aij)      241M 142M     -M    -M    -M      M     M      M
(CBi*XBi)       Cj - Zj     4-241M 3-142M    M     M     M      0     0      0
=5450M                           

Key Column  : x1 (Entering)  [ Highest -ve number in Cj - Zj ]
Key Row     : A1 (Departing) [ Lowest Min Ration ]
Key Element : 200



Table 2

__________________________________________________________________
Cj                     4    3    0       0   0   M   M    M
------------------------------------------------------------------
   Basic    Solution  x1   x2   s1       s2 s3  A1  A2   A3   Min
   Variable Variable                                        Ratio
CB  B        b(=Xb)                                        
------------------------------------------------------------------
4   x1        20       1    1   -1       0  0   -   0    0   40
                            2   200
M   A2        30       0    3   -1      -1  0   -   1    0   20
                             200
M   A3       600       0   20   1/5      0 -1   -   0    1   30
------------------------------------------------------------------
Z=       Zj=⅀(CBi*aij)        4    43M+2 39M    1    M    M    -    M      M
(CBi*XBi)                            2     150   50
=630M+80     Cj - Zj     0  1- 43M  1- 39M    1  M    M   -    0      0                                               2       150   50
                                  ↑

Key Column  : x2 (Entering)  [ Highest -ve number in Cj - Zj ]
Key Row     : A2 (Departing) [ Lowest Min Ratio ]
Key Element : 3/2





Table 3

__________________________________________________________________
Cj                     4    3    0      0    0   M  M   M
------------------------------------------------------------------
   Basic    Solution  x1   x2   s1      s2  s3  A1 A2  A3   Min
   Variable Variable                                        Ratio
CB  B        b(=Xb)                                        
------------------------------------------------------------------
4   x1        10       1    0   -1      1/3  0   -  -   0   30
                                300
3   x2        20       0    1   -1     -2/3  0   -  -   0  -Ve
                                300
M   A3       200       0    0   4/15   40/3 -1   -  -   1  15
------------------------------------------------------------------
Z=       Zj=⅀(CBi*aij)       4           3     4M 7        40M 2      -M                     M  
(CBi*XBi)                                 15  300    3    3  
 =200M+100     Cj - Zj       0      0  -4M 7       -40M 2     M                    0 
                                                                 15   300    3     3  
                                                  ↑

Key Column  : s2 (Entering)  [ Highest -ve number in Cj - Zj ]
Key Row     : A3 (Departing) [ Lowest Min Ratio ]
Key Element : 40/3

Note: Ignore the row if -ve min ratio found in the calculation of key row.



Table 4

__________________________________________________________________
Cj                     4    3    0      0    0    M  M   M
------------------------------------------------------------------
   Basic    Solution  x1   x2   s1      s2  s3   A1 A2  A3  
   Variable Variable                                       
CB  B        b(=Xb)                                        
------------------------------------------------------------------
4   x1         5       1    0   -1       0  1/40  -  -   - 
                                100
3   x2        30       0    1         0  -1    -  -   - 
                                100          20
0   s2        15       0    0   1/50     1 -3/40  -  -   - ------------------------------------------------------------------
Z=       Zj=⅀(CBi*aij)       4    3   -1/100   0  -1/20 
(CBi*XBi)                    
 =110     Cj - Zj             0    0    1/100   0   1/20
                                           


Observe that,
  1. All the artificial variables are reduced to zero(0), i.e. non-basic variables.
  2. All the entries in index row(Cj - Zj) are >= 0, implies no further reduction in cost is possible.

So, the optimal soultion is,
x1= 5,
x2= 30
with Z= 110

48 comments:

  1. Please mention your presence here (As Reply) in next 5 Minutes....

    ReplyDelete
  2. Write down content of this article in your notebook.
    After completion, please inform here (As Reply)....

    ReplyDelete
  3. Read the article.
    After completion of reading, please inform here (As Reply)....

    ReplyDelete
  4. If you have any query/ confusion/ question regarding this article, please mention each of them as separate Comment....

    ReplyDelete
  5. Typing error: In table 3 : "Key row : A2(Departing)"
    A2 will change to A3

    ReplyDelete
  6. Sir table 2 er 1st row,A1 column e value toh 1/200 instead of - (as the old value of A1 in 1st row was 1)
    Please explain.

    ReplyDelete
    Replies
    1. @Protik:
      What do you think from the example, what will be the value of A1 in table 2, '-' or '1/200'?

      Delete
    2. @Akash:
      What do you think from the example, what will be the value of A1 in table 2, '-' or '1/200'?

      Delete
    3. @Debasish:
      What do you think from the example, what will be the value of A1 in table 2, '-' or '1/200'?

      Delete
    4. Value of A1 in table 2 is -(1/200).

      Delete
    5. But because of A1 departing that why it will be -

      Delete
    6. @Sayan:
      What do you think from the example, what will be the value of A1 in table 2, '-' or '1/200'?

      Delete
    7. @Debasish:
      Yes, Think....
      I want to let you think....

      Delete
    8. The value of A1 will be nil because it is departing.

      Delete
    9. @Rahul:
      What do you think from the example, what will be the value of A1 in table 2, '-' or '1/200'?

      Delete
    10. @Dwaipayan:
      What do you think from the example, what will be the value of A1 in table 2, '-' or '1/200'?

      Delete
    11. value of A1 table should be 1/200 as we have divided whole row with key element in previous method..
      but here A1 is an artificial value that's why may be we are not considering the value of A1.

      Delete
    12. As I can observe that all the variables which are departing from the table you have marked as '-'. So, I thing it is a symbol that you have used to show that the variable has been departed.

      Delete
    13. Rahul is totally correct....
      For Artificial Variable, when it is departing, then, no need to further consider it....

      Delete
    14. Sorry sir, value of A1 in table 2 should be ' - ' because it is departing

      Delete
    15. So, Ritwik....
      Do you get the points "Others" observed against the question raised by you?....

      I think everyone in this class(including you) are trying hard to understand....
      No one is just copying the content....
      I think....

      Delete
    16. Yes sir...thank you all for the clarification.

      Delete
  7. Ritwik Banerjee chara sobar e lekha hoyegeche dekhchi....
    Ritwik er lekha hoyni ekhano??

    ReplyDelete
    Replies
    1. Sir i'm solving and writing the whole article.Unlike others who are just copying your article without even knowing the values how did it came from..

      Delete
    2. Very good....
      I can see you have performed 2nd step first, i.e. Reading the article(as from the documentation)....
      But, you did not completed writing yet, which was the first step....
      So, I am asking for....

      Copy First,
      Then Observe,
      Then Understand,
      Then only you can solve....

      Delete
    3. "Unlike others who are just copying your article without even knowing the values" -
      I disagree this statement....
      You are too little,
      in Knowledge,
      in Strategy,
      in experience,
      in responsibility....

      Which are essential for Judging Others....
      So, please do not make any thing as comment, that seems you as a Leader without any Political Sense....

      Focus on only your part....

      Delete
    4. Ok sir...i was being overexcited..Thank you for the advice.From now onwards i will try to write the article,then read it..

      Delete
  8. Sir, please explain the Zj portion in table 3

    ReplyDelete