Optimization Part 2 36
Optimization Part 2 36
co
1 | Page
www.gradeup.co
Optimization Part-2
Content:
1. Assignment Problem
In proving the assignment problem we are looking for a set of pairings, for
example agents to tasks, which optimizes a stated objective such as minimising
total cost or distance or time.
Assignment problem
2 | Page
www.gradeup.co
First check whether the number of rows is equal to the numbers of columns, if
it is so, the assignment problem is said to be balanced.
Step :1 Choose the least element in each row and subtract it from all the
elements of that row.
Step :2 Choose the least element in each column and subtract it from all the
elements of that column. Step 2 has to be performed from the table obtained
in step 1.
Step:3 Check whether there is at-least one zero in each row and each column
and make an assignment as follows.
(i) consider the rows successively until a row with exactly one zero is found.
Mark that zero by , that means an assignment is made there . Cross ( ×) all
other zeros in its column. Continue this until all the rows have been examined.
(ii) consider the columns successively until a columns with exactly one zero is
found. Mark that zero by , that means an assignment is made there . Cross (
× ) all other zeros in its row. Continue this until all the columns have been
examined
Step :4 If every row and every column contains exactly one assignment, then
the solution is optimal.
3 | Page
www.gradeup.co
Example: Solve the following assignment problem. Cell values represent cost of
assigning job A, B, C and D to the machines I, II, III and IV.
∴ The given assignment problem is balanced. Now let us find the solution.
Step 1: Select a smallest element in each row and subtract this from all the
elements in its row.
Look for at-least one zero in each row and each column. Otherwise go to step
2.
4 | Page
www.gradeup.co
Step 2: Select the smallest element in each column and subtract this from all
the elements in its column.
Since each row and column contains atleast one zero, assignments can be
made.
Step 3 (Assignment):
consider the rows with exactly one zero. First three rows contain more than
one zero. Go to row D. There is exactly one zero. Mark that zero by (i.e) job
D is assigned to machine I. Mark other zeros in its column by x.
Step 4: Now consider the columns with exactly one zero. Already there is an
assignment in column I. Go to the column II. There is exactly one zero. Mark
that zero by . Mark other zeros in its row by ×.
5 | Page
www.gradeup.co
Column III holds more than one zero. Therefore proceed to Column IV, there is
exactly one zero. Mark that zero by . Mark other zeros in its row by × .
Step 5: Again examine the rows. Row B contains exactly one zero. Mark that
zero .
6 | Page
www.gradeup.co
Thus all the four assignments have been made. The optimal assignment schedule
and total cost is
= ₹ 38
Solution: Since the number of columns is less than the number of rows, given
assignment problem is unbalanced one. To balance it , introduce a dummy
column with all the entries zero. The revised assignment problem is
7 | Page
www.gradeup.co
Step 1: is not necessary, since each row contains zero entry. Go to Step 2.
Step 2 :
8 | Page
www.gradeup.co
Step 3 (Assignment) :
Since every row and every column contains exactly one assignment, all the three
men have been assigned a task. But task S is not assigned to any Man. The
optimal assignment schedule and total cost is
9 | Page
www.gradeup.co
10 | P a g e