DECISION SUPPORT FOR LOGISTICS MANAGEMENT 
MATCHING PROBLEM 
MOHAMED ASLEM JAMAL 
PRASANNA BASKARAN 
PRASHANTH KARTHIKEYAN 
PATRIC SAMUEL PAUL 
SRINATH GOWTHAM
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
MATCHING PROBLEM 
GRAPHICAL MODAL ELEMENTS
THE MATCHING PROBLEM 
Visualization of the MP 
JOO KOON 
BOON LAY 
KENTRIDGE 
JURONG EAST 
BUKIT BATOK 
HARBORFRONT ANGMOKIO 
MARINA BAY 
BOUNA VISTA 
PAYE LEBAR
THE MATCHING PROBLEM 
Visualization of the MP 
JOO KOON 
BOON LAY 
KENTRIDGE 
BOUNA VISTA 
HARBORFRONT 
MARINA BAY 
ANGMOKIO 
BUKIT BATOK 
JURONG EAST 
PAYE LEBAR
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
MATCHING PROBLEM 
BASIC ASSUMPTIONS 
• The number of assignees and the number of tasks are the same. 
• Each assignee is exactly assigned to exactly one task. 
• Each task is to be performed by exactly one assignee. 
• There is a cost 푐푖푗 associated with assignee i (i=1,….,n) performing task 
j(j=1,….,n). 
• The objective is to determine how all n assignments should be made to 
minimize the total cost.
MATCHING PROBLEM 
Definition of Variables 
i:= assignee 
j:= tasks to be matched to assignees 
xij:= defines whether assignee i is matched to task j 
xij =1 : i performs task j 
xij =0 : i doesn’t perform task j 
cij := defines the costs associated with assignee i for performing task j
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
MATCHING PROBLEM 
Formal Problem Model 
1) 푚푖푛. 푓 푥 = 
푛 
푖=1 
푛 
푗=1 
푐푖푗. 푥푖푗 
S.T 
2) 
푛 
푗=1 
푥푖푗 = 1 
3) 
푛 
푖=1 
푥푖푗 = 1 
For i=1,….,n 
For j=1,….,n 
4) 푥푖푗 Є {0,1} For all i and j 
Each assignee is assigned only one task 
Each task is assigned only one assignee
MATCHING PROBLEM 
BOTTLENECK PROBLEMS 
• Bottleneck assignment problems occur, for instance in connection with 
assigning jobs to parallel machines so as to minimize the latest completion 
time. 
• Let n jobs and n machines be given. 
• If the machines work in parallel, we want to assign the jobs to the machines 
such that the latest completion time is as early as possible. 
Note : 
• Bottleneck problems is not about minimising the total time taken for 
completing each job. Rather it is about minimising the maximum time taken 
for the jobs to be completed. 
• The cost coefficient cij is the time needed for machine j to complete job i.
MATCHING PROBLEM 
MAXIMUM CARDINALITY MATCHING 
• A matching(X) within a graph G is where no node is connected to more than 
one edge. 
• A maximum-cardinality matching is a matching that contains the largest 
possible number of matchings. There may be many maximum matching's. 
• The matching number v(G) of a graph G is the size of a maximum matching. 
• The following figure shows examples of maximum matchings' in the three 
graphs.
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
MATCHING PROBLEM 
“HUNGARIAN METHOD” 
Suppose that a taxi firm has four taxis (the agents) available, and four 
customers (the tasks) wishing to be picked up as soon as possible. The firm 
prides itself on speedy pickups, so for each taxi the "cost" of picking up a 
particular customer will depend on the time taken for the taxi to reach the 
pickup point. The solution to the assignment problem will be whichever 
combination of taxis and customers results in the least total cost. 
CUST 1 CUST 2 CUST 3 CUST 4 
TAXI 1 $54 $54 $51 $53 
TAXI 2 $51 $57 $52 $52 
TAXI 3 $50 $53 $54 $56 
TAXI 4 $56 $54 $55 $53
MATCHING PROBLEM 
“HUNGARIAN METHOD” 
• Formulate this problem as an matching problem? 
• Obtain an optimal solution using the Hungarian method?
MATCHING PROBLEM 
“HUNGARIAN METHOD” 
STEP 1 : Subtract the smallest entry in each row from all the entries of its row. 
CUST 1 CUST 2 CUST 3 CUST 4 
TAXI 1 $54 $54 $51 $53 
TAXI 2 $51 $57 $52 $52 
TAXI 3 $50 $53 $54 $56 
TAXI 4 $56 $54 $55 $53 
ROW MIN 
$51 
$51 
$50 
$53
MATCHING PROBLEM 
“HUNGARIAN METHOD” 
CUST 1 CUST 2 CUST 3 CUST 4 
TAXI 1 $3 $3 $0 $2 
TAXI 2 $0 $6 $1 $1 
TAXI 3 $0 $3 $4 $6 
TAXI 4 $3 $1 $2 $0
MATCHING PROBLEM 
“HUNGARIAN METHOD” 
2. Subtract the smallest entry in each column from all the entries of its column. 
TAXI 1 $3 $3 $0 $2 
TAXI 2 $0 $6 $1 $1 
TAXI 3 $0 $3 $4 $6 
TAXI 4 $3 $1 $2 $0 
COLUMN 
MIN 
CUST 1 CUST 2 CUST 3 CUST 4 
$0 $1 $0 $0
MATCHING PROBLEM 
“HUNGARIAN METHOD” 
CUST 1 CUST 2 CUST 3 CUST 4 
TAXI 1 $3 $2 $0 $2 
TAXI 2 $0 $5 $1 $1 
TAXI 3 $0 $2 $4 $6 
TAXI 4 $3 $0 $2 $0
MATCHING PROBLEM 
“HUNGARIAN METHOD” 
3, Draw the minimum number of lines (Horizontal, Vertical or both) that are needed 
to cover all the zeros in the reduced cost matrix. 
CUST 1 CUST 2 CUST 3 CUST 4 
TAXI 1 $3 $2 $0 $2 
TAXI 2 $0 $5 $1 $1 
TAXI 3 $0 $2 $4 $6 
TAXI 4 $3 $0 $2 $0
“HUNGARIAN METHOD” 
For m X m matrix, if m lines are required to cover all zeros, then an optimal solution is available among the 
covered zeros in the matrix. 
CUST 1 CUST 2 CUST 3 CUST4 
TAXI 1 $3 $2 $0 $2 
TAXI 2 $0 $5 $1 $1 
TAXI 3 $0 $2 $4 $6 
TAXI 4 $3 $0 $2 $0 
If the minimum number of lines required to cover all zeros is equal to m then proceed to step 5. 
However, as in this case the minimum number of lines required to cover all zeros is less than m additional 
step for optimization is required.
“HUNGARIAN METHOD” 
4. Find the smallest non zero element (call its value k) in the reduced cost 
matrix that is uncovered by the lines drawn in step 3. Now subtract k from 
each uncovered element of the reduced cost matrix and add k to each element 
that is covered by two lines. 
CUST 1 CUST 2 CUST 3 CUST 4 
TAXI 1 $4 $2 $0 $2 
TAXI 2 $0 $4 $0 $0 
TAXI 3 $0 $1 $3 $5 
TAXI 4 $4 $0 $2 $0 
Now the minimum number of lines required to cover all zeros is equal 
to m. Hence the solution is optimized.
MATCHING PROBLEM 
5,“HUNGARIAN METHOD” 
TAXI 1CUST 3 
TAXI 2CUST4 
TAXI 3CUST 1 
TAXI 4CUST 2 
CUST 1 CUST 2 CUST 3 CUST 4 
TAXI 1 $4 $2 $0 $2 
TAXI 2 $0 $4 $0 $0 
TAXI 3 $0 $1 $3 $5 
TAXI 4 $4 $0 $2 $0
PSEUDO CODE: 
STEP 1: Create a table with m rows and n columns, with assignees along the 
rows and 
Tasks along the columns where m=n. 
IF No of rows is not equal to No of columns, add a dummy row or column such 
that m=n. 
STEP 2: Subtract smallest entry in each row from all entries of its row 
Draw the minimum no of lines (horizontal, vertical or both) that are needed 
to cover all the zeros in the table. 
IF No of lines is equal to m and n, TERMINATE 
ELSE 
STEP 3:Subtract smallest entry in each column from all entries of its column 
Draw the minimum no of lines (horizontal, vertical or both) that are needed 
to cover all the zeros in the table. 
IF No of lines is equal to m and n, TERMINATE 
ELSE 
STEP 6: Find the least value among the uncovered entries. 
STEP 7: Subtract this value from all the uncovered entries and add the value 
to the double covered entries (point of intersection of the lines). 
STEP 8 : TERMINATE if the minimum no of lines (horizontal, vertical or both) 
that are needed to cover all the zeros in the table is equal to m and n.
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
MATCHING PROBLEM 
Use Cases 
The matching problem is a linear programming problem where assignees are 
being assigned to perform tasks. Examples are: 
1,How to schedule the flights routes between two cities so that the 
layover times for the crew can be minimized? 
2,Regulate the arrival of trains and processing times minimize the 
passengers waiting time and reduce congestion, formulate suitable 
transportation policy, thereby reducing the costs and time of trans-shipment.
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
FIND THE MATCHING PROBLEM? 
Exercise 
1, A company has two plants producing a certain products that is to be shipped 
to three distribution centers. Unit production costs are the same at the two 
plants. 
2, Management of returnable bottles where the filled bottles are brought to 
the customers and empty bottles are return to the brewery, to be recycled 
(Environmental issues). 
3, Manager has four jobs in hand to be allocated to four of his clerical staff. The 
staff differs in efficiency. The manager wants to allocate the duty to his staff so 
that the time taken by the staff must be minimum. Help the manager in 
allocating the jobs to the personnel.
MATCHING PROBLEM 
ANSWER 
3, Manager has four jobs in hand to be allocated to four of his clerical staff. The 
staff differs in efficiency. The manager wants to allocate the duty to his staff so 
that the time taken by the staff must be minimum. Help the manager in 
allocating the jobs to the personnel.
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
MATCHING PROBLEM 
AGENDA 
1. Problem Illustration 
2. Definitions 
3. Problem Model 
4. Selected Algorithms 
5. Use Cases 
6. Exercise 
7. Solving the problem using excel 
8. Literature Research
MATCHING PROBLEM 
LITERATURE RESEARCH 
• Introduction to Operations Research by Hillier and Lieberman.(Seventh Edition) 
• Operation research Applications and Algorithms by Wayne L.Winston. 
• A well solved class of Integer programs: Matching by Jack Edmonds and Ellis 
Johnson. 
• Assignment Problems - Revised Reprint, by Rainer Burkard, Mauro 
Dell'Amico, Silvano Martello - Society for Industrial and Applied Mathematics, 
Philadelphia, 2012
THANK YOU

Matching problem

  • 1.
    DECISION SUPPORT FORLOGISTICS MANAGEMENT MATCHING PROBLEM MOHAMED ASLEM JAMAL PRASANNA BASKARAN PRASHANTH KARTHIKEYAN PATRIC SAMUEL PAUL SRINATH GOWTHAM
  • 2.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 3.
  • 4.
    THE MATCHING PROBLEM Visualization of the MP JOO KOON BOON LAY KENTRIDGE JURONG EAST BUKIT BATOK HARBORFRONT ANGMOKIO MARINA BAY BOUNA VISTA PAYE LEBAR
  • 5.
    THE MATCHING PROBLEM Visualization of the MP JOO KOON BOON LAY KENTRIDGE BOUNA VISTA HARBORFRONT MARINA BAY ANGMOKIO BUKIT BATOK JURONG EAST PAYE LEBAR
  • 6.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 7.
    MATCHING PROBLEM BASICASSUMPTIONS • The number of assignees and the number of tasks are the same. • Each assignee is exactly assigned to exactly one task. • Each task is to be performed by exactly one assignee. • There is a cost 푐푖푗 associated with assignee i (i=1,….,n) performing task j(j=1,….,n). • The objective is to determine how all n assignments should be made to minimize the total cost.
  • 8.
    MATCHING PROBLEM Definitionof Variables i:= assignee j:= tasks to be matched to assignees xij:= defines whether assignee i is matched to task j xij =1 : i performs task j xij =0 : i doesn’t perform task j cij := defines the costs associated with assignee i for performing task j
  • 9.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 10.
    MATCHING PROBLEM FormalProblem Model 1) 푚푖푛. 푓 푥 = 푛 푖=1 푛 푗=1 푐푖푗. 푥푖푗 S.T 2) 푛 푗=1 푥푖푗 = 1 3) 푛 푖=1 푥푖푗 = 1 For i=1,….,n For j=1,….,n 4) 푥푖푗 Є {0,1} For all i and j Each assignee is assigned only one task Each task is assigned only one assignee
  • 11.
    MATCHING PROBLEM BOTTLENECKPROBLEMS • Bottleneck assignment problems occur, for instance in connection with assigning jobs to parallel machines so as to minimize the latest completion time. • Let n jobs and n machines be given. • If the machines work in parallel, we want to assign the jobs to the machines such that the latest completion time is as early as possible. Note : • Bottleneck problems is not about minimising the total time taken for completing each job. Rather it is about minimising the maximum time taken for the jobs to be completed. • The cost coefficient cij is the time needed for machine j to complete job i.
  • 12.
    MATCHING PROBLEM MAXIMUMCARDINALITY MATCHING • A matching(X) within a graph G is where no node is connected to more than one edge. • A maximum-cardinality matching is a matching that contains the largest possible number of matchings. There may be many maximum matching's. • The matching number v(G) of a graph G is the size of a maximum matching. • The following figure shows examples of maximum matchings' in the three graphs.
  • 13.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 14.
    MATCHING PROBLEM “HUNGARIANMETHOD” Suppose that a taxi firm has four taxis (the agents) available, and four customers (the tasks) wishing to be picked up as soon as possible. The firm prides itself on speedy pickups, so for each taxi the "cost" of picking up a particular customer will depend on the time taken for the taxi to reach the pickup point. The solution to the assignment problem will be whichever combination of taxis and customers results in the least total cost. CUST 1 CUST 2 CUST 3 CUST 4 TAXI 1 $54 $54 $51 $53 TAXI 2 $51 $57 $52 $52 TAXI 3 $50 $53 $54 $56 TAXI 4 $56 $54 $55 $53
  • 15.
    MATCHING PROBLEM “HUNGARIANMETHOD” • Formulate this problem as an matching problem? • Obtain an optimal solution using the Hungarian method?
  • 16.
    MATCHING PROBLEM “HUNGARIANMETHOD” STEP 1 : Subtract the smallest entry in each row from all the entries of its row. CUST 1 CUST 2 CUST 3 CUST 4 TAXI 1 $54 $54 $51 $53 TAXI 2 $51 $57 $52 $52 TAXI 3 $50 $53 $54 $56 TAXI 4 $56 $54 $55 $53 ROW MIN $51 $51 $50 $53
  • 17.
    MATCHING PROBLEM “HUNGARIANMETHOD” CUST 1 CUST 2 CUST 3 CUST 4 TAXI 1 $3 $3 $0 $2 TAXI 2 $0 $6 $1 $1 TAXI 3 $0 $3 $4 $6 TAXI 4 $3 $1 $2 $0
  • 18.
    MATCHING PROBLEM “HUNGARIANMETHOD” 2. Subtract the smallest entry in each column from all the entries of its column. TAXI 1 $3 $3 $0 $2 TAXI 2 $0 $6 $1 $1 TAXI 3 $0 $3 $4 $6 TAXI 4 $3 $1 $2 $0 COLUMN MIN CUST 1 CUST 2 CUST 3 CUST 4 $0 $1 $0 $0
  • 19.
    MATCHING PROBLEM “HUNGARIANMETHOD” CUST 1 CUST 2 CUST 3 CUST 4 TAXI 1 $3 $2 $0 $2 TAXI 2 $0 $5 $1 $1 TAXI 3 $0 $2 $4 $6 TAXI 4 $3 $0 $2 $0
  • 20.
    MATCHING PROBLEM “HUNGARIANMETHOD” 3, Draw the minimum number of lines (Horizontal, Vertical or both) that are needed to cover all the zeros in the reduced cost matrix. CUST 1 CUST 2 CUST 3 CUST 4 TAXI 1 $3 $2 $0 $2 TAXI 2 $0 $5 $1 $1 TAXI 3 $0 $2 $4 $6 TAXI 4 $3 $0 $2 $0
  • 21.
    “HUNGARIAN METHOD” Form X m matrix, if m lines are required to cover all zeros, then an optimal solution is available among the covered zeros in the matrix. CUST 1 CUST 2 CUST 3 CUST4 TAXI 1 $3 $2 $0 $2 TAXI 2 $0 $5 $1 $1 TAXI 3 $0 $2 $4 $6 TAXI 4 $3 $0 $2 $0 If the minimum number of lines required to cover all zeros is equal to m then proceed to step 5. However, as in this case the minimum number of lines required to cover all zeros is less than m additional step for optimization is required.
  • 22.
    “HUNGARIAN METHOD” 4.Find the smallest non zero element (call its value k) in the reduced cost matrix that is uncovered by the lines drawn in step 3. Now subtract k from each uncovered element of the reduced cost matrix and add k to each element that is covered by two lines. CUST 1 CUST 2 CUST 3 CUST 4 TAXI 1 $4 $2 $0 $2 TAXI 2 $0 $4 $0 $0 TAXI 3 $0 $1 $3 $5 TAXI 4 $4 $0 $2 $0 Now the minimum number of lines required to cover all zeros is equal to m. Hence the solution is optimized.
  • 23.
    MATCHING PROBLEM 5,“HUNGARIANMETHOD” TAXI 1CUST 3 TAXI 2CUST4 TAXI 3CUST 1 TAXI 4CUST 2 CUST 1 CUST 2 CUST 3 CUST 4 TAXI 1 $4 $2 $0 $2 TAXI 2 $0 $4 $0 $0 TAXI 3 $0 $1 $3 $5 TAXI 4 $4 $0 $2 $0
  • 24.
    PSEUDO CODE: STEP1: Create a table with m rows and n columns, with assignees along the rows and Tasks along the columns where m=n. IF No of rows is not equal to No of columns, add a dummy row or column such that m=n. STEP 2: Subtract smallest entry in each row from all entries of its row Draw the minimum no of lines (horizontal, vertical or both) that are needed to cover all the zeros in the table. IF No of lines is equal to m and n, TERMINATE ELSE STEP 3:Subtract smallest entry in each column from all entries of its column Draw the minimum no of lines (horizontal, vertical or both) that are needed to cover all the zeros in the table. IF No of lines is equal to m and n, TERMINATE ELSE STEP 6: Find the least value among the uncovered entries. STEP 7: Subtract this value from all the uncovered entries and add the value to the double covered entries (point of intersection of the lines). STEP 8 : TERMINATE if the minimum no of lines (horizontal, vertical or both) that are needed to cover all the zeros in the table is equal to m and n.
  • 25.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 26.
    MATCHING PROBLEM UseCases The matching problem is a linear programming problem where assignees are being assigned to perform tasks. Examples are: 1,How to schedule the flights routes between two cities so that the layover times for the crew can be minimized? 2,Regulate the arrival of trains and processing times minimize the passengers waiting time and reduce congestion, formulate suitable transportation policy, thereby reducing the costs and time of trans-shipment.
  • 27.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 28.
    FIND THE MATCHINGPROBLEM? Exercise 1, A company has two plants producing a certain products that is to be shipped to three distribution centers. Unit production costs are the same at the two plants. 2, Management of returnable bottles where the filled bottles are brought to the customers and empty bottles are return to the brewery, to be recycled (Environmental issues). 3, Manager has four jobs in hand to be allocated to four of his clerical staff. The staff differs in efficiency. The manager wants to allocate the duty to his staff so that the time taken by the staff must be minimum. Help the manager in allocating the jobs to the personnel.
  • 29.
    MATCHING PROBLEM ANSWER 3, Manager has four jobs in hand to be allocated to four of his clerical staff. The staff differs in efficiency. The manager wants to allocate the duty to his staff so that the time taken by the staff must be minimum. Help the manager in allocating the jobs to the personnel.
  • 30.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 31.
    MATCHING PROBLEM AGENDA 1. Problem Illustration 2. Definitions 3. Problem Model 4. Selected Algorithms 5. Use Cases 6. Exercise 7. Solving the problem using excel 8. Literature Research
  • 32.
    MATCHING PROBLEM LITERATURERESEARCH • Introduction to Operations Research by Hillier and Lieberman.(Seventh Edition) • Operation research Applications and Algorithms by Wayne L.Winston. • A well solved class of Integer programs: Matching by Jack Edmonds and Ellis Johnson. • Assignment Problems - Revised Reprint, by Rainer Burkard, Mauro Dell'Amico, Silvano Martello - Society for Industrial and Applied Mathematics, Philadelphia, 2012
  • 33.