Are there fast rank and unrank algorithms for integer vectors under the action of a permutation group?
Import du
Cette question était classée sans réponse par le forum à la collecte. Cela ne certifie pas qu’elle est un problème ouvert de recherche ; consultez les réponses et l’historique de la source.
Les énoncés et les résumés sont en anglais. Les repères ci-dessous et les articles Wikipédia disponibles en français vous aident à les lire. La source permet de retrouver la formulation complète et les discussions.
Énoncé du problème (anglais)
We are distributing indistinguishable balls in numbered boxes . A distribution is a tuple of nonnegative integers whose sum is . We also have a permutation group acting on , and two distributions are considered equivalent, if there is a permutation such that for all . Denote the set of the equivalence classes by . An equivalence class can be represented by some canonical element of it, for example the distribution that comes first in reverse lexical order.
Question: Are there known fast rank and unrank algorithms for ?
A rank function is a bijection , and its inverse is an unrank function. So the unranking gives "the th member", in some linear order, and the ranking tells the index of a given member.
By "fast" I mean clearly faster than iterating the distributions in a linear order until a match is found. Let's say a "fast" unranking takes time , where is a constant, . The naive iteration takes time when accessing the last element ().
Some observations and related problems
-
The counting problem is well understood: can be efficiently calculated using the cycle index theorem, a.k.a. Pólya counting (see e.g. this blog post)
-
The iterating problem is also well understood: there are nice algorithms for going through in some linear order, see e.g. Borie (2013). This algorithm is implemented in SageMath, class IntegerVectorsModPermutationGroup.
-
For some groups the ranking and unranking are well understood.
-
If is trivial, then we have simply the ranking/unranking problem of nonnegative integer vectors having a fixed sum, and its solutions are well known.
-
If , then the ball distributions are partitions of the integer . The answers to MO question "Computing the lexicographic indices of integer partition" describe a general unranking method that seems applicable: basically, consider values for , and solve the counting problem for the remaining boxes with the remaining balls; then compare the count to your index, and either increment , or fix it and solve the remaining boxes recursively.
However, even in some relatively simple special cases, like containing swaps of some boxes (and fixing some other boxes), or the boxes arranged as a necklace (cyclic permutations) or a bracelet (cyclic permutations + reflection), I could not find a known algorithm. In special cases one can of course cook up a solution, but I'm wondering if the general case is solved somewhere. I would also like to hear of any interesting special cases that have been already solved, perhaps even implemented somewhere.
As mentioned, SageMath's IntegerVectorsModPermutationGroup is good for iterating; but it has simply the "default" rank and unrank functions that iterate until match. In fact even its cardinality function works by iterating: if we have boxes with no symmetry ( is trivial), and balls, it takes something like 20 seconds to calculate . (Of course, by stars and bars, it is .)
My motivation for the question is that this is needed as a subroutine in my work with some classes of graphs (basically, I would like to find the th way of adding some indistinguishable vertices at some locations in the graph, where the symmetry of the graph makes some solutions equivalent).
Update (2.1.2024): While wading through literature, I found the following opinion by Kopparty, Kumar and Saks 2016 (boldface mine):
However, it seems that not all combinatorial counting arguments lead to efficient indexing algorithms. A prime example of this situation is when we have a finite group acting on a finite set, and the set we want to index is the set of orbits of the action. The associated counting problem can be solved using the Burnside counting lemma, and there seems to be no general way to use this to get an efficient indexing algorithm.
This somewhat dims my hopes of finding an existing efficient algorithm for the general case. Hence I would be interested even in solved special cases. (Kopparty et al. discuss the unranking of necklaces, which have circular symmetry.)
References
Borie, Nicolas, Generation modulo the action of a permutation group, Proceedings of the 25th international conference on formal power series and algebraic combinatorics, FPSAC 2013, Paris, France, June 24–28, 2013. Nancy: The Association. Discrete Mathematics & Theoretical Computer Science (DMTCS). Discrete Mathematics and Theoretical Computer Science. Proceedings, 767-778, electronic only (2013). ZBL1294.05183.
Kopparty, Swastik; Kumar, Mrinal; Saks, Michael, Efficient indexing of necklaces and irreducible polynomials over finite fields, Theory Comput. 12, Paper No. 7, 27 p. (2016). ZBL1373.11080.
Énoncé et contexte adaptés de MathOverflow · Jukka Kohonen
CC BY-SA 4.0 · Mise en forme adaptée ; formules conservées · Historique de la source
Repères pour comprendre
- Cardinal et ensemble dénombrable
- Un cardinal mesure la taille d’un ensemble. Un ensemble infini dénombrable peut être énuméré par les entiers ; un ensemble non dénombrable est plus grand. Les symboles ℵ₀, ℵ₁, … distinguent des tailles infinies.
- Nombre premier
- Un entier supérieur à 1 dont les seuls diviseurs positifs sont 1 et lui-même. Exemples : 2, 3, 5 et 7.
- Graphe
- Un ensemble de sommets reliés par des arêtes. Le degré d’un sommet compte les arêtes qui le touchent ; l’énoncé précise si le graphe est orienté ou autorise des arêtes multiples.
- Groupe / groupe abélien
- Un ensemble avec une opération associative, un élément neutre et un inverse pour chaque élément. Il est abélien si changer l’ordre de deux éléments ne change pas leur produit.
Sources et statut d’origine
- MathOverflow Statut dans la source : unanswered at collection
Dernière activité sur la question :
Couverture, sources et méthode
Ce compteur mesure les fiches importées, y compris des variantes distinctes. Il ne mesure pas le nombre total de questions mathématiques ouvertes dans le monde. Une même fiche peut appartenir à plusieurs domaines et sources.
Le répertoire n’est ni exhaustif ni actualisé en temps réel. « Signalé ouvert » décrit le classement observé dans la source à la date d’import ; chaque fiche importée n’a pas fait l’objet d’une vérification scientifique indépendante. Les 32 fiches expliquées ont été examinées séparément.
Formal Conjectures : seuls les énoncés « research open » sans preuve formelle signalée sont retenus ; leur balise est contrôlée dans une version précise du dépôt. Les variantes restent distinctes. Un « sorry » ne suffit pas à établir qu’un problème est ouvert.
Erdős : les problèmes résolus, indépendants ou accompagnés d’une solution Lean sont exclus, y compris « open (Lean) ». Les correspondances exactes avec les énoncés principaux de Formal Conjectures sont fusionnées.
Open Problem Garden : l’index des problèmes ouverts est croisé avec celui des résolus ; le spam, les clones identifiés et certains statuts obsolètes sont écartés. Les énoncés et leurs définitions sont attribués aux pages originales ; les formules sont conservées et le contenu reste sous GFDL. Les doublons reconnus entre sources sont regroupés, sans prétendre résoudre toutes les équivalences mathématiques.
OEIS : extraction directe des commentaires et formules conjecturaux, une fiche par suite, avec exclusion des résolutions mentionnées. MathOverflow et Math Stack Exchange : questions classées sans réponse par leur API, hors publications fermées et rubriques non scientifiques. Ces questions restent distinctes des conjectures signalées ouvertes. La collecte est partielle et datée ; les auteurs et licences figurent sur chaque fiche.
Des exclusions documentées tiennent compte des annonces récentes et des conflits de statut. Une variante plus forte ou un cas particulier peut rester ouvert après la résolution d’un autre énoncé.
Attribution : The Formal Conjectures Authors ; teorth/erdosproblems et ses contributeurs ; Open Problem Garden et ses contributeurs. Chaque source conserve sa licence.
- Formal Conjectures · 1 924 · Apache-2.0 / CC-BY-4.0
- Erdős Problems (teorth) · 622 · Apache-2.0
- Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
- OEIS · 18 857 · CC BY-SA 4.0
- MathOverflow · 19 035 · CC BY-SA (version on each entry)
- Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)