Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Assignment Problem

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

ASSIGNMENT PROBLEM

 
contents
Problem Definition

Different approaches of Assignment Problem

Problem description

First two levels of the state-space tree

Complete state-space tree


The assignment problem is one of the fundamental
Introduction

combinatorial optimization problems in the branch


of optimization or operation research in
mathematics.
It consists of finding a maximum weight matching

 (or minimum weight perfect matching) in a 


weighted bipartite graph.
Let there be N workers and N jobs. Any worker can

be assigned to perform any job, incurring some cost


that may vary depending on the work-job
assignment.
It is required to perform all jobs by assigning

exactly one worker to each job and exactly one job


to each agent in such a way that the total cost of the
assignment is minimized.
Different approaches of Assignment Problem

Solution 1: Brute Force

We generate n! possible job assignments and for each

such assignment, we compute its total cost and return


the less expensive assignment. Since the solution is a
permutation of the n jobs, its complexity is O(n!).
Solution 2: Hungarian Algorithm

The optimal assignment can be found using the

Hungarian algorithm. The Hungarian algorithm has


worst case run-time complexity of O(n^3).
Solution 3: DFS/BFS on state space tree
We can perform depth-first search on state space tree and but

successive moves can take us away from the goal rather than
bringing closer.
The search of state space tree follows leftmost path from the root

regardless of initial state. An answer node may never be found in


this approach.
We can also perform a Breadth-first search on state space tree.

But no matter what the initial state is, the algorithm attempts
the same sequence of moves like DFS.
Solution 4: Finding Optimal Solution using Branch and Bound

The selection rule for the next node in BFS and DFS is

“blind”. i.e. the selection rule does not give any preference
to a node that has a very good chance of getting the search
to an answer node quickly.
The search for an optimal solution can often be speeded

by using an “intelligent” ranking function, also called an


approximate cost function to avoid searching in sub-trees
that do not contain an optimal solution.
There are two approaches to calculate the cost function:
For each worker, we choose job with minimum cost from

list of unassigned jobs (take minimum entry from each


row).
For each job, we choose a worker with lowest cost for that

job from list of unassigned workers (take minimum entry


from each column).
Problem description
The assignment problem is specified by an n × n cost
matrix C so that we can state the problem as follows:
Select one element in each row of the matrix so that
no two selected elements are in the same column and
their sum is the smallest possible.
We find a lower bound on the cost of an optimal
selection without actually solving the problem;
The sum of the smallest elements in each of the
matrix’s rows.
For the instance
here, this sum is 2 + 3+ 1+ 4 = 10
We start with the root that corresponds to no elements
selected from the cost matrix. The lower-bound value
for the root, denoted lb, is 10. The nodes on the first
level of the tree correspond to selections of an element
in the first row of the matrix, i.e., a job for person a
First two levels of the state-space tree
So we have four live leaves—nodes 1 through 4—that may

contain an optimal solution. The most promising of them


is node 2 because it has the smallest lower bound value.
Following our best-first search strategy, we branch out

from that node first by considering the three different


ways of selecting an element from the second row and
not in the second column—the three different jobs that
can be assigned to person b
Of the six live leaves - nodes 1, 3, 4, 5, 6, and 7 that may contain an optimal
solution, we again choose the one with the smallest lower bound, node 5.
Complete state-space tree
First, we consider selecting the third column’s element from

c’s row (i.e.,assigning person c to job 3); this leaves us with no


choice but to select the element from the fourth column of
d’s row (assigning person d to job 4).
This yields leaf 8, which corresponds to the feasible solution

{a→2, b→1, c→3, d →4} with the total cost of 13.


Its sibling, node 9, corresponds to the feasible solution {a→2,

b→1, c→4, d →3} with the total cost of 25. Since its cost is
larger than the cost of the solution represented by leaf 8,
node 9 is simply terminated.
Now, as we inspect each of the live leaves of the last

state-space tree—nodes 1, 3, 4, 6, and 7 to discover


that their lower-bound values are not smaller than 13,
the value of the best selection seen so far (leaf 8).
 Hence, we terminate all of them and recognize the

solution represented by leaf 8 as the optimal solution


to the problem.

You might also like