Ready Go lpp-2
Ready Go lpp-2
Place : Signature
Date : Name of Guide Designation
ACKNOWLEDGEMENT
USES
There are many uses of L.P. It is not possible to list them all here. However
L.P is very useful to find out the following:
Optimum number of crew in buses and trains to have minimum operating costs.
More than one solution exist, the objectives being to select the optimum
solution.
Additivity: Total resources are equal to the sum of the resources used in
individual activities.
DEFINITION OF TERMS
Big-M-method and
Two phase method.
ASSIGNMENT PROBLEM
Aim
The primary aim of the assignment problem is to find an optimal assignment of
n resources to n activities such that:
Mathematical Formulation:
Let x_ij be a binary decision variable such that: x_ij=1 if resource i is assigned
to activity j x_ij=0 otherwise
Let c_ij be the cost (or time, etc.) of assigning resource i to activity j.
Minimize Z=i=1∑nj=1∑ncijxij
While the assignment problem can be solved using the general simplex method
for linear programming, it has a highly degenerate structure, making the simplex
method inefficient for larger problems. A more efficient and specialized
algorithm for solving assignment problems is the Hungarian Algorithm. This
algorithm is based on the concept of reducing the cost matrix until an optimal
assignment can be identified.
Let's outline the steps for a minimization assignment problem. For maximization
problems, a slight modification is needed .
Step 1: Create the Cost Matrix Represent the problem as a square matrix
where rows represent resources and columns represent activities, and each cell
(i,j) contains the cost c_ij of assigning resource i to activity j. If the number of
resources and activities are not equal (unbalanced problem), add dummy rows or
columns with zero costs to make it a square matrix.
Step 2: Row Reduction For each row, identify the smallest element and
subtract this element from every element in that row. This will create at least
one zero in each row.
Step 3: Column Reduction For each column, identify the smallest element and
subtract this element from every element in that column. This will create at least
one zero in each column. (Note: If a column already contains a zero from the
row reduction step, the smallest element might be zero, in which case no change
occurs in that column.)
Step 4: Cover All Zeros with Minimum Number of Lines Draw the minimum
number of horizontal and/or vertical lines required to cover all the zeros in the
matrix.
If the minimum number of lines equals the order of the matrix (n), then an
optimal assignment can be made. Proceed to Step 6.
If the minimum number of lines is less than n, proceed to Step 5.
1. Identify rows/columns with a single zero. Mark that zero and cross out the
row and column it belongs to.
2. Continue this process until no more single zeros exist.
3. For remaining zeros, try to cover them efficiently. A common strategy is
to cover rows/columns that contain the most zeros.
Step 5: Create Additional Zeros (If Optimal Assignment Not Yet Possible)
If the number of lines is less than n:
1. Find the smallest uncovered element (an element not covered by any
line).
2. Subtract this smallest uncovered element from all uncovered elements.
3. Add this smallest uncovered element to all elements that are at the
intersection of two lines.
4. Elements covered by a single line remain unchanged.
5. Go back to Step 4 and repeat the line drawing process.
Step 6: Make the Optimal Assignment Once the number of lines equals n:
1. Examine rows one by one until a row with exactly one zero is found.
Mark this zero (assign it) and cross out the column containing this zero
(as this activity is now assigned).
2. Continue this process for all rows.
3. If a row has more than one zero, skip it for now and come back to it after
processing rows with single zeros.
4. After processing all rows, examine columns one by one following the
same logic (find columns with exactly one uncovered zero, mark it, and
cross out its row).
5. If there are still unassigned zeros, make arbitrary assignments, ensuring
that each row and column has exactly one assigned zero.
Step 7: Calculate the Total Optimal Cost Sum the original costs (c_ij from the
initial cost matrix) corresponding to the assigned zero.
Types of assignment problems
This is the most fundamental classification.
Aim: To assign resources to tasks in such a way that the total cost, total time,
total distance, or any other quantifiable measure to be minimized, is as low as
possible.
Aim: To assign resources to tasks such that the total profit, total efficiency, total
sales revenue, or any other quantifiable measure to be maximized, is as high as
possible.
3. Special Cases/Variations:
In summary, while the Hungarian Algorithm is the workhorse for solving the assignment
problem, understanding the specific type of problem—whether it's balanced or unbalanced,
minimization or maximization, or includes restrictions—is crucial for correctly setting up the
problem matrix and applying the algorithm effectively.
Transportation Problem
Mathematical Formulation
Let there be m origins, ith origin possessing 𝑎𝑖 units of certain product.
Let there be n destinations, with destination j requiring 𝑏𝑗 units of a
certain product. Let 𝑐𝑖𝑗 be the cost of shipping one unit from ith source to
let 𝑖𝑗be the amount to be shipped from ith source to jth destination it is
jth destination
assumed that the total availabilities Σai satisfy the total requirements Σbj
3- Column minima
The initial solution obtained by any of the five methods must satisfy the
following conditions:
(i) The solution must be feasible, i.e. it must satisfy all the supply and
demand constraints (also called rim conditions).
Step 2: (a) If allocation made in Step 1 is equal to the supply available at first
source (a1, in first row), then move vertically down to the cell (2, 1), i.e.,
second row and first column.
(b) If allocation made in Step 1 is equal to the demand of the first destination
(b1 in first column), then move horizontally to the cell (1, 2), i.e., first roNw
and second column. Apply Step 1 again for next allocation. (c) If a1 = b1,
allocate x11 = a1 or b1 and move diagonally to the cell (2, 2).
Step 3: Continue the procedure step by step till an allocation is made in the
south-east corner celle
Step 1: Select the cell with the lowest unit cost in the entire transportation
table and allocate as much as possible to this cell. Then eliminate (line out)
that row or column in which either the supply or demand is fulfilled. If a row
and a column are both satisfied simultaneously, then crossed off either a row
or a column. In case the smallest unit cost cell is not unique, then select the
cell where the maximum allocation can be made.
Step 2: After adjusting the supply and demand for all uncrossed rows and
columns repeat the procedure to select a cell with the next lowest unit cost
among the remaining rows and columns of the transportation table and
allocate as much as possible to this cell. Then crossed off that row and
column in which either supply or demand is exhausted.
Step 3: Repeat the procedure until the available supply at various sources and
demand at various destinations is satisfied. The solution so obtained need not
be non-degenerate.
Step 1: Calculate the penalties for each row (column) by taking the
difference between the smallest and next smallest unit transportation cost
in the same row (column). This difference indicates the penalty or extra
cost that has to be paid if decision-maker fails to allocate to the cell with
the minimum unit transportation cost.
Step 2: Select the row or column with the largest penalty and allocate as
much as possible in the cell that has the least cost in the selected row or
column and satisfies the rim conditions. If there is a tie in the values of
penalties, it can be broken by selecting the cell where the maximum
allocation can be made.
Step 3: Adjust the supply and demand and cross out the satisfied row or
column. If a row and a column are satisfied simultaneously, only one of
them is crossed out and the remaining row (column) is assigned a zero
supply (demand). Any row or column with zero supply or demand should
not be used in computing future penalties.
Maximize, z = 20 x1 + 9 x2 + 10 x3
Subject to 12 x1 + 3 x2 + 4 x3 ≤ 300
6 x1 + 4 x2 + x3 ≤ 225
3 x1 + x2 + 2 x3 ≤ 100
x1, x2, x3 ≥ 0
Where x1, x2 and x3 are structural variable and x4, x5, and x6 are stock variables
In order to simplify handling the educations in the problem, they can be placed
in a tabular form, known as a tableau. The initial tableau is given below
Qi =
Ci Basis P1 P2 P3 P4 P5 P6 P0 P oi
x oi
0 x4 1 3 4 1 0 0 300 25
2
0 x5 6 4 1 0 1 0 255 37.5
0 x6 3 1 2 0 0 1 100 33.3
Body Matrix Identity Matrix
cj 20 9 10 0 0 0
zj 0 0 0 0 0 0
∆ j = cj - zj 20 9 10 0 0 0
Starting with the left hand column in the above tableau, the C1 column contains
the contributions per unit for the basic variables x4, x5 and x6. The zero indicates that
the contribution per unit is zero. The reasoning is that no profits are made on unused
raw materials or labour. The second column, the basis, contains the variables in the
solution which are used to determine the total contribution. In the initial solution, no
products are being manufactured. This is represented in the c jth row for the column
under P0. Since no units are manufactured, the first solution is,
x1 = 0 x4 = 300
x2 = 0 x5 = 225
x3 = 0 x6 = 100
The body matrix consists of the coefficients for the real product (structural)
variables in the first simplex tableau represents the coefficients of the slack variables
that have been included to the original inequalities to make them equations.
Another way of defining the variables of the zj row is the contribution lost per unit
of the variables.
Simplex Tableau II
Qi =
Ci Basis P1 P2 P3 P4 P5 P6 P0 P oi
x oi
1 1
20 x4 1 ¼ /3 /12 0 0 25 100
5 -1
0 x5 0 /2 -1 /2 1 0 75 30
-1
0 x6 0 ¼ 1 /4 0 1 25 100
cj 20 9 10 0 0 0
20 20
zj 20 5 /3 /12 0 0
∆ j = cj - zj 0 4 10
/3 -20
/12 0 0
Qi =
Ci Basis P1 P2 P3 P4 P5 P6 P0 P oi
x oi
x4 13 7 -1 70 525
20 1 0 /30 /30 /10 0 /4
13
9 x5 0 1 -2
/5 -1
/5 2
/5 0 30 −75
0 11 -1 -1 70 175
0 x6 0 /10 /5 /10 1 /4
11
cj 20 9 10 0 0 0
76 43 8
zj 20 9 /15 /15 /5 0
∆ j = cj - zj 0 0 74
/15 -43
/15 -8
/5 0
Simplex Tableau IV
Qi =
Ci Basis P1 P2 P3 P4 P5 P6 P0 P oi
x oi
x4 103 -2 350
20 1 0 0 /33 0
330 33
x5 -3 4 400
9 0 1 0 /11 /11 0
11
-2 -1 175
0 x6 0 0 1 /11 /11 1
11
cj 20 9 10 0 0 0
65 38 148
zj 20 9 10
33 33 33
∆ j = cj - zj 0 0 0 −65 −38 −148
33 33 33
7000 5350
= +
33 11
77000+176550 253550
= =
363 363
= 698.4848
Z = 698.4848
Subject to, 12 y1 + 6 y2 + 3 y3 ≥ 20
3 y1 + 4 y2 + y3 ≥ 9
4 y1 + y2 + 2 y3 ≥ 10
y1, y2, y3 ≥ 0
Introducing surplus variables and artificial variable, the above problem can be restated
as follows:
Subject to, 12 y1 + 6 y2 + 3 y3 – y4 + y7 ≥ 20
3 y1 + 4 y2 + y3 – y5 + y8 ≥ 9
4 y1 + y2 + 2 y3 – y6 + y9 ≥ 10
y1, y2, y3 …. Y9 ≥ 0
Ci Basis P1 P2 P3 P4 P5 P6 P7 P8 P9 P0 Qi
ω y7 12 6 3 -1 0 0 1 0 0 20 5
/3
ω y8 3 4 1 0 -1 0 0 1 0 9 3
ω y9 4 1 2 0 0 -1 0 0 1 10 5
/2
cj 300 225 100 0 0 0 ω ω ω
zj 19ω 11ω 6ω −ω −ω −ω ω ω ω
19ω - 6ω -
zj-cj 11ω -225 −ω −ω −ω
300 100
300 y1 1 ½ -¼ - 1/12 0 0 1
/12 0 0 5
/3 20
/3
ω y8 0 5
/2 ¼ ¼ -1 0 -¼ 1 0 4 16
ω y9 0 -1 1 1
/3 0 -1 - /31
0 1 10
/3 10
/3→
cj 300 225 100 0 0 0 ω ω ω
75+ 7 7
3 5 ω - −ω −ω 25-
zj 300 150- ω ω 12 2 ω ω
2 4 25 ω
zj-cj 0 3 -25+ 7 −ω −ω 19 0 0
-75- ω 5 ω- 25-
2 ω 12 2
4 25 ω
↑
300 y1 1 ¾ 0 -1/6 0 ¼ 1
/6 0 -¼ 5
/6 10
/9
38
/33
ω y8 0 11
/4 0 1
/6 -1 ¼ -1/6 1 -¼ 19
/6
→
1 1 10
100 y9 0 -1 1 /3 0 -1 - /3 0 1 /3 -10/3
cj 300 225 100 0 0 0 ω ω ω
50 50
125+ - + -25+ + 25-
11 3 ω 6 ω
zj 300
ω 100 −ω ω
ω ω
4 4 4
4 6
zj-cj 0 -100+ 0 50 −ω -25+ 50 0 25-
11 - + ω - 5ω
ω 3 6
4 ω 4 7ω 4
↑ 4 6
17 3 2 7
3 2 1
300 y1 1 0 0 - /11 /11 /33 - - -
66 11 11 33
-
4 4 1
2 4
1 38
225 y8 0 1 0 /33 /11 - /11 - /33
11 33 11
-
100 y9 0 0 1 15
/33 4 - 10
/11 - 13
/11 4
/11 10
/11 148
/33
11
cj 300 225 100 0 0 0 ω ω ω
- -
300 400 175 350 400 175
zj 300 225 100 -
66 11 11 33 11 11
zj-cj - - 350 - 175 -
300 400 175 400
0 0 0 - 33 −. ω11
66 11 11 11
ω ω
Since all si ≤ 0, the optimal solution has been obtained in the above tableau. The optimal
−1 38 148
solution is y1= , y2 = and y3 =
33 33 33
−1 38 148
Minimize z* = 300 × + 225× +100 ×
33 33 33
= 698.4848
Z* = 698.4848
Limitations
1) There is no guarantee that linear programming will give integer valued equations.
For instance, solution may result in producing 8.291 cars. In such a situation, the
manager will examine the possibility of producing 8 as well as 9 cars and will take
a decision which ensures higher profits subject to given constraints. Thus, rounding
can give reasonably good solutions in many cases but in some situations we will
get only a poor answer even by rounding. Then, integer programming techniques
alone can handle such cases.
2) Under linear programming approach, uncertainty is not allowed. The linear
programming model operates only when values for costs, constraints etc. are
known but in real life such factors may be unknown.
3) The assumption of linearity is another formidable limitation of linear programming.
The objective functions and the constraint functions in the L.P model are all linear.
We are thus dealing with a system that has constant returns to scale. In many
situations, the input-output rate for an activity varies with the activity level. The
constraints in real life concerning business and industrial problems are not linearly
related to the variables, in most economic situations, sooner or later, the law of
diminishing marginal returns begins to operate. In this context, it can, however be
stated that non-linear programming techniques are available for dealing with such
situations.
4) Linear programming will fail to give a solution if management have conflicting
multiple goals. In L.P model, there is only one goal which is expressed in the
objective function.
Eg. maximizing the value of the profit function or minimizing he cost function, one
should resort to Goal programming in situations involving multiple goals.
All these limitations of linear programming indicate only one thing- that
linear programming cannot be made use of in all business problems. Linear
programming is not a panacea for all management and industrial problems. But for
those problems where it can be applied, the linear programming is considered a ver
useful and powerful tool.
ANALYSIS
Linear programming is a resources allocation model that seeks the best allocation
of limited resources to a number of competing activities. L.P has been applied with
considerable success to a multitude of practical problems.
Since the objective of any organization is to make the best utilization of the given
resources, linear programming provides powerful technique for effective utilization
of these given resources under certain well-defined circumstances. For instance, an
industrial process consists of a number of activities relating to the capital invested and
the capital required for operational activities, products to be produced and marketed,
raw materials to be used, machines to be utilized, products to be stored and consumed
or a combination of the above activities. Some or all of these activities are
interdependent and inter-related so that there are many ways where by these resources
can be allocated to various competing demands. Linear programming helps the decision
maker in arranging for such combination of resources which results in optimization of
objectives.
The simplex method shows that a corner point is essentially indentified by a basic
solution of the standard form of linear programming. The optimality and feasibility
conditions of the simplex method that, starting from a feasible corner point (basic
solution), the simplex method will move to an adjacent corner point which has the
potential to improve the value of the objective function. The maximum number of
iterations (basic solutions or corner points) until the optimum is reached is limited by
n!/[(n-m)!m!] in an n-variable m-equation standard L.P model.
The special case of alternative optima point to the desirable adoption of one
optimum solution over another, even though both may have the same optimum
objective value depending, for example, on the activity "mix" that each solution offers.
The optimum tableau offers more than just the optimum values of the variables.
Additionally, it gives the status and worth (shadow prices) of the different resources.
The sensitivity study shows the resources can be changed within certain limits while
maintaining the same activity mix in the solution. Also, the marginal profits/costs can
be changed within certain ranges without changing the optimum values of the variables.
Evaluation of the last row in the initial tableau represents the first step in the
computational procedure for the above maximization problem. The final row is the net
contribution that results firm adding one unit of variable (product) to the production.
The Cj+ Cj row reveals that the largest positive value 20. A plus value indicates that a
greater contribution can be made by the firm by the including this variable (product) in
the production activity. A negative value would indicate the amount at by which
contribution would decrease if one unit of the variable for that column were brought
into the solution. The largest positive amount in the last row (indicated by ↑ as an
inclusion variable) is selected as the optimum column, since we want to maximize the
total contribution. When no more positive values remain in the c j – zj row and the
values are zero or negative in a maximization problem, the total contribution is all its
greatest value.
Once the first simplex tableau has been constructed and the variable (key column) has
been selected which contributes the most per unit, the second step is to determine which
variable should be replaced. In other words, inspection of the key column indicates that
the variable x1 should be included in the product – mix, replacing one of the variable x 2,
x5 or x6. To determine which variable will be replaced, divide the value in the P 0 column
P oi
by the corresponding coefficient in the optimum column. That is, calculate Qi =
x oi
Select the row with the smallest non – negative quantity ( θ=min θi) as the row to be
replaced (indicated by →)
Having selected the key column and there placed row, we can now work on an
improved solution found in tableau II. The element common to the key column and the
replaced row is said to be pivotal element (indicated by ) and the elements common
to the key column and the remaining row are called intersectional elements.
In the next step, the first row (elements) to determine in the second tableau is the new x 1
(replacing) row for x4 (replaced) row. The elements of the x1 row are computed by
dividing each value in the replaced row(x 4) by the pivotal element. These become the
values for the first row x 1 in tableau . In our illustration, we divide the elements of x 4
row by 12 to get the new elements of x1 row.
The fourth and the final step in the computational procedure is to calculate all new
values for the remaining row(s). The formula for calculating these new elements of row
is:
( )
former element
¿ the remaining −¿
row
= (New Value)
For example, in our illustration, the first element (new) in the x5 row is = 6 - [6 ×1] = o
Similarly, the other elements in the x 5 row are calculated. Having completed the
computation of these values, we proceed to calculate the values for z j and ∆ j = cj – zj.
jn
The formula for calculation of zj is, z j =∑ c i x ij j = 1, 2, ……, n
i=1
Where xij are the elements of the body and the unit matrix for example, in tableau I;
zj = 20 × 1 + 0 + 0 = 20
These steps complete the computations involved for obtain the second tableau from
the first one.
We continue this process, when ∆ j are less than or equal to zero. If all ∆ j are less
than or equal to zero, then the computational procedure has come to an end and the
solution (basis) of the last tableau is the optimal solution. If one of the ∆ j is positive,
we shall have to compute the next tableau (in the same way as before: step 1 to 4) until
all ∆ j ' s are less than or equal to zero in our above example, since c j – zj (=∆ j)
corresponding to P1 column is large positive (4), we shall then compute the third, 4 th
and 5th simplex tableau in the same fashion.
METHODOLOGY
The method of this project is by collecting data as much as possible and analyzing
it. By this analysis, we can understand that importance and use of Linear Programming
Problem in mathematics. It is decided to observe and collect various books in our
library. Net sources, books and instruments are my teaching aids. We can conclude the
project by knowing the various purposes and brief sketch of linear programming.
CONCLUSION
From this project we came to a conclusion that 'Linear programming' is like a vast
ocean where many methods, advantages, uses, requirements etc. can be seen. Linear
programming can be done in any sectors where there is less waste and more profit. By
this, the production of anything is possible through the new methods of L.P. As we had
collected many datas about L.P, we came to know more about this, their uses,
advantages and requirements. Also, there are many different ways to find out the most
suitable L.P.
Also, we formulate an example for linear programming problem and done using the
two methods simplex method and dual problem. And came to a conclusion that L.P is
not just a technique but a planning the process of determining a particular plan of action
from amongst several alternatives. Even there are limitations, L.P is a good technique,
especially in the business sectors.