WIP Python library providing tools for combinatorial maths (partially-ordered sets, graph polynomials, etc.).
pip install tusc
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
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
This project was created with:
requests==2.24.0
numpy==1.19.5
sympy==1.6.2
networkx==2.5
- Lucas Hurley McCabe (email)