{"id":21652152,"url":"https://github.com/andcool-systems/removing_redundant_vertices","last_synced_at":"2025-03-20T04:07:41.862Z","repository":{"id":207221632,"uuid":"718712863","full_name":"Andcool-Systems/removing_redundant_vertices","owner":"Andcool-Systems","description":"Удаление избыточных вершин графа","archived":false,"fork":false,"pushed_at":"2023-11-15T05:46:12.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T05:43:54.865Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Andcool-Systems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-11-14T16:42:51.000Z","updated_at":"2024-12-10T18:31:22.000Z","dependencies_parsed_at":"2024-11-25T07:51:36.948Z","dependency_job_id":"dd0f0df1-996e-43af-a129-cded54d86582","html_url":"https://github.com/Andcool-Systems/removing_redundant_vertices","commit_stats":null,"previous_names":["andcool-systems/removing_redundant_vertices"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2Fremoving_redundant_vertices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2Fremoving_redundant_vertices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2Fremoving_redundant_vertices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2Fremoving_redundant_vertices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Andcool-Systems","download_url":"https://codeload.github.com/Andcool-Systems/removing_redundant_vertices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244547604,"owners_count":20470103,"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":[],"created_at":"2024-11-25T07:51:26.338Z","updated_at":"2025-03-20T04:07:41.833Z","avatar_url":"https://github.com/Andcool-Systems.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Удаление избыточных вершин графа\nКод производит удаление вершин графа, которые содержат только 2 пути, так как они считаются избыточными.\u003cbr\u003e\n\nОсновной файл: `main.py`, содержит весь скрипт и тестовые входные данные.\n### Подробное описание\nПри выполнении скрипта, мы проходим циклом `for` по графу, находим вершины, у которых лишь 2 связи и создаём путь между двумя соседними ей вершинами, удаляя избыточную.\n### Пример:\n**Исходный граф:** \u003cbr\u003e\n**A — B — С**\u003cbr\u003e\n|Вершина        |Пути из этой вершины|\n|---------------|--------------------|\n|A              | [B]                |\n|B              | [A, C]             |\n|C              | [B]                |\n\n\u003cbr\u003eКак видно из таблицы, вершина B имеет только 2 пути, следственно является избыточной\u003cbr\u003e\n**Итоговый граф, после выпонения алгоритма:**\u003cbr\u003e\n**A — С**\u003cbr\u003e\n|Вершина        |Пути из этой вершины|\n|---------------|--------------------|\n|A              | [C]                |\n|C              | [A]                |\n\n\u003cbr\u003eВ результате выполнения скрипта, он удалил избыточную вершину B, соединив вместе ближайшие ей вершины.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandcool-systems%2Fremoving_redundant_vertices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandcool-systems%2Fremoving_redundant_vertices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandcool-systems%2Fremoving_redundant_vertices/lists"}