scieee AI-readable full text Open interactive document viewer

Supplementary software to "Counting fibres of the Hadamard product using Bergman fans"

Clarke, Oliver; Dewar, Sean; Gallet, Matteo; Grasegger, Georg; Green Tripp, Daniel; Smith, Ben

Abstract

Supplementary software for the paper "Counting fibres of the Hadamard product using Bergman fans" by Oliver Clarke, Sean Dewar, Matteo Gallet, Georg Grasegger, Daniel Green Tripp, and Ben Smith. This repository contains the following files: flipProduct.m2 (Macaulay2 code) nbcBases.m2 (Macaulay2 code) restrictiondeletion.m2 (Macaulay2 code) samples.m2 (Macaulay2 code) supplementary_software.pdf (Description file) The file flipProduct.m2 contains the main Macaulay2 procedure, flipProduct. For further information, see the description file.

Full text

Supplementary software for “Counting fibres of the Hadamard product using Bergman fans” Oliver Clarke∗Sean Dewar†Matteo Gallet‡Georg Grasegger§ Daniel Green Tripp¶Ben Smith‖ 1 Description The Zenodo repository ‘Supplementary software to “Counting fibres of the Hadamard product using Bergman fans”’ (DOI:10.5281/zenodo.17692526) contains the following files: •flipProduct.m2 •nbcBases.m2 •restrictiondeletion.m2 •samples.m2 •table.pdf The files with extension “m2” are Macaulay2 files, while the file table.pdf contains a table with the number of matroids on [n]of rank kup to isomorphism with pnbc-bases. The main file is flipProduct.m2, which contains the flipProduct function. This function computes the flip product of two matroids by implementing the recursive formula in [1, Theorem 1.4]. The file nbcBases.m2 contains the nbcBases function, which computes the number of nbc-bases of a matroid. The file restrictiondeletion.m2 contains a reimplementation of the methods of deletion and contraction of a matroid in the package Matroids for Macaulay2. This reimplementation is necessary because the original ones did not respect the ordering of the ground set, which is key in the recursive function flipProduct. The file samples.m2 contains the samples of code reported in the next section of this document. 2 Examples The code below tallys the flip products of matroids with themselves for each matroid of rank 4 on [7] up to isomorphism. ∗Department of Mathematical Sciences, Durham University †Numerical Analysis and Applied Mathematics (NUMA), KU Leuven ‡Department of Mathematics, Informatics and Geosciences, University of Trieste §Johann Radon Institute for Computational and Applied Mathematics, Austrian Academy of Sciences ¶School of Mathematics, University of Bristol ‖School of Mathematical Sciences, Lancaster University 1 [ ]: load "flipProduct.m2" L = allMatroids(7, 4); tally for Min Llist flipProduct(M, M, BaseCase=>1, FormulaViaFlats => true) Recall that the flip product of a matroid with the uniform matroid (of the appropriate rank) is the number of nbc-bases of the matroid. Below is code that computes these flip products for all matroids on ground set [n]with n≤10 and rank at most n. [ ]: load "flipProduct.m2" for nfrom 1to 10 do ( for kfrom 1to ndo ( MM := allMatroids(n, k); print("--n="|toString n|",k="|toString k); print tally for Min MM list #nbcBases M; ) ) The function flipProduct has several options, which can be toggled to change the termination condition of the recursion. The options are: •BaseCase: (default 0) when set to 1the function additionally checks if either of the matroids is uniform, and if so, returns the number of nbc-bases of the other matorid. •FormulaViaFlats: (default false) when set to true, the sum in [1, Theorem 1.4] (i.e. the recursive part of the algorithm) is computed by looping over all flats E1of the first matroid. If the option is set to false, the sum is computed by looping over subsets of the ground set. •BetaBaseCase: (default false) when set to true, the recursion stops if the flip product is of the form (M\e)∗(M∗\e), which is equal to the beta invariant of M(see [1, Theorem 7.2]). •Verbose: (default false) when set to true, the function prints information about the current step of the recursion. The information is indented according to the depth of the recursion. Below is code that shows the effect of toggling the options. The recommended options for performance are BaseCase => 1 and FormulaViaFlats => true. [ ]: MM := allMatroids(7, 4); elapsedTime tally for Min MM list ( flipProduct(M, M) ) elapsedTime tally for Min MM list ( flipProduct(M, M, BaseCase => 1) ) elapsedTime tally for Min MM list ( 2 flipProduct(M, M, FormulaViaFlats => true) ) -- Recommended options: BaseCase => 1, FormulaViaFlats => true elapsedTime tally for Min MM list ( flipProduct(M, M, BaseCase => 1, FormulaViaFlats => true) ) elapsedTime tally for Min MM list ( flipProduct(M, M, BetaBaseCase => true) ) elapsedTime tally for Min MM list ( flipProduct(M, M, BetaBaseCase => true, BaseCase => 1) ) elapsedTime tally for Min MM list ( flipProduct(M, M, BetaBaseCase => true, BaseCase => 1, FormulaViaFlats =>␣ ,→true) ) The file nbcBases.m2 contains the functions brokenCircuits and nbcBases, which compute the broken circuits and nbc-bases of a matroid, respectively. Below are some example uses of these functions. [ ]: load "nbcBases.m2" G = graph {{1,2}, {1,5}, {1,6}, {2,3}, {2,4}, {3,6}, {3,7}, {4,5}, {4,7},␣ ,→{5,7}, {6,7}} G = graph {{1,4},{1,5},{1,6},{2,4},{2,5},{2,6},{3,4},{3,5},{3,6}} G = graph {{1,5},{1,3},{3,5},{1,2},{2,4},{3,4},{5,6},{4,6},{2,6}} G = graph {{1,2}, {1,3}, {2,6}, {3,6}, {2,4}, {3,4}, {1,5}, {4,5}, {5,6}} M = matroid G B = brokenCircuits M #B #nbcBases M #bases M #circuits M nbcBases M References [1] Oliver Clarke, Sean Dewar, Matteo Gallet, Georg Grasegger, Daniel Green Tripp, and Ben Smith. Counting fibres of the Hadamard product using Bergman fans, 2025. preprint. 3