Coder Social home page Coder Social logo

hungarianalgorithm's Introduction

hungarianAlgorithm

  • Repo contains C++ implementation of the famous Hungarian algorithm

  • The Hungarian algorithm solves the optimal assignment problem in polynomial time ~O(n3)

  • Eg : If the Cost of doing work for different workers can be tabulated as follows :

Worker / Task Task 1 Task2 Task3 Task4
Worker A 5 9 3 6
Worker B 8 7 8 2
Worker C 6 10 12 7
Worker D 3 10 8 6
  • The optimal assignment for the above is

    • Worker A -> Task 3
    • Worker B -> Task 4
    • Worker C -> Task 2
    • Worker D -> Task 1
  • Total Optimal cost = 3 + 2 + 10 +3 = 18

  • The implementation is forked from the wonderful repo but has been improved upon by

    • Using Eigen library for array operations
    • Added docstring and flowchart for better understanding of implementation
  • Theoretically, it solves the primal-dual optimization problem. Reference : NPTEL operations research course )

Algorithm workflow

Flow chart

Requirements

The code was developed on Ubuntu 20.04 LTS OS with

  • g++ 9.4.0
  • cmake 3.16.3
  • Eigen 3.3

How to run the project

$ git clone https://github.com/suryajayaraman/hungarianAlgorithm.git
$ cd hungarianAlgorithm
$ mkdir -p build && cd build
$ cmake ..
$ make
$ ./HUNGARIAN_ALGORITHM

Applications of Hungarian algorithm

  • It is used for solving Data association problem in Object Tracking Applications as explained in this blog post

  • In the following image, we need to associate the detections from Lidar to detections in camera. Essentially, hungarian algorithm can be used to associate data from different sensors, so as to fuse them to get better estimations

Image reference

References

hungarianalgorithm's People

Contributors

suryajayaraman avatar

Stargazers

LZ91X  avatar yaozhang avatar qixuxiang avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.