Skip to content

vincentxwang/ChipFiring.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChipFiring.jl

Stable Dev Build Status codecov

ChipFiring.jl is a Julia package for analyzing chip-firing games on graphs. The codes are roughly based on the algorithms given in Sandpiles and Divisors: An Introduction to Chip-Firing by Corry and Perkinson (2018). A key objective is for the package to be useful for both researchers and students. Its features include:

  • 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
  • Conversion from graph6 format

Installation

This package is on the official Julia registry and can be installed via Pkg.add(ChipFiring). For more details, see the documentation here.

Basic Usage

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])

Acknowledgements

This package was developed during the SMALL 2025 REU hosted at Williams College, funded by NSF Grant DMS2241623. Special thanks to Charlotte Chen, Benham Cobb, Ralph Morrison, Noam Pasman, Madeline Reeve, for contributing code and/or feedback.

About

A high-performance Julia package for analysis of chip-firing games on graphs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages