{"id":16509884,"url":"https://github.com/papachristoumarios/python-gomoryhu","last_synced_at":"2025-10-28T03:31:49.634Z","repository":{"id":57457036,"uuid":"145208114","full_name":"papachristoumarios/python-GomoryHu","owner":"papachristoumarios","description":"Simplistic Gomory-Hu Tree Data Structure implementation in Python","archived":false,"fork":false,"pushed_at":"2018-09-09T19:35:19.000Z","size":4,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T11:04:16.079Z","etag":null,"topics":["data-structures","gomory-hu-tree","maximum-flow","minimum-cu","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/papachristoumarios.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}},"created_at":"2018-08-18T09:43:13.000Z","updated_at":"2023-04-09T00:03:12.000Z","dependencies_parsed_at":"2022-09-15T13:02:28.356Z","dependency_job_id":null,"html_url":"https://github.com/papachristoumarios/python-GomoryHu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papachristoumarios%2Fpython-GomoryHu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papachristoumarios%2Fpython-GomoryHu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papachristoumarios%2Fpython-GomoryHu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papachristoumarios%2Fpython-GomoryHu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/papachristoumarios","download_url":"https://codeload.github.com/papachristoumarios/python-GomoryHu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238590596,"owners_count":19497350,"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":["data-structures","gomory-hu-tree","maximum-flow","minimum-cu","python"],"created_at":"2024-10-11T15:53:02.287Z","updated_at":"2025-10-28T03:31:44.318Z","avatar_url":"https://github.com/papachristoumarios.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gomory-Hu Tree Data Structure Implementation in Python\n\n## Description\n\nThis repository contains a simple implementation of the [Gomory-Hu tree data structure](https://en.wikipedia.org/wiki/Gomory%E2%80%93Hu_tree) that allows for efficient computation of minimum s-t cuts in a network via precomputing a tree.\n\nIt constructs a tree by doing minimum cuts in the original network splitting it gradually into components. Finally, when the tree is constructed, one can query a minimum cut by doing a tree traversal on the Gomory-Hu Tree and keeping the minimum cost from s to t.  \n\n## Implementation\n\nThis is a very simple implementation of the data structure and the algorithm used in constructing it. The Ford-Fulkerson algorithm is used to compute maximum flow / minimum cut. There are also faster flow algorithms available (e.g. Edmonds-Karp, Dinic). The algorihtm can also be parallelized for faster computation. \n\n## Installation\n\nThe code can be installed with `distutils` via:\n\n```bash\npython3 setup.py install\n```\n\n## Usage\n\n 1. See `example.py` for instructions on using the GomoryHuTree class for constructing Gomory-Hu trees.\n 2. The API docs are accesible via the `help(gomory_hu)` command in a python prompt.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpapachristoumarios%2Fpython-gomoryhu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpapachristoumarios%2Fpython-gomoryhu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpapachristoumarios%2Fpython-gomoryhu/lists"}