{"id":32178484,"url":"https://github.com/libsemigroups/libsemigroups","last_synced_at":"2026-03-14T12:50:30.227Z","repository":{"id":2581557,"uuid":"46903385","full_name":"libsemigroups/libsemigroups","owner":"libsemigroups","description":"C++ library for semigroups and monoids","archived":false,"fork":false,"pushed_at":"2025-10-17T17:56:22.000Z","size":52168,"stargazers_count":63,"open_issues_count":48,"forks_count":34,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-10-21T20:56:15.327Z","etag":null,"topics":["c-plus-plus-17","computer-algebra","congruence","enumeration","monoid","semigroup"],"latest_commit_sha":null,"homepage":"http://libsemigroups.github.io/libsemigroups/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libsemigroups.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-11-26T04:10:01.000Z","updated_at":"2025-10-17T17:56:28.000Z","dependencies_parsed_at":"2023-02-16T18:16:10.376Z","dependency_job_id":"ea706a3a-2239-477c-a019-9a20fccf041d","html_url":"https://github.com/libsemigroups/libsemigroups","commit_stats":{"total_commits":988,"total_committers":19,"mean_commits":52.0,"dds":"0.16801619433198378","last_synced_commit":"80ecf4eeac9aa05b369919390b98d01f078cac54"},"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"purl":"pkg:github/libsemigroups/libsemigroups","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsemigroups%2Flibsemigroups","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsemigroups%2Flibsemigroups/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsemigroups%2Flibsemigroups/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsemigroups%2Flibsemigroups/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libsemigroups","download_url":"https://codeload.github.com/libsemigroups/libsemigroups/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsemigroups%2Flibsemigroups/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280333501,"owners_count":26312845,"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-10-21T02:00:06.614Z","response_time":58,"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":["c-plus-plus-17","computer-algebra","congruence","enumeration","monoid","semigroup"],"created_at":"2025-10-21T20:56:29.540Z","updated_at":"2025-10-21T20:56:31.794Z","avatar_url":"https://github.com/libsemigroups.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nDistributed under the terms of the GPL license version 3.\n\nThe full license is in the file LICENSE, distributed with this\nsoftware.\n--\u003e\n\n# libsemigroups\n\n[![image](https://img.shields.io/conda/dn/conda-forge/libsemigroups)](https://github.com/conda-forge/libsemigroups-feedstock)\n[![image](https://zenodo.org/badge/DOI/10.5281/zenodo.1437752.svg)](https://doi.org/10.5281/zenodo.1437752)\n[![image](https://anaconda.org/conda-forge/libsemigroups/badges/license.svg)](https://anaconda.org/conda-forge/libsemigroups)\n[![image](https://anaconda.org/conda-forge/libsemigroups/badges/platforms.svg)](https://anaconda.org/conda-forge/libsemigroups)\n[![codecov](https://codecov.io/gh/libsemigroups/libsemigroups/graph/badge.svg?token=lLBnFR6mq5)](https://codecov.io/gh/libsemigroups/libsemigroups)\n\n## What is libsemigroups?\n\n`libsemigroups` is a C++17 library containing implementations of several\nalgorithms for computing finite, and finitely presented, semigroups and\nmonoids. The main algorithms implemented in `libsemigroups` are:\n\n- the [Froidure-Pin algorithm][] for computing semigroups and monoids defined\n  by a generating set consisting of elements whose multiplication and equality is\n  decidable (such as [transformations, partial permutations, permutations][],\n  [bipartitions][], and [matrices over a semiring][]) in the\n  [`libsemigroups::FroidurePin`][] class template;\n- Kambites' algorithm for solving the word problem in small overlap monoids\n  from [\"Small overlap monoids I: The word problem\"][], and the algorithm from\n  [\"An explicit algorithm for normal forms in small overlap monoids\"][] in the\n  class template [`libsemigroups::Kambites`][];\n- the [Knuth-Bendix algorithm] for finitely presented semigroups and monoids\n  in the class template [`libsemigroups::KnuthBendix`][];\n- a version of Sims' low index subgroup algorithm for computing congruences of a\n  semigroup or monoid from\n  [\"Computing finite index congruences of finitely presented semigroups and monoids\"][]\n  in the classes [`libsemigroups::Sims1`][] and [`libsemigroups::Sims2`][];\n- a generalized version of the algorithms described in\n  [\"Green's equivalences in finite semigroups of binary relations\"][] by\n  Konieczny, and\n  [\"On the determination of Green's relations in finite transformation semigroups\"][]\n  by Lallement and Mcfadden for computing finite semigroups and monoids\n  admitting a pair of actions with particular properties, in the class template\n  [`libsemigroups::Konieczny`][];\n- the algorithm from [\"Efficient Testing of Equivalence of Words in a Free Idempotent Semigroup\"][]\n  by Radoszewski and Rytter in the function [`libsemigroups::freeband_equal_to`][];\n- a non-random version of the [Schreier-Sims algorithm][]\n  for permutation groups in the class template [`libsemigroups::SchreierSims`][];\n- a version of Stephen's procedure from\n  [\"Applications of automata theory to presentations of monoids and inverse monoids\"][]\n  for finitely presented inverse semigroups and monoids (for a given word `w` this\n  procedure is for determining words equivalent to `w` or that are\n  left divisors of `w`) in the class template [`libsemigroups::Stephen`][];\n- the [Todd-Coxeter algorithm][] for finitely presented semigroups and monoids;\n  in the class template [`libsemigroups::ToddCoxeter`][]; see also\n  [\"The Todd–Coxeter algorithm for semigroups and monoids\"][].\n\n`libsemigroups` is partly based on\n[Algorithms for computing finite semigroups][Froidure-Pin algorithm],\n[Expository Slides][], and [Semigroupe 2.01][] by [Jean-Eric Pin][].\n\n[Froidure-Pin algorithm]: https://www.irif.fr/~jep/PDF/Rio.pdf\n[\"Small overlap monoids I: The word problem\"]: https://doi.org/10.1016/j.jalgebra.2008.09.038\n[\"An explicit algorithm for normal forms in small overlap monoids\"]: https://doi.org/10.1016/j.jalgebra.2023.04.019\n[Knuth-Bendix algorithm]: https://en.wikipedia.org/wiki/Knuth%E2%80%93Bendix_completion_algorithm\n[\"Computing finite index congruences of finitely presented semigroups and monoids\"]: https://arxiv.org/abs/2302.06295\n[\"Green's equivalences in finite semigroups of binary relations\"]: https://link.springer.com/article/10.1007/BF02573672\n[\"On the determination of Green's relations in finite transformation semigroups\"]: https://www.sciencedirect.com/science/article/pii/S0747717108800570\n[\"Efficient Testing of Equivalence of Words in a Free Idempotent Semigroup\"]: https://link.springer.com/chapter/10.1007/978-3-642-11266-9_55\n[\"Applications of automata theory to presentations of monoids and inverse monoids\"]: https://digitalcommons.unl.edu/dissertations/AAI8803771/\n[Todd-Coxeter algorithm]: https://en.wikipedia.org/wiki/Todd%E2%80%93Coxeter_algorithm\n[\"The Todd–Coxeter algorithm for semigroups and monoids\"]: https://doi.org/10.1007/s00233-024-10431-z\n[Schreier-Sims algorithm]: https://en.wikipedia.org/wiki/Schreier%E2%80%93Sims_algorithm\n[Expository Slides]: https://www.irif.fr/~jep/PDF/Exposes/StAndrews.pdf\n[Semigroupe 2.01]: https://www.irif.fr/~jep/Logiciels/Semigroupe2.0/semigroupe2.html\n[Jean-Eric Pin]: https://www.irif.fr/~jep/\n\n`libsemigroups` is used in the [Semigroups package for\nGAP](https://semigroups.github.io/Semigroups), and it\nis possible to use `libsemigroups` directly in Python 3 via the package\n[libsemigroups_pybind11](https://libsemigroups.github.io/libsemigroups_pybind11/).\nThe development version of `libsemigroups` is available on\n[github](https://github.com/libsemigroups/libsemigroups), and some\nrelated projects are [here](https://github.com/libsemigroups).\n\n## Design principles\n\nThe main classes in `libsemigroups` are named after the algorithms they\nimplement; see, for example, [`libsemigroups::FroidurePin`][],\n[`libsemigroups::Konieczny`][], [`libsemigroups::ToddCoxeter`][],\n[`libsemigroups::Kambites`][], [`libsemigroups::KnuthBendix`][],\n[`libsemigroups::SchreierSims`][], [`libsemigroups::Sims1`][], [`libsemigroups::Sims2`][],\nor [`libsemigroups::Stephen`][].\n\n`libsemigroups` is a modern open source C++ library designed to be:\n\n- **state of the art**: the mathematical underpinnings of several of the\n  algorithms in `libsemigroups` originate from the authors and contributors; and the\n  other algorithms are adapted from the literature (see above for details);\n- **extensible**: [`libsemigroups::FroidurePin`][], [`libsemigroups::Konieczny`][], and\n  [`libsemigroups::SchreierSims`][] are generic and can be adapted to user-defined\n  types;\n- **adaptable**: the behaviour of many algorithms implementing in `libsemigroups`\n  can be fine-tuned via many settings, and used interactively via the functions\n  [`libsemigroups::Runner::run_for`][] and [`libsemigroups::Runner::run_until`][];\n- **easy to use**: converting between different types of `libsemigroups`\n  objects (see [the `to` function][]) is easy; there are many\n  helper functions to streamline common tasks; high quality exception messages\n  are implemented throughout the code base (although you don't have to use these\n  if you don't want to); long running algorithms can provide detailed feedback on\n  their progress (see [`libsemigroups::ReportGuard`][]); many data structures can be\n  visualised using graphviz (see [`libsemigroups::Dot`][] and\n  [Visualisation][]);\n  and there are hundreds of examples in the [tests][] directory.\n- **fast**: `libsemigroups` is designed with performance in mind; several\n  classes implement parallel algorithms ([`libsemigroups::Sims1`][],\n  [`libsemigroups::Sims2`][], [`libsemigroups::Congruence`][]);\n  we provide some \"winner takes all\" mechanisms for running algorithms\n  concurrently (see [`libsemigroups::Congruence`][]); there are\n  `_no_checks` versions of most functions if performance is critical.\n\n## How to use libsemigroups\n\nSee the documentation \u003chttps://libsemigroups.github.io/libsemigroups/\u003e.\n\n## Installation\n\nSee [the installation page](docs/install.md) for more info.\n\n## Issues\n\nIf you find any problems with `libsemigroups`, or have any suggestions\nfor features that you'd like to see, please use the [issue\ntracker](https://github.com/libsemigroups/libsemigroups/issues).\n\n## Dependencies\n\n`libsemigroups` uses:\n\n- [Catch2](https://github.com/catchorg/Catch2) for tests and benchmarks;\n- [eigen](http://eigen.tuxfamily.org/) for some linear algebra computations;\n- [fmt](https://github.com/fmtlib/fmt) for string formatting;\n- [HPCombi](https://github.com/libsemigroups/HPCombi) which uses the SSE and AVX\n  instruction sets for very fast manipulation of transformations, partial\n  permutations, permutations, and boolean matrices of small size;\n- [backward-cpp](https://github.com/bombela/backward-cpp) for beautiful\n  backtraces;\n- [magic_enum](https://github.com/Neargye/magic_enum) for static reflection for\n  enums;\n- [rx-ranges](https://github.com/simonask/rx-ranges) the minimalist ranges\n  library for C++17.\n\nWe'd like to thank the authors and contributors to these excellent projects!\n\n## Acknowledgements\n\nWe thank:\n\n- [OpenDreamKit](https://opendreamkit.org/) Horizon 2020 European Research\n  Infrastructures project (#676541);\n- the [Carnegie Trust for the Universities of Scotland][] for funding the PhD scholarship of\n  [Julius Jonušas][];\n- the [EPSRC](https://epsrc.ukri.org/) for funding the PhD scholarships of\n  [Michael Young][], [Finn Smith][], and [Reinis Cirpons][] (EP/M506631/1,\n  EP/N509759/1 and EP/V520123/1);\n- the [School of Mathematics and Statistics, University of St Andrews][] for\n  funding the PhD scholarships of [Maria Tsalakou][], [Joseph Edwards][], and\n  Murray Whyte;\n- the Cyprus State Scholarship Foundation for their financial support for\n  [Maria Tsalakou][].\n\n[Finn Smith]: https://flsmith.github.io\n[Joseph Edwards]: https://github.com/Joseph-Edwards\n[Julius Jonušas]: http://julius.jonusas.work/\n[Maria Tsalakou]: https://mariatsalakou.github.io/\n[Michael Young]: https://mtorpey.github.io/\n[Reinis Cirpons]: https://reinisc.id.lv\n[Carnegie Trust for the Universities of Scotland]: https://www.carnegie-trust.org/\n[School of Mathematics and Statistics, University of St Andrews]: https://www.st-andrews.ac.uk/mathematics-statistics/\n[Visualisation]: https://libsemigroups.github.io/libsemigroups/group__dot__group.html\n[`libsemigroups::Congruence`]: https://libsemigroups.github.io/libsemigroups/group__congruence__class__group.html\n[`libsemigroups::FroidurePin`]: https://libsemigroups.github.io/libsemigroups/classlibsemigroups_1_1_froidure_pin.html\n[`libsemigroups::Kambites`]: https://libsemigroups.github.io/libsemigroups/group__kambites__class__group.html\n[`libsemigroups::KnuthBendix`]: https://libsemigroups.github.io/libsemigroups/group__knuth__bendix__class__group.html\n[`libsemigroups::Konieczny`]: https://libsemigroups.github.io/libsemigroups/group__konieczny__group.html\n[`libsemigroups::SchreierSims`]: https://libsemigroups.github.io/libsemigroups/group__schreier__sims__group.html\n[`libsemigroups::Sims1`]: https://libsemigroups.github.io/libsemigroups/classlibsemigroups_1_1_sims1.html\n[`libsemigroups::Sims2`]: https://libsemigroups.github.io/libsemigroups/classlibsemigroups_1_1_sims2.html\n[`libsemigroups::Stephen`]: https://libsemigroups.github.io/libsemigroups/group__stephen__group.html\n[`libsemigroups::ToddCoxeter`]: https://libsemigroups.github.io/libsemigroups/group__todd__coxeter__class__group.html\n[`libsemigroups::freeband_equal_to`]: https://libsemigroups.github.io/libsemigroups/group__freeband__group.html\n[bipartitions]: https://libsemigroups.github.io/libsemigroups/group__bipart__group.html\n[matrices over a semiring]: https://libsemigroups.github.io/libsemigroups/group__matrix__group.html\n[tests]: https://github.com/libsemigroups/libsemigroups/tree/main/tests\n[the `to` function]: https://libsemigroups.github.io/libsemigroups/group__to__group.html\n[transformations, partial permutations, permutations]: https://libsemigroups.github.io/libsemigroups/group__transf__group.html\n[`libsemigroups::ReportGuard`]: https://libsemigroups.github.io/libsemigroups/structlibsemigroups_1_1_report_guard.html\n[`libsemigroups::Dot`]: https://libsemigroups.github.io/libsemigroups/classlibsemigroups_1_1_dot.html\n[`libsemigroups::Runner::run_for`]: https://libsemigroups.github.io/libsemigroups/classlibsemigroups_1_1_runner.html\n[`libsemigroups::Runner::run_until`]: https://libsemigroups.github.io/libsemigroups/classlibsemigroups_1_1_runner.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibsemigroups%2Flibsemigroups","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibsemigroups%2Flibsemigroups","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibsemigroups%2Flibsemigroups/lists"}