Hungarian Method for Assignment Problems
Hungarian Method for Assignment Problems
Laboratory 5
ASSIGNMENT PROBLEM
ASSIGNMENT PROBLEM
I. OBJETIVOS:
HUNGARIAN METHOD
IV. PROCEDURE:
Example: A company bought three new machines of different types. There are four sites.
available within the workshop where a machine could be installed. Some of them
are more suitable than others for certain machines in particular due to their proximity to the centers
of work that would have an intense flow of work to and from the machines. (There is no flow
of work between the machines). Therefore, the objective is to assign the new
Machines to the available locations in such a way as to minimize the total handling cost.
materials. Table 2 provides the estimated cost per unit of time for handling
of the materials in question, with each of the machines at their respective sites. The
Location 2 is not considered appropriate for machine 2, so no cost is given in this case.
Table 2. Material handling costs.
Cost ($/hour)
Location
1 2 3 4
1 $13 $16 $12 $11
Machine 2 $15 --- $13 $20
3 $5 $7 $10 $6
Then, we will have to set up the solution table, just like in the problem of
transport. In this case, it should be noted that: Number of origins (m) = number of
destinations (n). Each resourcei= 1, Each demandi1.
The optimal solution is to assign machine 1 to place 4, machine 2 to place 3, and the
machine 3 to place 1 at a total cost of $29 per hour. The fictitious machine is assigned to the place.
2, so that location will be available for some future real assignment.
4.1 Application Example with the Hungarian Method
Joe Klyne's four children, John, Karen, Joe, and Terri, want to win something for their
personal expenses during a school trip to the zoo. Mr. Klyne has allocated
four tasks for your children:
Mow the lawn, paint the garage, vacuum the house, and wash the family cars. For
to avoid discussions, he asks them to submit (secret) offers of what they believe is a payment
Just for each of the four tasks. It is understood that later the four will obey.
the decision of his dad about who does which task. The table summarizes the offers received
4. Four lines must be used, but only three have been used, so the smaller one is taken.
number of unmarked boxes is subtracted.
5. Mark all zeros with the best number of lines
Costo: 21
V. DEVELOPMENT OF PRACTICAL ACTIVITY:
Port ($)
1 2 3 4
1 500 400 600 700
Boat 2 600 600 700 500
3 700 500 700 600
4 500 400 600 600
2. Apply the Hungarian algorithm to solve the assignment problem that has the
next cost table:
Task
1 2 3 4
A 4 6 5 5
B 7 4 5 6
Assigned C 4 7 6 4
D 5 3 4 7
Type of
Carlos Christian David Tony
swimming
Back 37.7 32.9 33.8 37.0
Chest 43.4 33.1 42.2 34.7
Butterfly 33.3 28.5 38.9 30.4
Free 29.2 26.4 29.6 28.5
Four cargo ships will be used to transport goods from one port to another four.
ports (labeled 1, 2, 3, 4). Any boat can be used to do any
of these four trips. However, as can be seen in the following table, due to the
differences in the boats and the cargo, the total cost of loading, transporting, and unloading
The goods vary considerably in the different ship-port combinations.
Ports
Ships
1 2 3 4
1 $500 $400 $600 $700
2 $600 $600 $700 $500
3 $700 $500 $700 600 dollars
4 $500 $400 $600 $600
The goal is to assign the four boats to the four different ports in such a way that
the total cost of the four shipments is minimized.
a. Describe how this problem fits into an assignment problem
b. Formulate and solve this problem using EXCEL SOLVER
NOTES:
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------