Identifier
Identifier
Values
[1] generating graphics... => 1
[2] generating graphics... => 4
[1,1] generating graphics... => 0
[3] generating graphics... => 9
[2,1] generating graphics... => 4
[1,1,1] generating graphics... => 1
[4] generating graphics... => 16
[3,1] generating graphics... => 10
[2,2] generating graphics... => 4
[2,1,1] generating graphics... => 6
[1,1,1,1] generating graphics... => 0
[5] generating graphics... => 25
[4,1] generating graphics... => 18
[3,2] generating graphics... => 11
[3,1,1] generating graphics... => 13
[2,2,1] generating graphics... => 7
[2,1,1,1] generating graphics... => 6
[1,1,1,1,1] generating graphics... => 1
[6] generating graphics... => 36
[5,1] generating graphics... => 28
[4,2] generating graphics... => 20
[4,1,1] generating graphics... => 22
[3,3] generating graphics... => 12
[3,2,1] generating graphics... => 15
[3,1,1,1] generating graphics... => 14
[2,2,2] generating graphics... => 8
[2,2,1,1] generating graphics... => 8
[2,1,1,1,1] generating graphics... => 8
[1,1,1,1,1,1] generating graphics... => 0
[7] generating graphics... => 49
[6,1] generating graphics... => 40
[5,2] generating graphics... => 31
[5,1,1] generating graphics... => 33
[4,3] generating graphics... => 22
[4,2,1] generating graphics... => 25
[4,1,1,1] generating graphics... => 24
[3,3,1] generating graphics... => 17
[3,2,2] generating graphics... => 17
[3,2,1,1] generating graphics... => 17
[3,1,1,1,1] generating graphics... => 17
[2,2,2,1] generating graphics... => 9
[2,2,1,1,1] generating graphics... => 9
[2,1,1,1,1,1] generating graphics... => 8
[1,1,1,1,1,1,1] generating graphics... => 1
[8] generating graphics... => 64
[7,1] generating graphics... => 54
[6,2] generating graphics... => 44
[6,1,1] generating graphics... => 46
[5,3] generating graphics... => 34
[5,2,1] generating graphics... => 37
[5,1,1,1] generating graphics... => 36
[4,4] generating graphics... => 24
[4,3,1] generating graphics... => 28
[4,2,2] generating graphics... => 28
[4,2,1,1] generating graphics... => 28
[4,1,1,1,1] generating graphics... => 28
[3,3,2] generating graphics... => 19
[3,3,1,1] generating graphics... => 19
[3,2,2,1] generating graphics... => 19
[3,2,1,1,1] generating graphics... => 19
[3,1,1,1,1,1] generating graphics... => 18
[2,2,2,2] generating graphics... => 10
[2,2,2,1,1] generating graphics... => 10
[2,2,1,1,1,1] generating graphics... => 10
[2,1,1,1,1,1,1] generating graphics... => 10
[1,1,1,1,1,1,1,1] generating graphics... => 0
[9] generating graphics... => 81
[8,1] generating graphics... => 70
[7,2] generating graphics... => 59
[7,1,1] generating graphics... => 61
[6,3] generating graphics... => 48
[6,2,1] generating graphics... => 51
[6,1,1,1] generating graphics... => 50
[5,4] generating graphics... => 37
[5,3,1] generating graphics... => 41
[5,2,2] generating graphics... => 41
click to show generating function       
Description
The largest eigenvalue of the random to random operator acting on the simple module corresponding to the given partition.
References
[1] Reyes, J.-C. U. Random walk, semi-direct products, and card shuffling MathSciNet:2703300
Code
class RandomToRandom:
    def __init__(self, n):
        self._n = n

    @cached_method
    def W(self):
        return SymmetricGroup(self._n)

    def cycle(self, i,j):
        """
        EXAMPLES::

            sage: RandomToRandom(5).cycle(2,4)
            (2,3,4)
        """
        return self.W()([tuple(range(i,j+1))])

    def r2r(self, i,j):
        """
        EXAMPLES::

            sage: R = RandomToRandom(4)
            sage: R.r2r(1,3,4)
            (1,2,4)
            sage: R.r2r(3,1,4)
            (1,4,2)
            sage: r2r(1,2,4)
            (1,4)

            sage: RandomToRandom(3).r2r(1,2,3)
            (1,3)
        """
        return self.cycle(i,self._n) * (~self.cycle(j,self._n))

    def operator(self, representation):
        """
        EXAMPLES::

            sage: R = RandomToRandom(3)
            sage: representation = attrcall("matrix") # emulates the natural representation
            sage: R.operator(representation)
            [5 1 3]
            [1 5 3]
            [3 3 3]

            sage: representation = R.W().algebra(QQ).monomial         # emulates the regular representation

            sage: R.operator(representation)
            3*B[()] + 2*B[(2,3)] + B[(1,2,3)] + B[(1,3,2)] + 2*B[(1,3)]

            sage: R.operator(Partition([2,1]))
            [2 2]
            [2 2]
        """
        if isinstance(representation, Partition):
            assert representation.size() == self._n
            representation = SymmetricGroupRepresentation(representation)
        E = self.W().domain()
        return sum(representation(self.r2r(i,j)) for i in E for j in E)

    def max_eigenvalue_on_simple_representation(self, p):
        return max(self.operator(p).eigenvalues())

    def max_eigenvalue_on_simple_representations(self):
        """
        EXAMPLES::

            sage: R = RandomToRandom(4)
            sage: dict(R.max_eigenvalue_on_simple_representations())
            {[1, 1, 1, 1]: 0, [2, 1, 1]: 6, [2, 2]: 4, [3, 1]: 10, [4]: 16}

            sage: R = RandomToRandom(5)
            sage: dict(R.max_eigenvalue_on_simple_representations())
            {[1, 1, 1, 1]: 0, [2, 1, 1]: 6, [2, 2]: 4, [3, 1]: 10, [4]: 16}
        """
        from sage.sets.family import Family
        return Family(Partitions(self._n), self.max_eigenvalue_on_simple_representation)

@cached_function
def getRandomToRandom(n):
    return RandomToRandom(n)

def statistic(L):
    n = sum(L)
    R = getRandomToRandom(n)
    d = R.max_eigenvalue_on_simple_representations()
    return d[L]
Created
Mar 22, 2013 at 22:05 by Nicolas M. ThiƩry
Updated
Dec 29, 2016 at 09:25 by Christian Stump