Maximum likelihood degrees of small matroids

[1]:
using LikelihoodDegenerations
using HomotopyContinuation
using CapAndHomalg

 ┌───────┐   GAP 4.12dev-1006-g1acc687-dirty built on 2021-07-26 13:31:53+0000
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-apple-darwin14-julia64-kv8
 Configuration:  gmp 6.2.0, Julia GC, Julia 1.6.0
 Loading the library and packages ...
 Packages:   AClib 1.3.2, Alnuth 3.1.2, AtlasRep 2.1.0, AutoDoc 2020.08.11,
             AutPGrp 1.10.2, CRISP 1.4.5, Cryst 4.1.23, CrystCat 1.1.9,
             CTblLib 1.3.1, FactInt 1.6.3, FGA 1.4.0, Forms 1.2.5,
             GAPDoc 1.6.4, genss 1.6.6, IO 4.7.1, IRREDSOL 1.4.1,
             JuliaInterface 0.6.0, LAGUNA 3.9.3, orb 4.8.3, Polenta 1.3.9,
             Polycyclic 2.16, PrimGrp 3.4.1, RadiRoot 2.8, recog 1.3.2,
             ResClasses 4.7.2, SmallGrp 1.4.2, Sophus 1.24, SpinSym 1.5.2,
             TomLib 1.2.9, TransGrp 3.0, utils 0.69
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
CapAndHomalg v1.1.7
Imported OSCAR's components GAP and Singular_jll
Type: ?CapAndHomalg for more information
[2]:
LoadPackage("images")
SetInfoLevel(InfoWarning,0)

On the main page you can download a directory in which to run this code. It contains /MatroidDB/SimpleMatroidkn.txt for various kn.

The following constructs the realization space of the \(27\)-th matroid of rank \(4\) on \(8\) elements in the database file /MatroidDB/SimpleMatroid48.txt.

[3]:
Z = RealizedMatroidFromDatabase(4,8,27)
0********0**********0****************************0**************0**0**
[3]:
Realized matroid in dimensions (4, 8)
4×8 Matrix{Expression}:
 1  0  0  1  0   1   1                    1
 0  1  0  1  0  a1   0                   a4
 0  0  1  1  0   0  a2      a2 + a4 - a4*a2
 0  0  0  0  1   1  a3  1 - a2 - a4 + a4*a2
With equations
Expression[a1 - a4 - a1*a2 - a3*a1 + a3*a4 - a4*a1 + a4*a1*a2]
and 6 vanishing Plucker coordinate(s)

We can describe this space as a parametrization + some equations which must be satisfied (shown above)

[4]:
Z.dimension
[4]:
3
[5]:
Z.degree
[5]:
3
[6]:
Z.nonbases
[6]:
6-element Vector{Vector{Int64}}:
 [1, 2, 3, 4]
 [1, 2, 5, 6]
 [1, 3, 5, 7]
 [2, 4, 6, 8]
 [3, 6, 7, 8]
 [4, 5, 7, 8]

Computing the ML degree of this space involves - producing a witness point on each irreducible component of Z - solving the maximum likelihood equations on that component of Z - output a tuple of maximum likelihood degrees for each component

[7]:
ml_degree(Z)
Tracking 3 paths... 100%|███████████████████████████████| Time: 0:00:18
  # paths tracked:                  3
  # non-singular solutions (real):  3 (0)
  # singular endpoints (real):      0 (0)
  # total solutions (real):         3 (0)
3 solutions left to classify
Found 3 solutions
[7]:
1-element Vector{Int64}:
 24

There are 4 simple matroids of rank 3 on 5 elements. Below we compute their maximum likelihood degrees

[8]:
ML_Degrees = [ml_degree(RealizedMatroidFromDatabase(3,5,i)) for i in 1:4];
**********
Completely parametrized. Returning a single point.
0*********
Completely parametrized. Returning a single point.
0******0**
0000******
Completely parametrized. Returning a single point.
[9]:
display(ML_Degrees)
4-element Vector{Vector{Int64}}:
 [2]
 [1]
 [1]
 [1]