HUNGARIAN ALGORITHM.

Slides:



Advertisements
Similar presentations
The Assignment Problem
Advertisements

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
Assignment Meeting 15 Course: D Deterministic Optimization Year: 2009.
TRANSPORTATION PROBLEM Finding Initial Basic Feasible Solution Shubhagata Roy.
Operations Research Assignment Problem.
Quantitative Techniques for Decision Making M.P. Gupta & R.B. Khanna © Prentice Hall India.
Allocation problems - The Hungarian Algorithm The Hungarian algorithm Step 1Reduce the array by both row and column subtractions Step 2Cover the zero elements.
The Transportation and Assignment Problems
The Hungarian algorithm for non-square arrays
Fundamentals of matrices
Warm-up 1.Review notes from Friday. 2.What is the dimension of the matrix below?
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
The Assignment Problem. In many business situations, management needs to assign - personnel to jobs, - jobs to machines, - machines to job locations,
Assignment Model Lecture 21 By Dr Arshad Zaheer. RECAP  Transportation model (Maximization)  Illustration (Demand > Supply)  Optimal Solution  Modi.
Assignment Problem. Definition Assignment Problem is a balanced transportation problem in which all supplies and demand are equal to 1.
AIM: How do we perform basic matrix operations? DO NOW:  Describe the steps for solving a system of Inequalities  How do you know which region is shaded?
Class Opener:. Identifying Matrices Student Check:
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Matrix Algebra Section 7.2. Review of order of matrices 2 rows, 3 columns Order is determined by: (# of rows) x (# of columns)
8.2 Operations With Matrices
Matrices: Simplifying Algebraic Expressions Combining Like Terms & Distributive Property.
 6. Use matrices to represent and manipulate data, e.g., to represent payoffs or incidence relationships related in a network.  7. Multiply matrices.
Network Flow Problems – The Assignment Problem
MATRICES MATRIX OPERATIONS. About Matrices  A matrix is a rectangular arrangement of numbers in rows and columns. Rows run horizontally and columns run.
Algebra Matrix Operations. Definition Matrix-A rectangular arrangement of numbers in rows and columns Dimensions- number of rows then columns Entries-
Transportation Problems Joko Waluyo, Ir., MT., PhD Dept. of Mechanical and Industrial Engineering.
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.
QUANTITATIVE METHODS FOR MANAGERS ASSIGNMENT MODEL.
3.5 Perform Basic Matrix Operations Add Matrices Subtract Matrices Solve Matric equations for x and y.
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
Do Now: Perform the indicated operation. 1.). Algebra II Elements 11.1: Matrix Operations HW: HW: p.590 (16-36 even, 37, 44, 46)
Precalculus Section 14.1 Add and subtract matrices Often a set of data is arranged in a table form A matrix is a rectangular.
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,
Ch. 12 Vocabulary 1.) matrix 2.) element 3.) scalar 4.) scalar multiplication.
The Hungarian algorithm for non-square arrays
MATRIX MULTIPLICATION
13.4 Product of Two Matrices
12-1 Organizing Data Using Matrices
Matrix Operations.
deterministic operations research
ENGM 535 Optimization Assignment Problems.
Introduction to Matrices
Matrix Operations Monday, August 06, 2018.
Matrix Operations.
Matrix Operations SpringSemester 2017.
WarmUp 2-3 on your calculator or on paper..
7.3 Matrices.
الوحدة السابعة : المصفوفات . تنظيم البيانات فى مصفوفات . الوحدة السابعة : المصفوفات . تنظيم البيانات فى مصفوفات . 1 جمع المصفوفات وطرحها.
Assignment Problem A balanced transportation problem in which
Introduction to Matrices
Matrices Elements, Adding and Subtracting
Unit 3: Matrices
MATRICES MATRIX OPERATIONS.
2.2 Introduction to Matrices
Scheduling Scheduling is an important tool for manufacturing and service industries, where it can have a major impact on the productivity of a process.
Objectives Multiply two matrices.
The Hungarian algorithm for non-square arrays
3.5 Perform Basic Matrix Operations
Chapter 4 Matrices & Determinants
1.8 Matrices.
Decision Science Chapter 6 Assignment Models.
Matrix Operations Ms. Olifer.
Matrix Operations SpringSemester 2017.
1.8 Matrices.
3.5 Perform Basic Matrix Operations Algebra II.
Introduction to Matrices
Presentation transcript:

HUNGARIAN ALGORITHM

Abstract Unfinished business from 2015 - where many participants did not get to experience all the depth of questions possible with the Hungarian Algorithm. This session will be organised in the form of a workshop in which teachers can work collaboratively to use the algorithm for assignment/allocation applications. Prior knowledge of the algorithm is not required.

Syllabus reference Assignment problems 4.3.10 use a bipartite graph and/or its tabular or matrix form to represent an assignment/ allocation problem 4.3.11 determine the optimum assignment(s), by inspection for small-scale problems, or by use of the Hungarian algorithm for larger problems Glossary: The Hungarian algorithm is used to solve assignment (allocation) problems.

ACTIVITIES WACE 2016 exam question For beginners – The Simpsons at work Multiple steps and more than 1 solution Maximising Outings for the elderly An engineering competition More tasks than people 5 by 5 matrix Investigate – making more matrices Writing interesting (?) questions

A1: WACE exam : 2016 Complete the matrix for the bipartite graph

WACE exam : 2016 Complete the matrix for the bipartite graph 4 7 8 2 6 3 5 9 From every number in each row subtract the smallest number in that row

WACE exam : 2016 Subtracting the smallest number in each row 3 4 1 2 5 From every number in each column subtract the smallest number in that column

WACE exam : 2016 Subtracting the smallest number in each column 1 3 4 2 5 Using vertical or horizontal lines across rows or down columns, cross out all zeroes using as few lines as possible

WACE exam : 2016 Crossing out zeroes using as few lines as possible 1 3 4 2 5 Note: the number of lines is less than the dimensions of the matrix so a solution does not exist yet.

WACE exam : 2016 Subtract the lowest uncovered number from all uncovered numbers and add it to the numbers at the intersections. 1 0 3 2 4 3 2 1 1 2 3 5 6 1 2 Using vertical or horizontal lines across rows or down columns, cross out all zeroes using as few lines as possible

WACE exam : 2016 Cross out zeroes using horizontal or vertical lines across rows or down columns – use as few lines as possible 2 3 1 6 Note: the number of lines is equal to the dimensions of the matrix so a solution exists.

WACE exam : 2016 To assign – locate row or column with only 1 zero WACE exam : 2016 To assign – locate row or column with only 1 zero. Allocate ... that person or job is no longer available. Continue until all jobs assigned. 2 3 1 6 Row 4 column 3 OR Row 3 column 4 then the other. Then row 2 column 1 and then row 1 column 2.

Assignment to minimise total time In each row take the smallest number off every number in that row In each column take the smallest number off every number in that column ** Using the least number of vertical or horizontal lines across columns or rows, cover all zeroes If the number of lines equals the dimensions of the matrix a solution is “found” – Go to END – otherwise continue Locate smallest number not crossed out Take this number off every uncovered number and add it to numbers at the intersections of the lines “Remove” vertical and horizontal lines Back to ** END: Locate a zero in each row and column so that there is “one for each” Determine the total minimum time for all tasks.

ACTIVITIES WACE 2016 exam question  For beginners – The Simpsons at work Multiple steps and more than 1 solution Maximising Outings for the elderly An engineering competition More tasks than people 5 by 5 matrix Investigate – making more matrices

A2: The Simpsons at work Minimising total time In each row take the smallest number off every number in that row In each column take the smallest number off every number in that column Using as few vertical or horizontal lines as possible, remove all zeroes If no. lines = matrix dimensions, solution exists Locate a zero in each row and column so that there is “one for each” Determine the total minimum time for all 4 tasks. Can a bipartite graph be used to represent the solution?

A3: Event Managers Minimising total time In each row subtract the smallest number from every number in that row In each column subtract the smallest number from every number in that column ** Using as few vertical or horizontal lines as possible, cover all zeroes If the number of lines equals the dimensions of the matrix a solution is “found” – Go to END – otherwise continue Locate smallest number not crossed out Take this number off every uncovered number and add it to numbers at the intersections of the lines Back to ** END: Locate a zero in each row and column so that there is “one for each” Determine the total minimum time for all 4 bulldozers. How can a bipartite graph be used to represent the solution?

A4: Maximising Firstly – take every number in the matrix off the largest number and then proceed as before. Council outings for the elderly Mathematics competition for students

A5: Cleaning up the Art room How is this situation different to the ones presented earlier?

Cleaning up the Art room There are more people than tasks Number of supply sources exceeds number of demand depots The matrix formed is not square We make it square by adding a row or column By convention the row or column added is filled with the largest number in the matrix Proceed as before

A6: 5 x 5

A7: Investigation Writing questions on the Hungarian algorithm The context The numbers How can you make up a set of numbers for the HA manipulating a matrix that already works in the desired manner?

Make a conjecture. Test it with two matrices. Group 1 Add the same number to every number in the matrix Group 2 Add a different number to the elements in each row Group 3 Multiply all the numbers in the matrix by the same number Group 4 Multiply every number in each row by a different number for each row Make a conjecture. Test it with two matrices. What can you conclude? Share your findings.

Further resources https://www.youtube.com/watch?v=cQ5MsiGa DY8 https://www.youtube.com/watch?v=7hbrtwvKV PM http://www.vcaa.vic.edu.au/Pages/vce/studies/ mathematics/further/exams.aspx See paper 2 – 2012, 2014 MAWA – IQ Topic 4.3