Polynomial-Scaling Algorithm for the Linear Sum Assignment Problem - - PowerPoint PPT Presentation

polynomial scaling algorithm for the linear sum
SMART_READER_LITE
LIVE PREVIEW

Polynomial-Scaling Algorithm for the Linear Sum Assignment Problem - - PowerPoint PPT Presentation

Polynomial-Scaling Algorithm for the Linear Sum Assignment Problem Yubo Paul Yang, 2020 -10-18, Algorithm Interest Group (http://algorithm-interest-group.me) What is the (balanced) linear sum assignment problem (LSAP)? Goal find minimum-cost


slide-1
SLIDE 1

Polynomial-Scaling Algorithm for the Linear Sum Assignment Problem

Yubo “Paul” Yang, 2020-10-18, Algorithm Interest Group (http://algorithm-interest-group.me)

slide-2
SLIDE 2

What is the (balanced) linear sum assignment problem (LSAP)? Goal find minimum-cost assignment of n “agents” to n “tasks”.

Problem defined by a cost matrix. 𝑑𝑗𝑘 is the cost to assign agent 𝑗 to task 𝑘. Mathematically a linear programming (LP) problem: ෍

𝑗=1 𝑜

𝑘=1 𝑜

𝑑𝑗𝑘𝑦𝑗𝑘 ෍

𝑗=1 𝑜

𝑦𝑗𝑘 = 1 ෍

𝑘=1 𝑜

𝑦𝑗𝑘 = 1 𝑦𝑗𝑘 ≥ 0, ∀𝑗, 𝑘 Minimize with constraints cost 𝑨 assignment 𝝔 𝑦𝑗𝑘 = 𝜀𝑗𝑘 Example:

slide-3
SLIDE 3

What is the (balanced) linear sum assignment problem (LSAP)? Example 2x2 Example 3x3

assignment 𝝔 is a permutation of length n ⇒ 𝑜! possibilities!

slide-4
SLIDE 4

Why solve LSAP? Many practical (real-world!) applications

Vehicle routing problems (eg. Taxi, flights) [2] Quantum exchange [5] Choose 4/n swimmers for relay team (back, breast, butterfly, free style) [1] Reconstruct mass distribution in the early universe [3] Shoot down Soviet nukes [4]

[1] R.E. Machol, “An application of the assignment problem,” Oper. Res. 18, 745 (1970) [2] M. Fischetti, A. Lodi, S. Martello, and P. Toth, “A polyhedral approach to simplified crew scheduling and vehicle scheduling problems,” Management Sci. 47, 833 (2001). [3] U. Frisch and A. Sobolevskii, “Application of optimal transport theory to reconstruction of the early universe,” J. Math. Sci. 133, 1539 (2006). [4] B.L. Schwartz, “A computational analysis of the auction algorithm,” Euro. J. Oper. Res. 74, 161 (1994). [5] D.M. Ceperley, G. Jacucci, “Calculation of Exchange Frequencies in bcc 3He with the Path-Integral Monte Carlo Method,” Phys.

  • Rev. Lett. 58, 1648 (1987).
slide-5
SLIDE 5

How to solve LSAP?

Short answer: read a book [1]

[1] Rainer Burkard, Mauro Dell’Amico, Silvano Martello, “Assignment Problems : Revised Reprint,” SIAM (2009).

I will walk through the internals

  • f the “Hungarian algorithm”

Dénes Kőni g Jenő Egerváry

[2] T. Bonniger, G. Katzakidis, R.E. Burkard,

  • U. Derigs, “Solution Methods with FORTRAN-

Programs”, Springer-Verlag Berlin (1980).

slide-6
SLIDE 6

Primal-dual formulation of the LSAP

Primal problem ෍

𝑗=1 𝑜

𝑘=1 𝑜

𝑑𝑗𝑘𝑦𝑗𝑘 ෍

𝑘=1 𝑜

𝑦𝑗𝑘 = 1 ෍

𝑗=1 𝑜

𝑦𝑗𝑘 = 1 Minimize with constraints Dual problem ෍

𝑗=1 𝑜

𝑣𝑗 + ෍

𝑘=1 𝑜

𝑤𝑘 Maximize with constraints 𝑑𝑗𝑘 − 𝑣𝑗 − 𝑤𝑘 ≥ 0, ∀𝑗, 𝑘 Cost Matrix

𝑑𝑗𝑘

Reduced Cost Matrix

ҧ 𝑑𝑗𝑘

𝒗 = (2, 1, 1) 𝒘 = (0, 0, 0) set dual variable ֞ set primal constraint admissibility transform ҧ 𝑑𝑗𝑘 = 𝑑𝑗𝑘 − 𝑣𝑗 − 𝑤𝑘 Take home: each 0 in ҧ 𝑑 is admissible in an optimal primal assignment.

slide-7
SLIDE 7

The Hungarian algorithm : simultaneous primal and dual solutions

  • 1. Initialize ultra optimal dual variables. Only a partial primal assignment is admissible.
  • 2. Search admissible solutions for the primal assignment with largest cardinality.
  • 3. If all tasks assigned, then done.
  • 4. Otherwise relax constraints, i.e. decrease dual cost function by minimum reduced cost.

Big idea: By duality theorem, an optimal solution to both primal and dual problems is THE optimal solution. Algorithm:

slide-8
SLIDE 8

Timings

𝑜3 𝑜2+𝜗

Three implementations:

  • Yang (Python)
  • Ceperley (FORTRAN)
  • Scipy

Which one is which?

  • Method 1 = Ceperley (FORTRAN)
  • Method 2 = SciPy
  • Method 3 = Yang (Python)
slide-9
SLIDE 9

Implementation Breakdown (Python)

[1] Rainer Burkard, Mauro Dell’Amico, Silvano Martello, “Assignment Problems: Revised Reprint,” SIAM (2009).

slide-10
SLIDE 10

Implementation Breakdown (FORTRAN)

[2] T. Bonniger, G. Katzakidis, R.E. Burkard, U. Derigs, “Solution Methods with FORTRAN-Programs”, Springer-Verlag Berlin (1980).

Enlarge primal assignment Update dual variables

slide-11
SLIDE 11

Your Application!

Assign project teams? Dating app? : optimal assignment of stable marriages

Your idea goes here!

slide-12
SLIDE 12

Conclusion: The Hungarian alg. is a primal-dual poly.-time solution to the LSAP

𝑜3 𝑜2+𝜗