Allocation problems - The Hungarian Algorithm The Hungarian algorithm Step 1Reduce the array by both row and column subtractions Step 2Cover the zero elements.

Slides:



Advertisements
Similar presentations
The Assignment Problem
Advertisements

Gaussian Elimination Matrices Solutions By Dr. Julia Arnold.
Unbalanced Assignment Model
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
Transportation Problem (TP) and Assignment Problem (AP)
Transportation and Assignment Models
The Greedy Method1. 2 Outline and Reading The Greedy Method Technique (§5.1) Fractional Knapsack Problem (§5.1.1) Task Scheduling (§5.1.2) Minimum Spanning.
Chapter 6 Linear Programming: The Simplex Method
Assignment Meeting 15 Course: D Deterministic Optimization Year: 2009.
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
Operations Research Assignment Problem.
Quantitative Techniques for Decision Making M.P. Gupta & R.B. Khanna © Prentice Hall India.
Production Scheduling
Linear Inequalities and Linear Programming Chapter 5
The Simplex Method: Standard Maximization Problems
5.4 Simplex method: maximization with problem constraints of the form
The Transportation and Assignment Problems
To accompany Quantitative Analysis for Management, 8e by Render/Stair/Hanna 10-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 10.
The Hungarian algorithm for non-square arrays
Assignment Problem Step by Step illustration automatically generated by a C# application:)
Linear Programming Applications
WB13 Define the terms bipartite graph,
Fundamentals of matrices
Determinants 2 x 2 and 3 x 3 Matrices. Matrices A matrix is an array of numbers that are arranged in rows and columns. A matrix is “square” if it has.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
Slide 1 of 27 Assignment Problem: Hungarian Algorithm and Linear Programming collected from the Internet and edited by Longin Jan Latecki.
Assignment Model Lecture 21 By Dr Arshad Zaheer. RECAP  Transportation model (Maximization)  Illustration (Demand > Supply)  Optimal Solution  Modi.
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Chapter 7 Transportation, Assignment & Transshipment Problems
13.1 Matrices and Their Sums
Assignment Problem. Definition Assignment Problem is a balanced transportation problem in which all supplies and demand are equal to 1.
Notes 5IE 3121 Knapsack Model Intuitive idea: what is the most valuable collection of items that can be fit into a backpack?
Assignment Models Dr. Kirti Arekar
The Assignment Algorithm A loading technique for committing two or more jobs to two or more workers or machines in a single work center. With one job assigned.
Data Structure CS 322. What is an array? Initializing arrays Accessing the values of an array Multidimensional arrays LAB#1 : Arrays.
Chapter 7 Section 7.2 Addition & Subtraction in Different Bases.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
4.5 Inverse of a Square Matrix
Copyright © 2011 Pearson Education, Inc. Solving Linear Systems Using Matrices Section 6.1 Matrices and Determinants.
An-Najah N. University Faculty of Engineering and Information Technology Department of Management Information systems Operations Research and Applications.
Network Flow Problems – The Assignment Problem
Chapter 1 Section 1.5 Matrix Operations. Matrices A matrix (despite the glamour of the movie) is a collection of numbers arranged in a rectangle or an.
Matrices Digital Lesson. Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 2 A matrix is a rectangular array of real numbers. Each entry.
TM 631 Optimization Assignment Problems. Prototype Problem K-Corp has 3 parts, each of which can be assigned to 1 of 3 machines. The problem is to assign.
Ways to Check for Divisibility Dividing by 2 All even numbers are divisible by 2 Even numbers are numbers that end with either 2, 4, 6, 8, or 0.
QUANTITATIVE METHODS FOR MANAGERS ASSIGNMENT MODEL.
Assignment Problem. Concepts What is the Assignment Problem? The assignment problem deals with assigning machines to tasks, workers to jobs, soccer players.
Learning to Associate: HybridBoosted Multi-Target Tracker for Crowded Scene Present by 陳群元.
Distribution Model Meaning Types Transportation Model Assignment Model.
The Hungarian Algorithm – Maximisation problems The Hungarian algorithm for maximisation problems To solve a maximisation problem using the Hungarian algorithm,
Example Program Development
Assignment Problem: Hungarian Algorithm and Linear Programming collected from the Internet and extended by Longin Jan Latecki.
The Hungarian algorithm for non-square arrays
deterministic operations research
ENGM 535 Optimization Assignment Problems.
HUNGARIAN ALGORITHM.
Assignment Problem: Hungarian Algorithm and Linear Programming collected from the Internet and extended by Longin Jan Latecki.
Matrix Operations.
Matrices and Systems of Equations 8.1
Assignment Problem A balanced transportation problem in which
Assignment Problem: Hungarian Algorithm and Linear Programming collected from the Internet and extended by Longin Jan Latecki.
Chapter 7 Transportation, Assignment & Transshipment Problems
Scheduling Scheduling is an important tool for manufacturing and service industries, where it can have a major impact on the productivity of a process.
Section 3.2 – Determinant of a SQUARE Matrix
Transportation Problems
Section 10.4 – Determinant of a SQUARE Matrix
The Hungarian algorithm for non-square arrays
Decision Science Chapter 6 Assignment Models.
Assignment Problem: Hungarian Algorithm and Linear Programming collected from the Internet and extended by Longin Jan Latecki.
Presentation transcript:

Allocation problems - The Hungarian Algorithm The Hungarian algorithm Step 1Reduce the array by both row and column subtractions Step 2Cover the zero elements with the minimum number of lines. If the number of lines is the same as the size of the array, then go to Step 4. Step 3Augment the elements. To do this, identify the minimum uncovered element. Subtract this element from all uncovered elements, and add this element to all elements covered by two lines. Then return to step 2. Step 4Identify the maximal matching which uses only zero elements, and apply this matching to the original array to find the minimum cost.

Allocation problems - The Hungarian Algorithm Example Four workers are to be assigned to four tasks. No worker is to carry out more than one task. The expected times taken for each worker to carry out each of the tasks is shown below. Allocate the workers to the tasks so that the total time taken is as short as possible, giving the minimum time required. Task 1Task 2Task 3Task 4 Eva Fred George Holly

Task 1Task 2Task 3Task 4 Eva Fred George Holly Allocation problems - The Hungarian Algorithm Step 1:Reduce the array by both row and column subtractions Task 1Task 2Task 3Task 4 Eva Fred George Holly To reduce by row subtractions, subtract the smallest element in each row from each element in the row. The smallest element in Eva’s row is 17, so subtract 17 from each element in the row. Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly

Allocation problems - The Hungarian Algorithm Step 1:Reduce the array by both row and column subtractions To reduce by row subtractions, subtract the smallest element in each row from each element in the row. The smallest element in Fred’s row is 21, so subtract 21 from each element in the row. Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly

Allocation problems - The Hungarian Algorithm Step 1:Reduce the array by both row and column subtractions To reduce by row subtractions, subtract the smallest element in each row from each element in the row. The smallest element in George’s row is 16, so subtract 16 from each element in the row. Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly

Allocation problems - The Hungarian Algorithm Step 1:Reduce the array by both row and column subtractions To reduce by row subtractions, subtract the smallest element in each row from each element in the row. The smallest element in Holly’s row is 19, so subtract 19 from each element in the row. Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly

Allocation problems - The Hungarian Algorithm The minimum number of lines needed to cover all the zeros is 2, Now reduce the array by subtracting the minimum entry in each column from all the entries in the column. so the solution is not optimal. Task 1Task 2Task 3Task 4 Eva Fred George Holly Step 1:Reduce the array by both row and column subtractions

Task 1Task 2Task 3Task 4 Eva Fred George Holly Task 1Task 2Task 3Task 4 Eva Fred George Holly Allocation problems - The Hungarian Algorithm Step 1:Reduce the array by both row and column subtractions To reduce by column subtractions, subtract the smallest element in each column from each element in the column. The smallest element in the Task 1 column is 10, so subtract 10 from each element in the column. Task 1Task 2Task 3Task 4 Eva87025 Fred George Holly Task 1Task 2Task 3Task 4 Eva87025 Fred20214 George Holly Task 1Task 2Task 3Task 4 Eva87025 Fred20214 George14017 Holly Task 1Task 2Task 3Task 4 Eva87025 Fred20214 George14017 Holly012019

Allocation problems - The Hungarian Algorithm Step 1:Reduce the array by both row and column subtractions To reduce by column subtractions, subtract the smallest element in each column from each element in the column. The Task 2 and Task 3 columns both contain zeros, so no column subtraction can be done in these two columns. Task 1Task 2Task 3Task 4 Eva87025 Fred20214 George14017 Holly012019

Allocation problems - The Hungarian Algorithm Step 1:Reduce the array by both row and column subtractions To reduce by column subtractions, subtract the smallest element in each column from each element in the column. The smallest element in the Task 4 column is 14, so subtract 14 from each element in column 4. Task 1Task 2Task 3Task 4 Eva87025 Fred20214 George14017 Holly Task 1Task 2Task 3Task 4 Eva87011 Fred20214 George14017 Holly Task 1Task 2Task 3Task 4 Eva87011 Fred2020 George14017 Holly Task 1Task 2Task 3Task 4 Eva87011 Fred2020 George1403 Holly Task 1Task 2Task 3Task 4 Eva87011 Fred2020 George1403 Holly01205

Allocation problems - The Hungarian Algorithm Step 2:Cover the zero elements with the minimum number of lines Look for rows and columns containing more than one zero. In this case, the Task 3 column has three zeros and Fred’s row has two zeros, so cover these with lines. Task 1Task 2Task 3Task 4 Eva87011 Fred2020 George1403 Holly01205 The remaining zero, in square H1, can be covered by either a vertical or horizontal line. The choice of line will not affect the final result. Three lines have been used, so this array does not give the optimal allocation.

Allocation problems - The Hungarian Algorithm Step 3:Augment the elements The smallest uncovered element is 1 (in square G1). Task 1Task 2Task 3Task 4 Eva87011 Fred2020 George1403 Holly01205 Subtract 1 from all uncovered elements and add 1 to all elements covered by two lines Task 1Task 2Task 3Task 4 Eva77011 Fred2020 George1403 Holly01205 Task 1Task 2Task 3Task 4 Eva76011 Fred2020 George1403 Holly01205 Task 1Task 2Task 3Task 4 Eva76010 Fred2020 George1403 Holly01205 Task 1Task 2Task 3Task 4 Eva76010 Fred2020 George0403 Holly01205 Task 1Task 2Task 3Task 4 Eva76010 Fred2020 George0303 Holly01205 Task 1Task 2Task 3Task 4 Eva76010 Fred2020 George0302 Holly01205 Task 1Task 2Task 3Task 4 Eva76010 Fred2030 George0302 Holly01205 Task 1Task 2Task 3Task 4 Eva76010 Fred2030 George0302 Holly01215

Allocation problems - The Hungarian Algorithm Step 3:Augment the elements The smallest uncovered element is 1 (in square G1). Subtract 1 from all uncovered elements and add 1 to all elements covered by two lines Task 1Task 2Task 3Task 4 Eva76010 Fred2030 George0302 Holly01215 Now return to Step 2.

Allocation problems - The Hungarian Algorithm Step 2:Cover the zero elements with the minimum number of lines. Again, look for rows and columns containing more than one zero. Here, the Task 1 and Task 3 columns and Fred’s row each have two zeros. Covering these with lines covers all the zeros. Task 1Task 2Task 3Task 4 Eva76010 Fred2030 George0302 Holly01215 Three lines have been used, so this array still does not give the optimal allocation.

Allocation problems - The Hungarian Algorithm Step 3:Augment the elements. The smallest uncovered element is 2 (in square G4). Task 1Task 2Task 3Task 4 Eva76010 Fred2030 George0302 Holly01215 Subtract 2 from all uncovered elements and add 2 to all elements covered by two lines. Task 1Task 2Task 3Task 4 Eva74010 Fred2030 George0302 Holly01215 Task 1Task 2Task 3Task 4 Eva7408 Fred2030 George0302 Holly01215 Task 1Task 2Task 3Task 4 Eva7408 Fred2030 George0102 Holly01215 Task 1Task 2Task 3Task 4 Eva7408 Fred2030 George0100 Holly01215 Task 1Task 2Task 3Task 4 Eva7408 Fred2030 George0100 Holly01015 Task 1Task 2Task 3Task 4 Eva7408 Fred2030 George0100 Holly01013 Task 1Task 2Task 3Task 4 Eva7408 Fred4030 George0100 Holly01013 Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013

Allocation problems - The Hungarian Algorithm Step 3:Augment the elements. The smallest uncovered element is 2 (in square G4). Subtract 2 from all uncovered elements and add 2 to all elements covered by two lines. Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013 Now return to Step 2.

Allocation problems - The Hungarian Algorithm Step 2:Cover the zero elements with the minimum number of lines. In this case, it is not possible to cover the zero elements with less than four lines. Since four lines are required for this 4 by 4 array, the optimal allocation can now be found from this array. Now go to Step 4. Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013 There are several different ways of covering them with four lines.

Allocation problems - The Hungarian Algorithm Step 4:Identify the maximal matching using zero elements. Look for rows and columns containing just one zero. Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013 There is just one zero in Eva’s row and Holly’s row, and there is just one zero in the Task 2 column. Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013 Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013 Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013 This means that square G4 must be the fourth zero selected.

Allocation problems - The Hungarian Algorithm Step 4:Identify the maximal matching using zero elements. Task 1Task 2Task 3Task 4 Eva7408 Fred4050 George0100 Holly01013 From the array, Eva is allocated Task 3, Fred is allocated Task 2, George is allocated Task 4, and Holly is allocated Task 1. Going back to the original array gives the times for each task. Task 1Task 2Task 3Task 4 Eva Fred George Holly Total time required = = 100.