{"id":28323456,"url":"https://github.com/lastaapps/bc_thesis_code","last_synced_at":"2025-06-24T00:30:53.623Z","repository":{"id":277536937,"uuid":"932730600","full_name":"Lastaapps/bc_thesis_code","owner":"Lastaapps","description":"NAC-colorings search: complexity and algorithms","archived":false,"fork":false,"pushed_at":"2025-06-15T12:54:24.000Z","size":70877,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"bc_thesis","last_synced_at":"2025-06-15T13:50:58.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/LastaApps/bc_thesis","language":"Jupyter Notebook","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/Lastaapps.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":"2025-02-14T12:16:55.000Z","updated_at":"2025-06-15T12:54:27.000Z","dependencies_parsed_at":"2025-06-15T13:49:34.777Z","dependency_job_id":null,"html_url":"https://github.com/Lastaapps/bc_thesis_code","commit_stats":null,"previous_names":["lastaapps/nac_coloring","lastaapps/bc_thesis_code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lastaapps/bc_thesis_code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2Fbc_thesis_code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2Fbc_thesis_code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2Fbc_thesis_code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2Fbc_thesis_code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lastaapps","download_url":"https://codeload.github.com/Lastaapps/bc_thesis_code/tar.gz/refs/heads/bc_thesis","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2Fbc_thesis_code/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261582443,"owners_count":23180594,"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":"2025-05-25T15:30:42.157Z","updated_at":"2025-06-24T00:30:53.618Z","avatar_url":"https://github.com/Lastaapps.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAC-colorings search: complexity and algorithms\n\n\u003e Flexible realizations existence: NP-completeness on sparse graphs and algorithms\n\n*Petr Laštovička and Jan Legerský*\n\nIn this repository, we provide our code for the NAC-coloring search algorithm\ndescribed in a [bachelor thesis](https://github.com/LastaApps/bc_thesis)\nand in our [paper](https://www.arxiv.org/abs/2412.13721).\nWe prepared a notebook `NAC_playground.ipynb` where\nyou can experiment with the algorithm and\n`NAC_presentation.ipynb` in which you can see how we run and analyze benchmarks.\nYou can also run them yourself.\nTo understand interface overview more in detail, we recommend reading\nchapter *Implementation* in the thesis.\n\n## Setup\n\nPython 3.12 or higher is required.\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n## Tests\n\nYou can run tests by executing `pytest`.\nThe packages also contains base for Cartesian NAC-coloring search,\nthe related tests are skipped for now as it is not yet fully implemented\nfor every approach.\n\n## Structure\n\n- `nac` - the implementation of our NAC-coloring related algorithms and heuristics\n- `stablecut` - the implementation of an algorithm to search for stable cuts\n- `benchmarks` - utility files related to benchmarks - graphs loading, generation, analysis notebook utility functions\n- `benchmarks/precomputed` - Results of the benchmarks as run on our hardware\n- `graphs_store` - stores generated graphs of selected classes\n\nFor complete and more exhaustive documentation, see [the code](https://github.com/LastaApps/NAC-colorings).\n\n## Graphs dataset\n\nWe list sources of the graph classes and generation tools used\nto create graph datasets of specific graph classes.\nBenchmarks later use these graphs to perform algorithms comparison.\nAll the graphs are stored in the `graphs_store` directory.\nFor proper description, see the thesis.\n\n### Minimally rigid graphs\n\nWe listed all minimally rigid graphs\nusing [Nauty](https://pallini.di.uniroma1.it/)\nwith [nauty-laman-plugin](https://github.com/martinkjlarsson/nauty-laman-plugin).\n\nWe swiftly describe the folder contents:\n`./nauty/minimally_rigid_all` holds all the minimally rigid graphs with the given number of vertices (up to 12 vertices).\n\nFor benchmarks, minimally rigid graphs were generated randomly as Nauty generates graphs\nthat are quite similar - this is problem for larger graph sizes\nwhere if we want to have diverse dataset, it becomes faster to find random graphs than generate them using Nauty.\nRandom minimally rigid graphs are stored in the `./random/minimally_rigid` folder.\n\n### No 3 nor 4 cycles\n\nThe class of graphs that have no 3 nor 4 cycles was obtained from\n[users.cecs.anu.edu.au (external)](https://users.cecs.anu.edu.au/~bdm/data/extremal.html).\n\nFor previous testing we also used some graph classes from\n[users.cecs.anu.edu.au](https://users.cecs.anu.edu.au/~bdm/data/graphs.html).\nUnfortunately these were not as interesting as not large enough graphs were available.\n\n### Globally rigid graphs\n\nGlobally rigid graphs were generated by generating random graphs that\nhave no or just few NAC-colorings and checking if they are rigid.\n\n### Graphs with no NAC-coloring\n\nThese were generated randomly and only graphs with significant number of\ntriangle connected components were kept (we did not find graphs with more monochromatic classes).\n\n## License\n\nThe code is licensed under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastaapps%2Fbc_thesis_code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flastaapps%2Fbc_thesis_code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastaapps%2Fbc_thesis_code/lists"}