Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_semigroup_homology-0.0.2.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fast_semigroup_homology-0.0.2-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

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

Hashes for fast_semigroup_homology-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0ea3cd839bf7335f2c91044a9da7f7c3da6980951948df6879b35c3c5aafb05f
MD5 bd4c42048eda90b59fed1576168f4ef1
BLAKE2b-256 20c3a5e882e0247b99dcb1b15f196f7f778c0ef4ad26de3f31fd02c648cc31ae

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fast_semigroup_homology-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_semigroup_homology-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a030364b394bed6a07733318db6422d3b47363df229ed169993c6acccb57d155
MD5 d526ffdfeeeb5e01d676292bb1217d0f
BLAKE2b-256 64073a6190e3cdb8660fba818a4184a0caf90efd70f2b71ef1a8f2a5eddcfe49

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page