*****************************************************************************
*       www.FindStat.org - The Combinatorial Statistic Finder               *
*                                                                           *
*       Copyright (C) 2019 The FindStatCrew <info@findstat.org>             *
*                                                                           *
*    This information is distributed in the hope that it will be useful,    *
*    but WITHOUT ANY WARRANTY; without even the implied warranty of         *
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                   *
*****************************************************************************

-----------------------------------------------------------------------------
Statistic identifier: St001950

-----------------------------------------------------------------------------
Collection: Finite Cartan types

-----------------------------------------------------------------------------
Description: The minimal size of a base for the Weyl group of the Cartan type.

A base of a permutation group is a set $B$ such that the pointwise stabilizer of $B$ is trivial.  For example, a base of the symmetric group on $n$ letters must contain all but one letter.

Any base has at least $\log |G|/n$ elements, where $n$ is the degree of the group, i.e., the size of its domain.

-----------------------------------------------------------------------------
References: [1]   [[wikipedia:Base_(group_theory)]]

-----------------------------------------------------------------------------
Code:
def minimal_base(G):
    """
    EXAMPLES::

        sage: [G for G in SymmetricGroup(7).conjugacy_classes_subgroups() if G.base() != minimal_base(G)]
        [Subgroup generated by [(2,4,5,7,3), (2,3)(4,7), (1,6)(2,7,3,4)] of (Symmetric group of order 7! as a permutation group)]

    """
    b = G.base()
    for i in range(ceil(log(G.cardinality())/log(G.degree())), len(b)):
        for s in Subsets(G.domain(), i):
            nb = G.base(seed=s)
            if len(nb) < len(b):
                return nb
    return b

def statistic(ct):
    return len(minimal_base(WeylGroup(ct, implementation="permutation")))


-----------------------------------------------------------------------------
Statistic values:

['A',1] => 1
['A',2] => 1
['B',2] => 2
['G',2] => 2
['A',3] => 2
['B',3] => 2
['C',3] => 2
['A',4] => 2
['B',4] => 3
['C',4] => 3
['D',4] => 2
['F',4] => 3
['A',5] => 3
['B',5] => 4
['C',5] => 4
['D',5] => 3
['A',6] => 4
['B',6] => 4
['C',6] => 4
['D',6] => 4
['E',6] => 4
['A',7] => 5
['B',7] => 5
['C',7] => 5
['D',7] => 4
['E',7] => 5
['A',8] => 6
['B',8] => 6
['C',8] => 6
['D',8] => 5
['E',8] => 7

-----------------------------------------------------------------------------
Created: Jul 05, 2024 at 11:04 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Jul 05, 2024 at 11:04 by Martin Rubey