Skip to main content

a Python library providing tools for combinatorial maths

Project description

Documentation Status Build Status MIT license

TUSC ๐Ÿ˜: Toolbox for Understanding Some things in Combinatorics

WIP Python library providing tools for combinatorial maths (partially-ordered sets, graph polynomials, etc.).

elephant_header

Table of Contents

Example Usage

Retrieving the Tutte polynomial for the five-vertex cycle graph (C5):

import tusc
import networkx as nx

C5 = nx.cycle_graph(5)
tutte_C5 = tusc.graph.polynomial.Tutte(C5)
tutte_C5.polynomial
'x^4 + x^3 + x^2 + x + y'

Evaluating the polynomial to find the number of acyclic orientations of C5:

tutte_C5.evaluate(2, 0)
30

Repo Organization

This repo is organized as follows:

tusc
โ”œโ”€โ”€ tusc
โ”‚   โ”œโ”€โ”€ general  # general utilities, e.g. OEIS lookup
โ”‚   โ”‚   โ”œโ”€โ”€ utils
โ”‚   โ”œโ”€โ”€ graph  # graph problems, retrieving graph polynomials
โ”‚   โ”‚   โ”œโ”€โ”€ distance
โ”‚   โ”‚   โ”œโ”€โ”€ enumeration  # enumerative problems, e.g. counting spanning trees
โ”‚   โ”‚   โ”œโ”€โ”€ manipulation
โ”‚   โ”‚   โ”œโ”€โ”€ matching
โ”‚   โ”‚   โ”œโ”€โ”€ polynomial  # retrieving graph polynomials (e.g. Tutte, chromatic)
โ”‚   โ”œโ”€โ”€ posets    # constructing and analyzing partially-ordered sets
โ”‚   โ”‚   โ”œโ”€โ”€ utils
โ”‚   โ”‚   โ”œโ”€โ”€ example_posets
โ”‚   โ”‚   โ”œโ”€โ”€ poset
โ”œโ”€โ”€ tests
โ”‚   โ”œโ”€โ”€ general
โ”œโ”€โ”€ assets
โ”œโ”€โ”€ docs

Requirements

This project was created with:

  • requests==2.24.0
  • numpy==1.19.5
  • sympy==1.6.2
  • networkx==2.5

Contact

  • Lucas Hurley McCabe (email)

License

MIT

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

tusc-0.0.2.tar.gz (11.8 kB view hashes)

Uploaded Source

Built Distribution

tusc-0.0.2-py3-none-any.whl (24.5 kB view hashes)

Uploaded Python 3

Supported by

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