This file contains helper functions for detecting the mutation type of

a cluster algebra or quiver.

For the compendium on the cluster algebra and quiver package see [MS2011]

AUTHORS:

  • Gregg Musiker
  • Christian Stump
sage.combinat.cluster_algebra_quiver.mutation_type.is_mutation_finite(M, nr_of_checks=None)

Use a non-deterministic method by random mutations in various directions. Can result in a wrong answer.

Warning

This method modifies the input matrix M!

INPUT:

  • nr_of_checks – (default: None) number of mutations applied. Standard is 500*(number of vertices of self).

ALGORITHM:

A quiver is mutation infinite if and only if every edge label (a,-b) satisfy a*b > 4. Thus, we apply random mutations in random directions

EXAMPLES:

sage: from sage.combinat.cluster_algebra_quiver.mutation_type import is_mutation_finite

sage: Q = ClusterQuiver(['A',10])
sage: M = Q.b_matrix()
sage: is_mutation_finite(M)
(True, None)

sage: Q = ClusterQuiver([(0,1),(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(2,9)])
sage: M = Q.b_matrix()
sage: is_mutation_finite(M) # random
(False, [9, 6, 9, 8, 9, 4, 0, 4, 5, 2, 1, 0, 1, 0, 7, 1, 9, 2, 5, 7, 8, 6, 3, 0, 2, 5, 4, 2, 6, 9, 2, 7, 3, 5, 3, 7, 9, 5, 9, 0, 2, 7, 9, 2, 4, 2, 1, 6, 9, 4, 3, 5, 0, 8, 2, 9, 5, 3, 7, 0, 1, 8, 3, 7, 2, 7, 3, 4, 8, 0, 4, 9, 5, 2, 8, 4, 8, 1, 7, 8, 9, 1, 5, 0, 8, 7, 4, 8, 9, 8, 0, 7, 4, 7, 1, 2, 8, 6, 1, 3, 9, 3, 9, 1, 3, 2, 4, 9, 5, 1, 2, 9, 4, 8, 5, 3, 4, 6, 8, 9, 2, 5, 9, 4, 6, 2, 1, 4, 9, 6, 0, 9, 8, 0, 4, 7, 9, 2, 1, 6])

Check that trac ticket #19495 is fixed:

sage: dg = DiGraph(); dg.add_vertex(0); S = ClusterSeed(dg); S
A seed for a cluster algebra of rank 1
sage: S.is_mutation_finite()
True
sage.combinat.cluster_algebra_quiver.mutation_type.load_data(n)

Load a dict with keys being tuples representing exceptional QuiverMutationTypes, and with values being lists or sets containing all mutation equivalent quivers as dig6 data.

We check

  • if the data is stored by the user, and if this is not the case
  • if the data is stored by the optional package install.

EXAMPLES:

sage: from sage.combinat.cluster_algebra_quiver.mutation_type import load_data
sage: load_data(2) # random - depends on the data the user has stored
{('G', 2): [('AO', (((0, 1), (1, -3)),)), ('AO', (((0, 1), (3, -1)),))]}