I’m happy to announce ChipFiring.jl, a package for computations on chip-firing graphs that I worked on last summer!
The main purpose of this package is computing gonalities on discrete graphs (in the sense of Baker–Norine), though we also support related operations. We’ve designed this to be simple to use, but also optimized for intensive uses like searching over families of graphs.
More specifically, we support the following:
- Basic operations on chip-firing graphs (e.g. firing, lending)
- Computations of r-th graph gonality
- Uniform subdivisions of graphs
- Rank computations
- q-reduction, Dhar’s burning algorithm, and equivalence testing
- Conversion from graph6 format
Example
julia> multiplicity_matrix = [
0 2 0 1;
2 0 1 0;
0 1 0 1;
1 0 1 0
]
[output omitted]
julia> g = ChipFiringGraph(multiplicity_matrix)
Graph(V=4, E=5, Edges=[(1, 2), (1, 2), (1, 4), (2, 3), (3, 4)])
julia> compute_gonality(g)
2
julia> d = Divisor([1, 1, 1, 1])
Divisor([1, 1, 1, 1])
julia> q_reduced(g, d, 1)
Divisor([-4, 1, 1, 0])