{"id":21427178,"url":"https://github.com/anders-wind/np-instance-map","last_synced_at":"2025-10-08T13:23:40.882Z","repository":{"id":77425117,"uuid":"200044299","full_name":"anders-wind/NP-Instance-Map","owner":"anders-wind","description":"I wish to create a dataset of all permutations of graphs and their corresponding solutions to some NP-Complete problems.","archived":false,"fork":false,"pushed_at":"2019-09-30T21:28:17.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T13:37:17.160Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/anders-wind.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":"2019-08-01T12:13:26.000Z","updated_at":"2019-09-11T21:28:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"866c7b96-fc2b-413d-b429-f41738575e6c","html_url":"https://github.com/anders-wind/NP-Instance-Map","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anders-wind/NP-Instance-Map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders-wind%2FNP-Instance-Map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders-wind%2FNP-Instance-Map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders-wind%2FNP-Instance-Map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders-wind%2FNP-Instance-Map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders-wind","download_url":"https://codeload.github.com/anders-wind/NP-Instance-Map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders-wind%2FNP-Instance-Map/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268393946,"owners_count":24243322,"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-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-11-22T21:44:08.486Z","updated_at":"2025-10-08T13:23:35.863Z","avatar_url":"https://github.com/anders-wind.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NP-Instance-Map\n\nI wish to create a dataset of all permutations of graphs and their corresponding solutions to some NP-Complete problems.\n\nThe idea with this project, is to explore if related graphs have related solutions or solution sizes.\n\nI suspect the running time of this routine to be: `O(2^((n*(n-1))/2) 2^n * O(f))` where f is the validation algorithm running time.\nTherefore I will only survey _very_ small graphs.\n\n## Supported NP-Complete problems\n\n- Maximum Independent Set.\n\n## Plan\n\n- [x] Create functionality for creating all permutations of a graph. This should be done such that one can create a specific graph from an integer.\n- [x] Create validation of a solution to the problems\n- [x] Solve the problem, potentially by bruteforce so we can see all solutions to the problem.\n- [ ] Serialize the dataset.\n- [ ] Visualize the instances and their solutions somehow.\n- [ ] Find an effective way to enumerate fundemental simple graphs / graph codes / canonical unlabbeled graphs.\n\n## Visualization\n\n- How many solutions are each node a part of (should be equal if we run on all symmetric graphs)\n- How many solutions are\n- What is the relationship between number of edges and solutions?\n- What is the relationship between vertices degrees and solutions\n- Based on different distance metrics between graphs (jacobian, isomorphism) map out size of solutions.\n- Based on different distance metrics between solutions, map to graphs\n\n## Enumerate Simple Unlabbeled graphs\n\nAlgorithms:\n\n- [x] Run through all undirected graphs, check if they are in the min-code order. That is if they cannot be permuted to get a lower bitset representation. Runtime `O(2^(n(n-1)/2)) * O(n!)`\n- [x] Take unlabelled fundemental graphs from n-1, run all permutations connections from of the new vertex on each of the previous fundemental graphs. Unsure of correctness of this. Runtime `O(n!/c) * O(2^n) * O(n!)`.\n  - Should only have to make swaps on the having to enter the new row elements into the lower rows.\n- [ ] Run all combinations of n-1 undirected graphs. Add rows to each of these where the row only allows 0's in leading positions. It has been seen that since the graph codes are in min-form that the last row never has a 0 after a 1 in the last row. Runtime `O(2^(n-1)*(n-2)/2) * n) * O(n!)`.\n  - It most be possible to limit the swaps needed in veryfying the minimum idea for each of these graphs. Since we try all combinations of n-1 graphs and we know the last row is in its final form, we should be able to limit the swaps to those that do not affect the last row.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders-wind%2Fnp-instance-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders-wind%2Fnp-instance-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders-wind%2Fnp-instance-map/lists"}