Below you will find our online calculator of the Big M method where you can solve linear programming problems easily and quickly. This tool has the same operation and aesthetics very similar to our online application of the two-phase simplex method.
How to use the Big M Method Calculator
To use our application, you must perform the following steps:
- Enter the number of variables and constraints of the problem.
- Select the type of problem: maximize or minimize.
- Enter the coefficients in the objective function and the constraints. You can enter negative numbers, fractions, and decimals (with point).
- Click on “Solve”.
- The online calculator will adapt the entered values to the standard form of the simplex algorithm and create the first table.
- Depending on the sign of the constraints, the normal simplex algorithm or the big M method is used.
- We can see step by step the iterations and tables of the exercise.
- In the last part will show the results of the problem.
It is important to emphasize that the Big M method is used to solve problems with constraints with equal and greater or equal signs. These types of constraints will add artificial variables to the standard linear programming model. If the problem only has less or equal sign constraints, the calculator will solve it with the traditional simplex method. In any case, our tool can solve any type of problem, be it minimization and/or maximization.
In the same way as in our previous calculator, for problems with over 20 variables, we recommend using some specialized software.
Solving an exercise with the Big M Method Calculator
Maximize 3X1 + 4X2
Subject to 2X1 + X2 ≤ 600
X1 + X2 ≤ 225
5X1 + 4X2 ≤ 1000
X1 + 2X2 ≥ 150
X1, X2 ≥ 0
We enter the number of variables and the number of restrictions and click on “Generate Model”:
In the following form, we select the objective and enter the coefficients of the objective function and the constraints:
Finally, we click on “Solve” and we will see the adaptation of the problem to the standard form and the iterations of the simplex table with the algorithm of the Big M method. For this example the explanation would be:
The problem will be adapted to the standard linear programming model, adding the slack, excess and / or artificial variables in each of the constraints:
- Constraint 1: It has a sign “≤” (less than or equal) so the slack variable will be added S1.
- Constraint 2: It has a sign “≤” (less than or equal) so the slack variable will be added S2.
- Constraint 3: It has a sign “≤” (less than or equal) so the slack variable will be added S3.
- Constraint 4: It has a sign “≥” (greater than or equal) so the excess variable S4 will be subtracted and the artificial variable A1 will be added.
The problem has artificial variables so we will use the Big M method. As the problem is one of maximization, the artificial variables will be subtracted from the objective function multiplied by a very large number (represented by the letter M) in this way the simplex algorithm will penalize them and eliminate them from the base.
The problem is shown below in standard form. The coefficient 0 (zero) will be placed where it corresponds to create our table:
Maximize: Z = 3X1 + 4X2 + 0S1 + 0S2 + 0S3 + 0S4 – MA1
2X1 + 1X2 + 1S1 + 0S2 + 0S3 + 0S4 + 0A1 = 600
1X1 + 1X2 + 0S1 + 1S2 + 0S3 + 0S4 + 0A1 = 225
5X1 + 4X2 + 0S1 + 0S2 + 1S3 + 0S4 + 0A1 = 1000
1X1 + 2X2 + 0S1 + 0S2 + 0S3 – 1S4 + 1A1 = 150
X1, X2, S1, S2, S3, S4, A1 ≥ 0
|Table 1||Cj||3||4||0||0||0||0||– M|
Enter the variable X2 and the variable A1 leaves the base. The pivot element is 2
|Table 2||Cj||3||4||0||0||0||0||– M|
Enter the variable S4 and the variable S2 leaves the base. The pivot element is 1/2
|Table 3||Cj||3||4||0||0||0||0||– M|
The optimal solution is Z = 900
X1= 0, X2= 225, S1= 375, S2= 0, S3= 100, S4= 300, A1= 0
We are sure that our online calculator of the Big M method will become your major ally for practicing this methodology and being successful in your exams and/or assignments.
We remind you that the objective of this tool is to learn the simplex method and the Big M, so the use that you can give it is exclusively under your responsibility. Also, we are not responsible for any errors or inaccuracies in the results.
If you have questions about it or find an error in our application, we will appreciate if you can write to us on our contact page.