Skip to content

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

License

Notifications You must be signed in to change notification settings

lucasmccabe/tusc

Repository files navigation

PyPI version Documentation Status Build Status Downloads 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

Setup

With pip:

pip install tusc
(FYSA: this repository is tested on Python 3.8 only)

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages