{"id":19922305,"url":"https://github.com/isopropylcyanide/hungarian-assignment-gui","last_synced_at":"2025-08-26T00:07:34.000Z","repository":{"id":118644397,"uuid":"73149272","full_name":"isopropylcyanide/Hungarian-Assignment-GUI","owner":"isopropylcyanide","description":"Python program to solve the assignment problem using Hungarian method","archived":false,"fork":false,"pushed_at":"2020-01-22T10:37:44.000Z","size":5295,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-03T07:37:12.203Z","etag":null,"topics":["cli","gui","hungarian-algorithm","hungarian-assignment","hungarian-method","python","tkinter","tkinter-library","tkinter-python"],"latest_commit_sha":null,"homepage":null,"language":"Tcl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isopropylcyanide.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,"zenodo":null}},"created_at":"2016-11-08T04:34:08.000Z","updated_at":"2023-07-17T11:50:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"68d6d2db-7785-4f90-9ea4-4d5502a2e8b9","html_url":"https://github.com/isopropylcyanide/Hungarian-Assignment-GUI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/isopropylcyanide/Hungarian-Assignment-GUI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isopropylcyanide%2FHungarian-Assignment-GUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isopropylcyanide%2FHungarian-Assignment-GUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isopropylcyanide%2FHungarian-Assignment-GUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isopropylcyanide%2FHungarian-Assignment-GUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isopropylcyanide","download_url":"https://codeload.github.com/isopropylcyanide/Hungarian-Assignment-GUI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isopropylcyanide%2FHungarian-Assignment-GUI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272149880,"owners_count":24882043,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","gui","hungarian-algorithm","hungarian-assignment","hungarian-method","python","tkinter","tkinter-library","tkinter-python"],"created_at":"2024-11-12T22:10:32.706Z","updated_at":"2025-08-26T00:07:33.991Z","avatar_url":"https://github.com/isopropylcyanide.png","language":"Tcl","funding_links":[],"categories":[],"sub_categories":[],"readme":"## [Hungarian Assignment](https://en.wikipedia.org/wiki/Hungarian_algorithm \"Wiki\") ##\n### Python program to solve the assignment problem using Hungarian method ###\n----\n\n### Motivation ###\n```\nDuring my four year undergraduate course majoring in Computer Science, we had an open elective course called as\nOperations Research. It employs techniques from other mathematical sciences, such as mathematical modeling, \nstatistical analysis,  and mathematical optimization, operations research arrives at optimal or near-optimal \nsolutions to complex decision-making problems. It was taught by a teacher with a non programming background.\n\nAt the end of the course, the teacher requested students from C.S/E.C.E to submit a program that solves the job\nassignment problem using the Hungarian method. Since, nobody from the class was interested, I took it up as a\nchallenge. First I solved the problem of creating a command line program that reads the input which the user \nprovides in a file,  parses it and lists the maximum assignment possible using the Hungarian method. If no such\nmethod is possible, we let the user know.\n\nBefore submitting the program as a python script, I realized that the teacher who requested the program shouldn't\nbe dealing with the nitty gritties of command line. Hence, I came across the tkinter Python library for creating \nGUI's. I researched for a day, and then went ahead executing the GUI with Tkinter. I was overjoyed.\n\nHowever, once again I was in a fix because while preparing the GitHub readme, in the prerequisites section, I \nmentioned Python as it was necessary for the project. I was using a Linux Machine with all the utilities \ninstalled. It doesn't take a genius to figure out that the machine on which Sir would eventually run might not\neven contain the python binary, let alone GUI support for Tkinter. We can't expect him to install python now,\ncan we?\n\nAt the end, I converted the python program to an .exe executable that's portable enough to run on most \ncomputers. I burnt the program onto a C.D, sparing him the troubles of git clone and submitted it to my professor.\nLater that day, I received an email saying that the program was very helpful and he can now quickly create custom\nquestions and verify its correctness while checking the answer sheets. The fact that my GUI showed execution\ntraces and the steps it took, were the icing on the cake.\n\nNeedless, to say, I received the 'S' grade, which was the highest. Everybody in the batch now took a copy of my\nprogram and submitted it. There were a lot of things I learnt in this project, both technical and psychological.\nIf I hadn't vouched for creating the program that day, you wouldn't be reading this and I would have remained \nremiss of the other aspects of programming.\n```\n\n----\n\n## Prerequisite: ## \n\n   We need to have python installed on your Windows/Linux machine. Just like we need a compiler for C++, we need the python interpreter installed. It is pre-installed on linux.\n\n   [How to install python on Windows](http://www.howtogeek.com/197947/how-to-install-python-on-windows/)\n\n----\n\n## Direct Run using binary (No installs needed) ##\n \nYou can choose to run the program without installing python / tkinter. Navigate to Direct Executables folder\nRun ```hungarianAssignment.exe``` to start the program.\nLinux users may use wine to directly run the executable\n\n----\n\n### Graphical Mode using Tkinter ###\n\n* Create any number of rows and columns.\n\n* View the final result directly.  \n\n* View step wise results.\n\n* Save the result to a file.\n\n\nFor GUI to work correctly you need to install tkinter module on your machine.\n    \n    sudo pip install tkinter\n    \n----    \n\n### Usage (GUI) ###\n\n   Simply open up a terminal and run the program \n        \n        python GUI_HA.py\n\n----\n\n### Usage (Command Line Interface (CLI) MODE) ###\n\n* Use the input files present in the Testcases folder or \n   generate a new file with the following standards:\n   \n        N M\n        A1 A2 A3 ...... AM\n        B1 B2 B3 ...... BM\n        ..................\n        ..................\n        ..................\n        N1 N2 N2 ...... NM\n   \n    \n   Where __N__ are the number of rows in the matrix and __M__ are the columns.\n   \n![Creating a file](http://i.imgur.com/hclDAaj.jpg)\n   \n \nOnce the input file, say inputFile, is prepared run the program as follows:\n\n\n  ```python\n     python assignmentProb.py inputFile\n  ```\n  \n![Running python](http://i.imgur.com/BQsIcwe.jpg)\n   \n   \n  \n *  Or you can simply use the already created 14 testcases using   \n \n  ```python\n     python assignmentProb.py TestCases/A/inputA\n  ```\n   \n----\n\n## Examples ##\n\n### Example of a 4 x 4 matrix that's easily solvable by covering all zeroes ###\n\u003cimg src=\"http://i.imgur.com/4RTzmC5.jpg\" width=\"45%\"/\u003e \u003cimg src=\"http://i.imgur.com/nJhx0bM.jpg\" width=\"40%\"/\u003e\n\u003cimg src=\"http://i.imgur.com/uRbJ6wv.jpg\" width=\"45%\"/\u003e \u003cimg src=\"http://i.imgur.com/kh5Bmgu.jpg\" width=\"40%\"/\u003e\n       \n----\n\n### Example of a 5 x 5 matrix that requires a second pass ###\n\n\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72884830-ccad8280-3d2c-11ea-866e-b83710dd9214.png\" width=\"50%\"/\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72884928-f8306d00-3d2c-11ea-9fba-648e5cfe22b0.png\" width=\"40%\"/\u003e\n\n\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72884987-0ed6c400-3d2d-11ea-8631-e60524b38299.png\" width=\"40%\"/\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72885016-1dbd7680-3d2d-11ea-9c7a-c5853167d9e6.png\" width=\"50%\"/\u003e\n\n\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72885160-670dc600-3d2d-11ea-95b0-1efdbae28c31.png\" width=\"50%\"/\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72885222-7b51c300-3d2d-11ea-8c99-252892445719.png\" width=\"50%\"/\u003e\n\n\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72885249-87d61b80-3d2d-11ea-8718-5def63c95442.png\" width=\"50%\"/\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12872673/72887105-0e402c80-3d31-11ea-9ef7-68aa4d04a73b.png\" width=\"30%\"/\u003e\n\nNote that this sample case was taken from [here](http://ecoursesonline.iasri.res.in/mod/resource/view.php?id=4955) at Example 2\n\n----\n\n### I want to contibute ###\nPlease fork the project and submit a PR\n\n\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisopropylcyanide%2Fhungarian-assignment-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisopropylcyanide%2Fhungarian-assignment-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisopropylcyanide%2Fhungarian-assignment-gui/lists"}