This is a guest post by Nathann Cohen.
New combinatorial designs in Sage
Below, these graphs are a decomposition of a $K_{13}$ (i.e. the complete graph on 13 points) into copies of $K_4$. Pick two vertices you like: they appear exactly once together in one of the $K_4$.
The second graph shows a decomposition of
a $K_{4,4,4}$ (i.e. the complete multipartite graph on $4\times 3$ points) into
copies of $K_3$. Pick two vertices you like from different groups: they
appear exactly once together in one of the $K_4$.
Sage has gotten quite good at building such decompositions (a specific kind of combinatorial designs) when they exist. This post is about them.
The second belongs to the family of Transversal Designs (or $TD(k,n)$) which have a similar definition: consider a set $X$ containing $k$ groups (here $k=3$) of $n$ vertices (here $n=4$). A collection $\mathcal S$ of sets, each of which contains one point from each group, is a $TD(k,n)$ if any two points from different groups appear together in exactly one set of $\mathcal S$.
The main problem with combinatorial designs is to know where they exist. And that is not obvious. Sage does what it can on about that:
- If you want it to build a $(14,4)$-BIBD, it will tell you that none exists.
- If you want it to build a $(16,4)$-BIBD, it will tell you that one exists.
- If you want it to build a $(51,6)$-BIBD, it will tell you that it just not know if there is one (and nobody knows better at the moment)
sage: designs.balanced_incomplete_block_design(14,4,existence=True)
False
sage: designs.balanced_incomplete_block_design(16,4,existence=True)
True
sage: designs.balanced_incomplete_block_design(51,6,existence=True)
Unknown
For a developer (and design lover), the game consists in teaching Sage how to build all combinatorial designs that appear in some research paper. For BIBD as well as for Transversal Designs, on which a LOT of sweat was spent these last months.
For Transversal designs the game is a bit different, as we know that a $TD(k-1,n)$ exists whenever a $TD(k,n)$ exists. Thus, the game consists in finding the largest integer $k_n$ such that a $TD(k_n,n)$ exists. This game is hardly new, and hardly straightforward: In the Handbook of Combinatorial Designs, one can find the table of such $k$ up to $n=10000$ (see here).
The good thing about Sage is that it does not just claim that such a design exists: it also builds it, and there is no better existence proof than that (it is very very quick to check that a combinatorial design is valid). The other good thing is that there is no common database for such data (the Handbook is not updated/printed every night), and that by teaching Sage all new designs found by researchers we build such a database. And it already contains designs that were not known when the Handbook was printed.
Finally, the other other good thing about Sage is that it will soon be able to tell you where those designs
Sage knows. It must know it, in order to build these designs anyway. And you can find that data inside. And soon, we will teach it to give you the bibliographical references of the papers in which you can find the right construction to produce the $TD(k,n)$ that you want. And we will provide the right parameters. And the world will be at peace.
A couple of things before we part:
- Transversal Designs (TD), Orthogonal Arrays (OA), and Mutually Orthogonal Latin Squares (MOLS) are all equivalent objects.
- We write a LOT of Transversal Designs code these days, so expect all this to improve very fast.
- You can learn what Sage knows of combinatorial designs right here.
Have fuuuuuuuuuuuuuuuuuuun !
Nathann