Examples 4-Operation Research-Handouts, Lecture notes of Operational Research

Operations Research (OR) refers to the science of decision making. This course elaborate like linear, nonlinear and discrete optimization. This lecture handout was provided by Sir Avikshit Gupte. It includes: Example, Minimize, Element, Problem, Represented, Matrix, Assignment, Subtract, Column, Ensure

Typology: Lecture notes

2011/2012

Uploaded on 08/06/2012

anagha
anagha 🇮🇳

4.4

(44)

129 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Example 1
Solve the following assignment problem to minimize the total cost represented as elements in the matrix
(cost in thousand rupees).
Contractor
Building
1
2
3
4
A
48
48
50
44
B
56
60
60
68
C
96
94
90
85
D
42
44
54
46
Solution:
STEP 1: Choose the least element in each row of the matrix and subtract the same from all the elements in each row
so that each row contains atleast one zero. Thus we have table 12.
Table 12
Contractor
Building
1
2
3
4
A
4
4
6
0
B
0
4
4
12
C
11
9
5
0
D
0
2
12
4
STEP 2: Choose the least element in each column and subtract the same from all the elements in that column to
ensure that there is atleast one zero in each column. Thus we have table 13.
Table 13
Contractor
Building
1
2
3
4
A
4
2
2
0
B
0
2
0x
12
C
11
7
1
0x
D
0x
0
8
4
STEP 3: We make the assignment in each row and column as explained previously. This results in table 1
Table 14
Contractor
Building
1
2
3
4
A
4
2
2
0
B
0
2
0x
12
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Examples 4-Operation Research-Handouts and more Lecture notes Operational Research in PDF only on Docsity!

Example 1

Solve the following assignment problem to minimize the total cost represented as elements in the matrix (cost in thousand rupees).

Contractor Building^1 2 3 A 48 48 50 44 B 56 60 60 68 C 96 94 90 85 D 42 44 54 46

Solution:

STEP 1 : Choose the least element in each row of the matrix and subtract the same from all the elements in each row so that each row contains atleast one zero. Thus we have table 12. Table 12

Contractor Building^1 2 3 A 4 4 6 0 B 0 4 4 12 C 11 9 5 0 D 0 2 12 4

STEP 2 : Choose the least element in each column and subtract the same from all the elements in that column to ensure that there is atleast one zero in each column. Thus we have table 13.

Table 13

Contractor Building 1 2 3 4

A 4 2 2 0

B 0 2 0x 12

C 11 7 1 0x

D 0x 0 8 4

STEP 3 : We make the assignment in each row and column as explained previously. This results in table 1

Table 14

Contractor Building 1 2 3 4

A 4 2 2 0

B 0 2 0x 12

C 11 7 1 0x

D 0x 0 8 4

Here we have only three assignments. But we must have four assignments. With this maximal assignment we have to draw the minimum number of lines to cover all the zeros. This is carried out as explained in steps 4 to 9. Refer table 15.

Table 15

Contractor Building^1 2 3

A 4 2 2 0

B 0 2 0x 12

C 11 7 1 0x

D 0x 0 8 4

STEP 4 : Mark ( ) the unassigned row (row C).

STEP 5 : Against the marked row C, look for any 0 element and mark that column (column 4).

STEP 6 : Against the marked column 4, look for any assignment and mark that row (row A).

STEP 7 : Repeat steps 6 and 7 until the chain of markings ends.

STEP 8 : Draw lines through all unmarked rows (row B and row D) and through all marked columns (column 4). (Check: There should be only three lines to cover all the zeros.)

STEP 9 : Select the minimum from the elements that do not have a line through them. In this example we have 1 as the minimum element, subtract the same from all the elements that do not have a line through them and add this smallest element at the intersection of two lines. Thus we have the matrix shown in table 16.

Table 16

Contractor Building 1 2 3 4

A 3 1 1 0

B 0 2 0x 13

C 10 6 0 0x

D 0x 0 8 5

STEP 10 : Go ahead with the assignment with the usual procedure. This is carried out in the table 16. Thus we have four assignments.

Building A is alloted to contractor 4

Flight No. Karachi to Islamabad 1 7.00 a.m. 9.00 a.m. 2 9.00 a.m. 11.00 a.m. 3 1.30 p.m. 3.30 p.m. 4 7.30 p.m. 9.30 p.m.

Flight No. Islamabad to Karachi 101 9.00 a.m. 11.00 a.m. 102 10.00 a.m. 12.00 Noon 103 3.30 p.m. 5.30 p.m. 104 8.00 p.m. 10.00 p.m.

Solution:

STEP 1 : We prepare a matrix in which all the flights reaching Islamabad are paired with flights with No's 101, 102, 103 and 104. The elements in the matrix represent the time taken (hrs) by Karachi based crew in Islamabad. Refer table 17.

Flight No. 101 102 103 104 1 24 25 6.5 11 2 22 23 28.5 9 3 17.5 18.5 24 28. 4 11.5 12.5 18 22.

Explanation: The crew in the first flight No. 1 leaving Karachi arrives at Islamabad at 9.00 a.m. If the crew is to return by flight No. 101, it is not possible on the same day and it has to stay for 24 hours (layover time). Similarly to return by flight No. 102, 103 and 104, the same crew takes 25 hours, 6.5 hours, 11 hours respectively. In the same way we calculate the time spent by the crew in flights 2, 3 and 4 to pair with flights with No. 101, 102, 103 and 104. This is shown in Table 17.

STEP 2 : We prepare a matrix in which all the flights reaching Karachi are paired with flights with numbers 1,2, and 4. The elements in the matrix indicate the time spent by Islamabad based crew in Karachi. This is shown in table 18.

Table 18

Flight No. 101 102 103 104 1 20 19 13.5 9 2 22 21 15.5 11 3 26.5 25.5 20 15. 4 8.5 7.5 26 21.

STEP 3 : Comparing the corresponding elements of the two matrices (tables 17 and 18), we choose the minimum element and indicate the base at the top of the element (Karachi base-D, Islamabad base-C,). Thus we prepare the table 19. If the crew is placed in either city it is denoted by *.

Flight No. 101 102 103 104 1 12.5 12.5 0 26 2 11 11 5.5 0 3 0 2 3.5 0 4 0 0 10.5 15

We assign rowwise and then columnwise. We have the table 24

Table 24

Flight No. 101 102 103 104

3 0 2 3.5 0x

4 0x 0 10.5 15

The result can be given as,

Flight no. 1 is paired with 103 with base at Karachi. Flight no. 2 is paired with 104 with base at Karachi. Flight no. 3 is paired with 101 with base at Karachi. Flight no. 4 is paired with 102 with base at Islamabad.

MAXIMIZATION IN ASSIGNMENT MODEL

The problem of maximization is carried out similar to the case of minization making a slight modification. The required modification is to multiply all elements in the matrix by -1, based on the concept that minizing the negative of a function is equivalent to maximize the original function. This case is illustrated in the following example.

Example : Six salesmen are to be allocated to six sales regions. The earning of each salesman at each region is given below. How can you find an allocation, so that the earnings will be maximum?

Region

Salesman 1 2 3 4 5 6 A 15 35 0 25 10 45 B 40 5 45 20 15 20 C 25 60 10 65 25 10 D 25 20 35 10 25 60 E 30 70 40 5 40 50 F 10 25 30 40 50 15 (Figure are in Rs. 1000)

Solution: In this problem the objective is to maximize the earnings of six salesmen sent to different regions. The first step is to multiply all the elements by (-1) and apply the method for minimization. So we have the starting table as shown in table 25.

Table 25

Salesman

Region 1 2 3 4 5 6 A -^15 -^35 0 -^25 -^10 -^45 B -^40 -^5 -^45 -^20 -^15 -^20 C -^25 -^60 -^10 -^65 -^25 -^10 D -^25 -^20 -^35 -^10 -^25 -^60 E -^30 -^70 -^40 -^5 -^40 -^50 F -^10 -^25 -^30 -^40 -^50 -^15

The second step is to follow the procedure of subtracting the least element from each row and then in each column to ensure that there is atleast one zero in each row and in each column. This is presented in tables 26 and 27.

Table 26

Region Salesman 1 2 3 4 5 6 A^30 10 45 20 35 B^5 40 5 25 30 C^40 5 55 0 40 D^35 40 25 50 35 E^40 0 30 65 30 F^40 25 20 10 0

Table 27

Region Salesman 1 2 3 4 5 6 A^25 10 45 20 35 B^0 40 0 25 30 C^35 5 55 0 40 D^30 40 25 50 35 E^35 0 30 65 30 F^35 25 20 10 0

The third step is to assign salesmen to regions and test for optimality with the usual method as in table 28.

Table 28

Region Salesman 1 2 3 4 5 6

First iteration Table 29

Salesman Region 1 2 3 4 5 6 A 15 0x 35 10 25 0x

B 0 40 0x 25 30 35

C^35 5 55 0^40

D 20 30 15 40 25 0

E 35 0 30 65 30 30

F^35 25 20 10 0^45

Second iteration Table 30

Salesman Region 1 2 3 4 5 6 A 5 0x 25 0x 15 0x

B 0 50 0x 25 30 45

C^35 15 55 0^40

D 10 30 5 30 15 0

E 25 0 30 55 20 30

F^35 35 20 10 0^55

Third iteration Table 31

Salesman Region 1 2 3 4 5 6

A 0 0x 20 5 10 0x

B 0x 55 0 30 30 45

C 30 15 50 0 35 75

D^5 30 0x^30 10 0

E 20 0 15 55 15 30

F^35 40 20 15 0^60

IMPOSSIBLE ASSIGNMENT

Sometimes in an assignment model we are not able to assign some jobs to some persons. For example if machines are to be allocated to locations and if a machine cannot be accommodated in a particular location, then it i

an impossible assignment. To solve the problem in such situations we attach a very highly prohibited (say ) cost to the cell in the matrix so that there is absolutely no chance to get the assignment with infinite cost in the optimal solution.

Example

The processing times in hours for the jobs when allocated to the different machines are indicated below. When a job is not possible to be made in a particular manner, it is indicated as '-'

Jobs

Machine I II III IV V A 3 - 8 - 8 B 4 7 15 18 8 C 8 12 - - 12 D 5 5 8 3 6 E 10 12 15 10 -

Allocate the machines for the jobs so that the total processing time is minimum.

Solution:

We have the impossible assignments marked as -. We introduce deliberately a high prohibitive time (say ) in those places and proceed with the usual steps of solution procedure for assignment problem. Thus we have the table 32. Table 32

Jobs

Machine I II III IV V A^3  8  8 B 4 7 15 18 8 C (^8 12)   12 D 5 5 8 3 6 E (^10 12 15 10) 

Reducing the matrix in rows and columns so as to have atleast one zero in each row and in each column, we have the following tables 33 and 34

Table 33

Jobs

Machine I II III IV V A (^0)  8  5 B^0 3 11 14 C^0 4   4 D 2 2 5 0 3 E (^0 2 5 0) 

Table 37

Jobs

Machine I II III IV V

A 1  0  2

B 0 0x^5 13 0x

C 0x (^1)   0

D 3 0 0x 0x 0

E^1 0x^ 0x^ 0 

( Note: Since we have number of zeros occupying corner of a square, we have multiple solutions).

Job A is assigned to machine III, B to machine I, C to machine V, D to machine II, E to machine IV.