Compute homology of finite semigroups and monoids
Project description
Fast Semigroup Homology
This is a package for computing the integral homology of finite semigroups. It is very fast in most cases:
$ python -m fast_semigroup_homology -i "010100;010100;232322;232322;010100;010100" -d 12
H_0: Z
H_1: trivial
H_2: Z
H_3: Z^2
H_4: Z^4
H_5: Z^8
H_6: Z^16
H_7: Z^32
H_8: Z^64
H_9: Z^128
H_10: Z^256
H_11: Z^512
H_12: Z^1024
Elapsed (wall) time: 0:00:00.001716
Installation: pip install fast_semigroup_homology
Usage
To compute the homology of an individual semigroup with the command line,
run python -m fast_semigroup_homology -i "01;10" -d 10 as above, replacing
the string that follows -i with the multiplication table for some semigroup.
Such a multiplication table must be entered as strings of digits separated by semicolons,
all wrapped in quotes. Letters (as in hexadecimal) are also supported
to allow semigroups of size at most 10+26=36 to be passed in quotes after -i.
The integer following -d indicates the maximum dimension to compute to.
Alternatively, you can use this library from python code:
>>> from fast_semigroup_homology import fast_integral_semigroup_homology as h
>>> h([[0,1],[1,0]], 10) # Homology of C2
[{0: 1}, {2: 1}, {}, {2: 1}, {}, {2: 1}, {}, {2: 1}, {}, {2: 1}, {}]
If you have a folder of HDF5 files like those produced by Semisearch, you can instead run:
python -m fast_semigroup_homology -f /PATH/TO/FOLDER -o MAXORDER -d MAXDIM -c NUM_CORES
This will make a folder called results in the current working directory with .hdf5 files
containing the homology groups [H_0, ... H_MAXDIM] of the semigroups
from the files order1.hdf5 through orderMAXORDER.hdf5 in the folder passed after -f.
If NUM_CORES is specified, that many processes will compute in parallel.
Beware that some calculations can require a lot of memory, so making NUM_CORES
too high can make the program crash. If you are running out of
memory, you can also try adding swap space.
My results folder is also stored in this repository, which you can browse and download. This is not included when pip installs this package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fast_semigroup_homology-0.0.2.tar.gz.
File metadata
- Download URL: fast_semigroup_homology-0.0.2.tar.gz
- Upload date:
- Size: 32.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ea3cd839bf7335f2c91044a9da7f7c3da6980951948df6879b35c3c5aafb05f
|
|
| MD5 |
bd4c42048eda90b59fed1576168f4ef1
|
|
| BLAKE2b-256 |
20c3a5e882e0247b99dcb1b15f196f7f778c0ef4ad26de3f31fd02c648cc31ae
|
Provenance
The following attestation bundles were made for fast_semigroup_homology-0.0.2.tar.gz:
Publisher:
test_build_publish.yml on sweeneyde/fast_semigroup_homology
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fast_semigroup_homology-0.0.2.tar.gz -
Subject digest:
0ea3cd839bf7335f2c91044a9da7f7c3da6980951948df6879b35c3c5aafb05f - Sigstore transparency entry: 1000273781
- Sigstore integration time:
-
Permalink:
sweeneyde/fast_semigroup_homology@49e64bd992218198fad7cadccae664c7208facc9 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/sweeneyde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_build_publish.yml@49e64bd992218198fad7cadccae664c7208facc9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fast_semigroup_homology-0.0.2-py3-none-any.whl.
File metadata
- Download URL: fast_semigroup_homology-0.0.2-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a030364b394bed6a07733318db6422d3b47363df229ed169993c6acccb57d155
|
|
| MD5 |
d526ffdfeeeb5e01d676292bb1217d0f
|
|
| BLAKE2b-256 |
64073a6190e3cdb8660fba818a4184a0caf90efd70f2b71ef1a8f2a5eddcfe49
|
Provenance
The following attestation bundles were made for fast_semigroup_homology-0.0.2-py3-none-any.whl:
Publisher:
test_build_publish.yml on sweeneyde/fast_semigroup_homology
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fast_semigroup_homology-0.0.2-py3-none-any.whl -
Subject digest:
a030364b394bed6a07733318db6422d3b47363df229ed169993c6acccb57d155 - Sigstore transparency entry: 1000273851
- Sigstore integration time:
-
Permalink:
sweeneyde/fast_semigroup_homology@49e64bd992218198fad7cadccae664c7208facc9 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/sweeneyde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_build_publish.yml@49e64bd992218198fad7cadccae664c7208facc9 -
Trigger Event:
release
-
Statement type: