File Exchange

## Functions for the rectangular assignment problem

version 1.5 (18.7 KB) by

This package provides m- and mex-functions for solving the rectangular assignment problem.

Updated

With this package, I provide some MATLAB-functions regarding the rectangular assignment problem. This problem appears for example in tracking applications, where one has M existing tracks and N new measurements. For each possible assignment, a cost or distance is computed. All cost values form a matrix, where the row index corresponds to the tracks and the column index corresponds to the measurements. The provided functions return an optimal or suboptimal assignment - in the sense of minimum overall costs - for the given matrix.
In the process of gating, typically very unlikely assignments are forbidden. The given functions can handle forbidden assignments, which are marked by setting the corresponding assignment cost to infinity.
The optimal solution is computed using Munkres algorithm, also known as Hungarian Algorithm.

The functions are called like
[assignment, cost] = assignmentalgorithm(distMatrix);

Julian Schork

Alex Nikitin

Uubu

Shan Muga

Xin Liu

Matteo

### Matteo (view profile)

Hi people,
I a question about the hungarian algorithm. this algorithm is optimal algorithm for the assignment problem, and the time complexity is O(n^3), right?
But , if the input is the multidimensional matrix, it's possible to use the hungarian algorithm? how does it change the algorithm and the time complexity ?
thanks

Charles Nelatury

Michal Kvasnicka

### Michal Kvasnicka (view profile)

Excellent piece of work!

Thanks to guys like Markus MATLAB is the best computing environment in the world!

Markus, could you add to the readme file releveant references (Munkres, Hungarian algorithms, assigment problem in general)?

Umit

### Umit (view profile)

Is 'assignmentoptimal(rectMatrix)' is the implementation of Munkres algorithm for rectangular case? It says it is Munkres algorithm but original algorithm is for square matrices. This one should be extended version for rectangular cases, right? Can you confirm this.

Yu

### Yu (view profile)

It is very useful for me, especially can handle rectangle situation. Thanks a lot!

Yu

yair

### yair (view profile)

Hello Markus.

Is it a O(n^3) implementaion?

James

Great work

Andy

Nazmul Islam

Nazmul Islam

### Nazmul Islam (view profile)

Thanks a lot for posting this !! I am looking for a Matlab implementation of a maximum weighted matching algorithm in a general graph (not bipartite). Does anyone know a Mathworks thread/link where it has already been posted?

Olivier Planchon

### Olivier Planchon (view profile)

Excellent !
I especially like the easy-to-use MEX files, and the outstanding test file.
I could optimize my problem beyond my best hope.

Bruno Luong

### Bruno Luong (view profile)

Great, does what it claims and fast (I use for multi-target tracking.)

michele pace

### michele pace (view profile)

Hi, I used assignmentoptimal.* in a multitracking application, exactly in the scenario you described. It works very well. Great job, thank you.

Greg Fricke

### Greg Fricke (view profile)

Thank you Markus!
This has helped me pass a critical practicality hurdle in my Master's Research without spending a week or two reading, writing, and debugging!

Clemens Yu

Harrison Woods

### Harrison Woods (view profile)

Great, thanks for sharing this code!!

Salha Al-Kuwaiti

Perfect! Keep the good work Up!

Leonid Chindelevitch

You saved me a lot of trouble, thank you!

Stephen Pan

Excellent!

Francois Berthiaume

Francois Berthiaume

Many thanks for the code, it works great!

Markus Buehren

Ldd Lasss, please let me know why you gave a bad rating for my package!

Ldd Lasss

Tom Pinkiewicz

Thanks Markus. This code works great. I re-packaged your c function and integrated it into Simulink. I've posted it on this website.

Tom Pinkiewicz

Thanks Markus. This code works great. I re-packaged your c function and integrated it into Simulink. I've posted it on this website.

Hao Cheng

Very nice work. I do appreciate.

A Alpers

praveen kuppili

very good one!!!!!!!

Coffee Bear

very fast

Tium Tium

works great, easy to use

Raimund Leitner

Very very good and easy to use implementation of the Munkres algorithm.