0% found this document useful (0 votes)
34 views9 pages

Ca2 or

This document contains two linear programming problems solved using the Simplex Method. Q1 seeks to maximize Z = 60x1 + 50x2 subject to two constraints. Applying Simplex Method, the optimal solution is found to be Z = 1250, x1 = 30, x2 = 5, with slack variables s1 and s2 equal to 0. Q2 seeks to minimize Z = 4x1 + 8x2 + 3x3 subject to two constraints. Applying Simplex Method, the optimal solution is found to be Z = 6, x1 = 5/2, x2 = 1/2, x3 = 0, with slack variables s1 and s2 equal to 0 and
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views9 pages

Ca2 or

This document contains two linear programming problems solved using the Simplex Method. Q1 seeks to maximize Z = 60x1 + 50x2 subject to two constraints. Applying Simplex Method, the optimal solution is found to be Z = 1250, x1 = 30, x2 = 5, with slack variables s1 and s2 equal to 0. Q2 seeks to minimize Z = 4x1 + 8x2 + 3x3 subject to two constraints. Applying Simplex Method, the optimal solution is found to be Z = 6, x1 = 5/2, x2 = 1/2, x3 = 0, with slack variables s1 and s2 equal to 0 and
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

OperatiOn research (Or)

ca2 assignment

sessiOn 2023-2024

Name: Prosenjit Swarnakar

Stream: Computer Science & Engineering

Subject: Operation Research

Subject Code: OEC-CS701A

Semester: 7th

Year: 4th
cOntent

 Solve the following LPP models using Simplex Method:

Q1. Maximize Z = 60x1 + 50x2


x1 + 2x2 ≤ 40
3 x1 + 2x2 ≤ 60 ; x1, x2 ≥ 0

Q2. Minimize Z = 4x1 + 8x2 + 3x3


x1 + x2 ≥ 2
2 x1 + x3 ≥ 5 ; x1, x2, x3 ≥ 0
Q1. Maximize Z = 60x1 + 50x2
x1 + 2x2 ≤ 40
3 x1 + 2x2 ≤ 60 ; x1, x2 ≥ 0

Ans:
To solve this linear programming problem (LPP) using the Simplex
Method, we need to convert it into standard form by introducing slack
variables and then apply the Simplex Method to iteratively improve the
objective function value until we reach the optimal solution. The standard
form of a linear programming problem is as follows:

Maximize Z = c1x1 + c2x2 + ... + cnxn


Subject to:

1. a11x1 + a12x2 + ... + a1nxn ≤ b1


2. a21x1 + a22x2 + ... + a2nxn ≤ b2
...
m. am1x1 + am2x2 + ... + amnxn ≤ bm
3. xi ≥ 0 for i = 1, 2, ..., n

In your case, we have the following problem:

Maximize Z = 60x1 + 50x2


Subject to:

1. x1 + 2x2 ≤ 40
2. 3x1 + 2x2 ≤ 60
3. x1, x2 ≥ 0

Now, let's set up the initial simplex table:

Basis x1 x2 s1 s2 RHS

s1 1 2 1 0 40

s2 3 2 0 1 60

Z -60 -50 0 0 0

Page 1
Now, we'll perform the Simplex Method steps to find the optimal solution:

1. Identify the pivot column: Choose the column with the most negative
value in the Z row. In this case, the pivot column is x1 (with -60).

2. Identify the pivot row: Calculate the ratios of the right-hand side (RHS)
to the values in the pivot column for each row. Choose the row with the
smallest non-negative ratio. The pivot row is s1 (with a ratio of 40/1 = 40).

3. Pivot: Make the pivot element (the element at the intersection of the
pivot row and pivot column) equal to 1. To do this, divide the pivot row by
the pivot element (which is 1 in this case):

New s1 row: (1/1) * s1

4. Eliminate other entries in the pivot column: Make all other entries in the
pivot column equal to 0. To do this, perform row operations to eliminate
the other entries. Adjust all rows as follows:

New s2 row: s2 - 3 * (1/1) * s1


New Z row: Z - (-60) * (1/1) * s1

Now, we have the following simplex table:

Basis x1 x2 s1 s2 RHS

x1 1 2 1 0 40

s2 0 -4 -3 1 -20

Z 0 10 60 0 2400

Now, let's continue with the next iteration:

1. Identify the pivot column: Choose the column with the most negative
value in the Z row. In this case, the pivot column is x2 (with 10).

Page 2
2. Identify the pivot row: Calculate the ratios of the right-hand side (RHS)
to the values in the pivot column for each row. Choose the row with the
smallest non-negative ratio. The pivot row is s2 (with a ratio of 20/4 = 5).

3. Pivot: Make the pivot element (the element at the intersection of the
pivot row and pivot column) equal to 1. To do this, divide the pivot row by
the pivot element (which is 4 in this case):

New s2 row: (1/4) * s2

4. Eliminate other entries in the pivot column: Make all other entries in the
pivot column equal to 0. To do this, perform row operations to eliminate
the other entries. Adjust all rows as follows:

New x2 row: x2 - 2 * (1/4) * s2


New s1 row: s1 - (1/4) * s2
New Z row: Z - 10 * (1/4) * s2

Now, we have the following simplex table:

Basis x1 x2 s1 s2 RHS

x1 1 0 1/2 -1/4 30

x2 0 1 -3/8 1/8 5

Z 0 0 25/4 -5/4 1250

Now, all coefficients in the Z row are non-negative, and we've reached the
optimal solution. The optimal solution is:

Z = 1250
x1 = 30
x2 = 5
s1 = 0
s2 = 0

Page 3
So, the maximum value of Z is 1250, and the values of x1 and x2 that
achieve this maximum are 30 and 5, respectively. The slack variables s1
and s2 are both equal to 0 in the optimal solution.

______________________________________________

Q2. Minimize Z = 4x1 + 8x2 + 3x3


x1 + x2 ≥ 2
2x1 + x3 ≥ 5 ; x1, x2, x3 ≥ 0

Ans:
To solve this linear programming problem (LPP) using the Simplex
Method, we first need to convert it into standard form by introducing
slack variables and then apply the Simplex Method to iteratively improve
the objective function value until we reach the optimal solution. The
standard form of a linear programming problem is as follows:

Minimize Z = c1x1 + c2x2 + ... + cnxn


Subject to:

1. a11x1 + a12x2 + ... + a1nxn + s1 = b1


2. a21x1 + a22x2 + ... + a2nxn + s2 = b2
...
m. am1x1 + am2x2 + ... + amnxn + sm = bm

3. xi, si ≥ 0 for i = 1, 2, ..., n

where:
 Z is the objective function to be minimized.
 c1, c2, ..., cn are the coefficients of the decision variables x1, x2, ..., xn in
the objective function.
 aij are the coefficients of the decision variables in the constraint
equations.
 s1, s2, ..., sm are slack variables introduced to convert inequalities to
equalities.
 b1, b2, ..., bm are the right-hand sides of the constraints.
 xi are the decision variables, and si are the slack variables.

Page 4
In your case, we have the following problem:

Minimize Z = 4x1 + 8x2 + 3x3


Subject to:

1. x1 + x2 - s1 = 2
2. 2x1 + x3 - s2 = 5
3. x1, x2, x3, s1, s2 ≥ 0

Now, let's set up the initial simplex table:

Basis x1 x2 x3 s1 s2 RHS

s1 1 1 0 -1 0 2

s2 2 0 1 0 -1 5

Z -4 -8 -3 0 0 0

Now, we'll perform the Simplex Method steps to find the optimal solution:

1. Identify the pivot column: Choose the column with the most negative
value in the Z row. In this case, the pivot column is x1 (with -4).

2. Identify the pivot row: Calculate the ratios of the right-hand side (RHS)
to the values in the pivot column for each row. Choose the row with the
smallest non-negative ratio. The pivot row is s1 (with a ratio of 2/1 = 2).

3. Pivot: Make the pivot element (the element at the intersection of the
pivot row and pivot column) equal to 1. To do this, divide the pivot row by
the pivot element (which is 1 in this case):

New s1 row: (1/1) * s1

4. Eliminate other entries in the pivot column: Make all other entries in the
pivot column equal to 0. To do this, perform row operations to eliminate
the other entries. Adjust all rows as follows:

New s2 row: s2 - 2 * (1/1) * s1


New Z row: Z - (-4) * (1/1) * s1
Page 5
Now, we have the following simplex table:

Basis x1 x2 x3 s1 s2 RHS

x1 1 1 0 -1 0 2

s2 0 -2 1 2 -1 1

Z 0 4 -3 4 0 8

Now, we continue with the next iteration:

1. Identify the pivot column: Choose the column with the most negative
value in the Z row. In this case, the pivot column is x2 (with 4).

2. Identify the pivot row: Calculate the ratios of the right-hand side (RHS)
to the values in the pivot column for each row. Choose the row with the
smallest non-negative ratio. The pivot row is s2 (with a ratio of 1/2).

3. Pivot: Make the pivot element (the element at the intersection of the
pivot row and pivot column) equal to 1. To do this, divide the pivot row by
the pivot element (which is -2 in this case):

New s2 row: (1/2) * s2

4. Eliminate other entries in the pivot column: Make all other entries in the
pivot column equal to 0. To do this, perform row operations to eliminate
the other entries. Adjust all rows as follows:

New x2 row: x2 - (1/2) * (1/2) * s2


New s1 row: s1 - (1/2) * (-1/1) * s2
New Z row: Z - 4 * (1/2) * s2

Now, we have the following simplex table:


Basis x1 x2 x3 s1 s2 RHS

x1 1 0 -1/4 0 1/2 5/2

s2 0 1 -1/4 1 -1/2 1/2

Z 0 0 5/2 2 2 6

Page 6
Now, all coefficients in the Z row are non-negative, and we've reached
the optimal solution. The optimal solution is:

Z=6
x1 = 5/2
x2 = 1/2
x3 = 0
s1 = 0
s2 = 1/2

So, the minimum value of Z is 6, and the values of x1, x2, and x3 that
achieve this minimum are 5/2, 1/2, and 0, respectively. The slack variables
s1 and s2 are 0 and 1/2 in the optimal solution.

________****________

Page 7

You might also like