flag algebra package for permutations

View the Project on GitHub jsliacan/permpack

About Permpack

Permpack is a SageMath package aiming to automate flag algebras computations. It is meant to be very simple to start using (no installation trouble) and intuitive to continue using (friendly syntax and output). Permpack only supports one kind of structure: permutations. If you need to flag other structures (graphs, 3-regular hypergraphs, directed graphs, multigraphs) have a look at Flagmatic by Emil Vaughan (2013). The original Flagmatic-2.0 (with only installation modifications to run on Sage 7.2) can be found here. I wrote Permpack instead of modifying Flagmatic because it was simpler.

Installation & usage

Click on one of the buttons in the upper left part of the page to download permpack. Then follow the instructions in the README file. You will need Sage. It can be obtained from

In the future, I will add information about usage too.

Flag Algebras

The first item in the list is Razborov's original paper. The remaining papers/notes/theses are much easier to read. All texts explain flag algebras on graphs or 3-regular hypergraphs.

  1. Flag Algebras by Razborov
  2. Notes on graph limits by Dan Kráľ for the 2016 Sau Paolo School of Advanced Science on Algorithms, Combinatorics and Optimization
  3. PhD thesis Analytic methods in combinatorics by Jan Volec
  4. On applications of Razborov’s flag algebra calculus to extremal 3-graph theory by Falgas-Ravry and Vaughan
  5. Hypergraphs do jump by Baber and Talbot

Help and Contact

Having trouble with permpack? Contact me and I may be able to help. Or even better, have a look at the code and make improvements! Thanks.