A python implementation of the Hungarian Algorithm.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
hungalg.py
hungalg_tests.py
tester.py

README.md

hungalg

A python implementation of the Hungarian Algorithm. Initially made to solve the 345th Project Euler problem.

Problem description

The Hungarian Algorithm solves the assignment problem, defined as follows:

There are a number of agents and a number of tasks. Any agent can be assigned to perform any task, incurring some cost that may vary depending on the agent-task assignment. It is required to perform all tasks by assigning exactly one agent to each task and exactly one task to each agent in such a way that the total cost of the assignment is minimized.

The hungalg module can both minimize and maximize ('profit') a given matrix.

References

[1] http://csclab.murraystate.edu/bob.pilgrim/445/munkres.html

[2] http://en.wikipedia.org/wiki/Hungarian_algorithm