Hungarian Algorithm in C#

added by Noldorin
2/22/2010 2:49:28 PM

2 Kicks, 5240 Views

The Hungarian algorithm, also known as the Kuhn-Munkres algorithm, is well-known to be the most efficient algorithm for solving the assignment problem. In fact, it does what is considered by many to an exponential time algorithm (more specifically, factorial time), in O(n^3). This post provides C# 3.0 source code for applying the Hungarian algorithm to any cost matrix.