{"id":13409709,"url":"https://github.com/fastrgv/HungarianAlgorithm","last_synced_at":"2025-03-14T15:30:34.297Z","repository":{"id":169483166,"uuid":"154572336","full_name":"fastrgv/HungarianAlgorithm","owner":"fastrgv","description":"Fully functional Hungarian Algorithm implementation in Ada","archived":false,"fork":false,"pushed_at":"2024-09-15T20:24:34.000Z","size":89,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-15T21:36:04.564Z","etag":null,"topics":["ada","hungarian-algorithm","kuhn","kuhn-munkres","munkres"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastrgv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-24T21:35:36.000Z","updated_at":"2024-09-15T20:24:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dcd49be-ed22-4f87-8105-808654e1206a","html_url":"https://github.com/fastrgv/HungarianAlgorithm","commit_stats":null,"previous_names":["fastrgv/hungarianalgorithm"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastrgv%2FHungarianAlgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastrgv%2FHungarianAlgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastrgv%2FHungarianAlgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastrgv%2FHungarianAlgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastrgv","download_url":"https://codeload.github.com/fastrgv/HungarianAlgorithm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221477208,"owners_count":16829000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ada","hungarian-algorithm","kuhn","kuhn-munkres","munkres"],"created_at":"2024-07-30T20:01:02.913Z","updated_at":"2024-10-26T00:31:01.140Z","avatar_url":"https://github.com/fastrgv.png","language":"Ada","readme":"![screenshot](https://github.com/fastrgv/HungarianAlgorithm/blob/master/assignmentproblem.png)\n\n\nHere is the full source code and examples:\n\nhttps://github.com/fastrgv/HungarianAlgorithm/releases/download/v1.0.0/hu9nov20.7z\n\nType \"7z x filename\" to extract the archive.\n\n\n\n### Note: Please ignore the \"Source code\" zip \u0026 tar.gz files. (They are auto-generated by GitHub). Click on the large 7z file under releases to download all source \u0026 binaries (Windows,Mac \u0026 Linux). Then, type \"7z x filename\" to extract the archive. \n\n\n\n# Hungarian Algorithm Implementation in Ada\n\n* Although written in Ada, this code could be considered an algorithmic description.\n\nThe proper command to extract the archive and maintain the directory structure is \"7z x filename\".\n\n\n# Problem Description\nThe Hungarian algorithm can be described as optimally solving a workers versus jobs assignment problem that minimizes total cost.  This implementation assumes a square cost matrix, i.e. the number of jobs equals the number of workers to do them.\n\nA simple example, whose solution is almost immediately obvious follows.\n\njob\t#1\t#2\t#3\n\nA\t$2\t$3\t$3\n\nB\t$3\t$2\t$3\n\nC\t$3\t$3\t$2\n\nThe Hungarian method, when applied to the above table would give the minimum cost of $6, by assigning A to job 1, B to job 2, and C to job 3.\n\n# Example\n\nmunktest.adb \nsolves an 11 x 11 (hardcoded) job assignment problem.\nTo compile it, type lcmp.sh on linux, ocmp.sh on OSX, or wcmp.bat on Windows.\n\n# Source\nThis algorithm was copied on 20sep18 from:\nhttps://users.cs.duke.edu/~brd/Teaching/Bio/asmb/current/Handouts/munkres.html\nand modified to correct some errors.  \n\nIt is currently being used as an integral part of a highly capable sokoban solver [hbox4] that has been developed.  Thusly, it has now been tested on thousands of actual testcases and seems to be working properly.\n\nHere are the links to the sokoban solver:\n\n\t* https://sourceforge.net/projects/hbox4/files/8nov2022/\n\t* https://github.com/fastrgv/hbox4\n\n\nPlease send any improvements or further corrections to:\n\u003cfastrgv@gmail.com\u003e\n\n\n## Note\nI have searched for a correct version online, but found none.  I found several that \"almost\" worked but were all flawed, mainly, I think, due to the age and nature of the original algorithmic description.  It was invented before computers were widely available, so was described in terms of hand computations, parts of which are quite confusing, possibly due to language ambiguities. [Kuhn, 1955]\n\n\n## See Also\nI now have another project titled \"hbox4\", which is a sokoban puzzle solver that makes heavy use of the Hungarian Algorithm. It demonstrates its remarkable power because without it, the solver becomes severely disabled.\n\n\n## License\n\n Copyright (C) 2018  \u003cfastrgv@gmail.com\u003e\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n GNU General Public License for more details.\n\n You may read the full text of the GNU General Public License\n at \u003chttp://www.gnu.org/licenses/\u003e.\n\n\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Algorithms, Containers and Protocols"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastrgv%2FHungarianAlgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastrgv%2FHungarianAlgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastrgv%2FHungarianAlgorithm/lists"}