Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

AAMM Assignment 2

Submitted to: Dr. Rajani Jain

Submitted by: Jigyasa Sharma

Acknowledgment
I would like to express my special thanks to my faculty, Dr. Rajani Jain, who gave me
the golden opportunity to do this wonderful project which also helped me in doing a
lot of research and I came to know about so many new things that would help me in
my future career. I thank mam again for sharing such complex ideas and concepts
beautifully within the limited time frame. I am also grateful to my parents and friends
for giving helpful criticisms in finalizing the project and providing necessary
resources.

Thank you,
Jigyasa
BFT-VII
Q1. In a transportation problem, the distribution given in the table below was
suggested as an
optimal solution. The capacities and requirements are given. The number in
bold and bracket are allocations. The transportation costs are given in Rs, per
unit from a source to a destination.
Test whether the given distribution is optimal?
Warehous Warehouse Warehouse Supply
e W1 W2 W3
Factory F1 6 (20) 4 (30) 1 50
Factory F2 3 8 (40) 7 40
Factory F3 4 4 (25) 2 (35) 60
Demand 20 95 35

Solution
In order to test whether the solution is optimal, we can use the UV method. For the
U-V method, the values ui and vj have to be found for the rows and the columns
respectively. As there are three rows so three ui values have to be found i.e. u1 for
the first row, u2 for the second row, and u3 for the third row. Similarly v1, v2, v3 for
the columns. There is a separate formula to find ui and vj, ui + vj = Cij where Cij is
the cost value only for the allocated cell.
transportation cost= 6*20+4*30+8*40+4*25+2*35= 730

Let's find Ui and Vj for which Ui+Vj=Cij


Considering v2=0

U1=4 V1=2
U2=8 V2=0
U3=4 V3=-2

finding delta ij = Cij - (Ui+Vj) for unoccupied cells

del21=C21-(U2+V1)=3-(8+2)=-7

del31=C31-(U3+V1)=4-(4+2)=-2

del13=C13-(U1+V1)=1-(4+2)=-5

del23=C23-(U1+V3)=7-(4+(-2))=9
since delij is not greater than zero, the solution is not optimal.

Q2 The different stages of a project are given below with their respective
duration.
Stage Duration
From (Weeks)
to
0-1 3
1-2 8
1-3 12
2-4 6
2-5 3
3-4 3
3-6 8
4-7 5
5-7 3
6-7 8
(i) Draw an arrow diagram (network) representing the given Project.
(ii) Find the Critical Path and the Assembly Duration.

Solution

● Path 1: A+B+E+I = 3+8+3+3 = 17 weeks


● Path 2: A+B+D+H = 3+8+6+5 = 22 weeks
● Path 3: A+C+F+H = 3+12+3+5 = 23 weeks
● Path 4: A+C+G+J = 3+12+8+8 = 31 weeks
As the critical path is the longest path in the network, 31 weeks, is the critical path.

Q3. Consider the problem involving 3 sources and four destinations as


given below.
source 1 2 3 4 supply
1 3 1 7 4 300
2 2 6 5 9 400
3 8 3 3 2 500
demand 250 350 400 200
Obtain the initial basic feasible solution and then check for optimality.

Solution

We will consider the solution using Least Cost Cell Method

According to the Least Cost Cell method, the least cost among all the cells in the
table has to be found which is 1 (i.e. cell (S1, D2)).
Now check the supply from row S1 and demand for column D2 and allocate the
smaller value to the cell.
The smaller value is 300 so allocate this to the cell.
The supply from S1 is completed so cancel this row and the remaining demand for
column D2 is 350 – 300 = 50.

Similarly, we can find the next smallest digit among the cells and check for the
demand and supply. Allocate the smallest value and delete that row or column. So
next we do,
➢ (S2, D1): Allot 250 and delete the column.
➢ (S3, D4): Allot 200 and delete the column
➢ (S3, D2): Allot 50 and delete the column

Finally to balance the supply and demand, allot the numbers accordingly.

Now just multiply the cost of the cell with their respective allocated values and add all of
them to get the basic solution

i.e. (300 x 1) + (250 x 2) + (150 x 5) + (50 x 3) + (250 x 3) + (200 x 2) = 2850

CHECK FOR OPTIMALITY - UV METHOD

Checking eligibility of the problem ➢ m + n - 1 = 3 + 4 - 1 = 6 (Valid since 6 cells are allocated


values).

Now to find the value for u and v we assign any of the three u or any of the four v as
0. Let us assign u1 = 0 in this case. Apply the formula ui + vj = Cij for the base
variable. The equations will be as follows: For the basic variables (the ones that are
allocated in this problem): u1 = 0 ui + vj = Cij where Cij is the cost value only for the
allocated cell.
➢ X12 = u1 + v2 = 1; v2 = 1
➢ X21 = u2 + v1 = 2; v1 = -2
➢ X23 = u2 + v3 = 5; u2 = 4
➢ X32 = u3 + v2 = 3; u3 = 2
➢ X33 = u3 + v3 =3; v3 = 1
➢ X34 = u3 + v4 = 2; v4 = 0
For non basic variables we follow the equation; Pij = ui + vj – Cij
➢ X11 = u1 + v1 - 3; 0-2-3 = -5
➢ X13 = u1 + v3 - 7; 0+1-7 = -6
➢ X14 = u1 + v4 - 4; 0+0 - 4 = -4
➢ X22 = u2 + v2 - 6; 4+1-6 = -1
➢ X24 = u2 + v4 - 9; 4+0-9 = -5
➢ X31 = u2 + v2 - 8; 2-2-8 = -8
According to the UV Method rule if we get all the penalties values as zero or negative values
that means the optimality is reached and this answer is the final answer. Since all the values
are negative, we can be sure that this answer is optimum.

Q4. The Processing Time in hours for the jobs when allocated to the different
machines are indicated below. Assign the machines for the jobs so that the
total processing time is Minimum.
Machines
M1 M2 M3 M4 M5
J1 9 22 58 11 19
J2 43 78 72 50 63
JOBS J3 41 28 91 37 45
J4 74 42 27 49 39
J5 36 11 57 22 25

Solution

We will approach this question using the Hungarian method. Initially check if the matrix is a
square or not. The number of columns should be equal to the number of rows.
Here Rows = 5 and Columns = 5
Since it is a square, we can proceed without any dummy rows.
Subtract the minimum value from each row and each column so that there is at least a single
0 in each row and column. The final Matrix after row subtraction is given below

JOBS MACHINES

M1 M2 M3 M4 M5

J1 0 13 49 2 10

J2 0 35 29 7 20

J3 13 0 63 9 17

J4 47 15 0 22 12
J5 25 0 46 11 14

After Column Subtraction


JOBS MACHINES

M1 M2 M3 M4 M5

J1 0 13 49 2 10

J2 0 35 29 7 20

J3 13 0 63 9 17

J4 47 15 0 22 12

J5 25 0 46 11 14
After Initial elimination and assigning “0” we get the matrix below.

But Columns M4 and M5 have no assigned “0” hence we need to move to the next step. We
proceed as follows, in the Hungarian method:
➢ We find the smallest element in the matrix not covered by any of the lines. It is 2 in this
case.
➢ We subtract the number ‘2’ from all the uncovered elements and add it to the elements at
the intersection of the two lines.
➢ Other elements covered by the lines remain unchanged.
The new matrix is as follows.

➢ We follow the initial steps again and try to assign “0” in every column and row.
But again we cannot assign a “0” in column M5 and row J5. We follow the steps again. ➢
Find the smallest number, (2 here) in the uncovered cells, and add it to intersection points
and subtract them from uncovered cells.

The final matrix looks like this:

JOBS MACHINES

M1 M2 M3 M4 M5

J1 4 17 51 0 0

J2 0 35 27 1 6

J3 13 0 61 3 3

J4 49 17 0 18 0

J5 25 0 44 5 0

N= 5

Number of lines drawn to cover all the zeroes = 5


Order of the matrix = 5
So, we can form an assignment (an optimal solution)

Jobs Machines

J1 M4

J2 M1

J3 M2

J4 M3
J5 M5

Minmum (Total time) = 11 + 43+ 28+ 27+ 25

Min time = 134 Hrs

Q5. A company has six machines that can process six different jobs. The
processing time( min)of different jobs by different machines is given. Find the
optimal assignment of jobs to machines such that the total processing time is
minimized.

A B C D E F
1 10 15 12 18 14 13
2 17 14 22 16 19 20
3 12 15 13 8 12 9
4 11 16 15 22 21 18
5 13 10 17 19 15 10
6 15 8 14 25 16 18

Solution

We will approach this question using the Hungarian method. Initially check if the
matrix is a square or not. The number of columns should be equal to the number of
rows. Here Rows = 6 and Columns = 6 Since it is a square, we can proceed without
any dummy rows. ➢ Subtract the minimum value from each row and each column
so that there is at least a single 0 in each row and column. The final Matrix is given
below

After row subtraction

JOBS MACHINES

A B C D E F
J1 0 5 2 8 4 3

J2 3 0 8 2 5 6

J3 4 7 5 0 4 1

J4 0 5 4 11 10 7

J5 3 0 7 9 5 0

J6 7 0 6 17 8 10

After Column Subtraction

MACHINES

A B C D E F

J1 0 5 0 8 0 3

JOBS J2 3 0 6 2 1 6

J3 4 7 3 0 0 1

J4 0 5 2 11 6 7

J5 3 0 5 9 1 0

J6 7 0 4 17 4 10

After the Initial elimination, we get the below matrix


But Column E has no assigned “0” hence we need to move to the next step. We
proceed as follows, in the Hungarian method:

➢ We find the smallest element in the matrix not covered by any of the lines. It is 1
in this case.

➢ We subtract the number ‘1’ from all the uncovered elements and add it to the
elements at the intersection of the two lines.

➢ Other elements covered by the lines remain unchanged.

MACHINES

A B C D E F

J1 1 6 0 8 0 4

JOBS J2 3 0 5 1 0 6

J3 5 8 3 0 0 2

J4 0 5 1 10 5 7

J5 3 0 4 8 0 0

J6 7 0 3 15 3 10

JOBS MACHINES

A B C D E F

J1 1 6 0 8 0 4

J2 3 0 5 1 0 6
J3 5 8 3 0 0 2

J4 0 5 1 10 5 7

J5 3 0 4 8 0 0

J6 7 0 3 15 3 10

Since each row and each column of this matrix has one and only one assigned 0,

Jobs Machines

J1 M- C

J2 M- E

J3 M- D

J4 M- A

J5 M- F

J6 M- B

we obtain the optimum assignment schedule as follows: 1 - C; 2 - E; 3 - D; 4 - A; 5 - F; 6 - B


Thus, the minimum time taken by the machines to finish the work is 12+19+8+11+10+8 = 68
minutes.

Min time = 68 Hrs

Q6. A Company faces the problem of assigning four salesmen to four


territories for promoting its Sales. The following table gives the expected
annual sales (in thousands of Rupees) for each salesman if assigned to
various territories.

Territory
A B C D
1 60 50 40 30
2 40 30 20 15
Salesman 3 40 20 35 10
4 30 30 25 20
Assign Salesmen to territories to maximize the profit.
Solution
Aim: To assign such that the sales and profit are maximum.

Solution We approach this problem with the Hungarian Algorithm of


Assignment

a b c d

1 60 50 40 30

2 40 30 20 15

3 40 20 35 10

4 30 30 25 20

After Row minimization

a b c d

1 30 20 10 0

2 25 15 5 0

3 30 10 25 0

4 10 10 5 0

Subtract the column minima from each column

a b c d

1 10 5 0
20

2 15 5 0 0

3 20 0 20 0

4 0 0 0 0

Since here we need to maximize instead of minimizing, we start off with assigning the largest
no. of the row/column with least no. of zeros
1 at A 2 at B 3 at C 4 at D

Now the total annual revenue generated is the maximum with this assignment, that is,
145 thousand of rupees.

You might also like