Skip to main content

Permualgebra

This package allows user to do permutations calculation in terms of Modern Algebra.

Install

pip install permualgebra

Permutation

Definition

Let S be a set of n distinct elements. A permutation of S is a bijection

Definition

For example, let S = {1, 2, 3, 4, 5, 6}, define

i 1 2 3 4 5 6
p(i) 6 3 2 4 5 1

Or a permutation can be written in cycle notation, where we often omit the 1-cycles:

cycle notation

this cycle notation is also the way that this package express a permutation.

The length of a cycle is the number of elements of S in that cycle.

The length of a permutation is the number of cycles in that permutation.

Theorem

Every permutation on S = {1, ..., n} can be written as a product of disjoint cycles. i.e. no elements of S is repeated in the cycle description.

import permualgebra as pm
p = pm.Permutation(["3 6 4 2", "1 3 4 6", "5 2 1 3"])
print(p)		# (3 6 4 2)(1 3 4 6)(5 2 1 3)
pSimplify = p.getSimplify()
print(pSimplify)# (1 2 6)(3 5)
p.simplify()
print(p)		# (1 2 6)(3 5)

Suppose we have 2 permutations:

pq

we can compose them as

compose

Note. composition of permutations is not commutative.

Not Commutative

This package implements the composition of permutation as multiplication.

import permualgebra as pm

p = pm.Permutation(["1 5", "2 4 6"])
q = pm.Permutation(["1 3 5 4", "2 6"])
p.simplify()
q.simplify()
print((p*q).getSimplify())	# (1 3)(4 5 6)
print((q*p).getSimplify())	# (1 4 2)(3 5)

To Do

  • Errors and Exceptions
  • More detailed wiki and documentation.

Metadata

Release files for permualgebra 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for permualgebra 0.0.1
File Size Uploaded Provenance Actions
permualgebra-0.0.1.tar.gz 4.2 kB Without provenance Details for permualgebra-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for permualgebra 0.0.1
File Interpreter ABI Platform Actions
permualgebra-0.0.1-py3-none-any.whl Python 3 none any Details for permualgebra-0.0.1-py3-none-any.whl

Total release size: 21.3 kB

Release files / permualgebra-0.0.1.tar.gz

Download URL permualgebra-0.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
05310231b501606aa9b5e3bbd9cb202579dce22b9abd6def1b9285162b98fd5e
BLAKE2b-256 checksum
How to use checksums
7497b8c63d6de6ed49eefebe7603b94d0184bb14b8f05f86fd5f1b67be48d1de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

Release files / permualgebra-0.0.1-py3-none-any.whl

Download URL permualgebra-0.0.1-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80bb29e8523cc6317f2a8d157c45c3a9227a3e2435fe43ced713629e27684dbd
BLAKE2b-256 checksum
How to use checksums
909baa898c5100b511e26b3cfa8e885ba329f2115cd71f66964903b1cea8e3e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

Security for permualgebra 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page