We study preimages of permutations under the bubblesort operator B. We achieve a description of these preimages much more complete than what is known for the more complicated sorting operators S (stacksort) and Q (queuesort). We describe explicitly the set of preimages under B of any permutation π from the left-to-right maxima of π, showing that there are 2^{k−1} such preimages if k is the number of these left-to-right maxima. We further consider, for each n, the tree T_n recording all permutations of size n in its nodes, in which an edge from child to parent corresponds to an application of B (the root being the identity permutation), and we present several properties of these trees. In particular, for each permutation π, we show how the subtree of T_n rooted at π is determined by the number of left-to-right maxima of π and the length of the longest suffix of left-to-right maxima of π. Building on this result, we determine the number of nodes and leaves at every height in such trees, and we recover (resp. obtain) the average height of nodes (resp. leaves) in T_n.
Preimages under the Bubblesort Operator / Bouvel, Mathilde; Cioni, Lapo; Ferrari, Luca. - In: ELECTRONIC JOURNAL OF COMBINATORICS. - ISSN 1077-8926. - ELETTRONICO. - 29:(2022), pp. P4.32.0-P4.32.0. [10.37236/11390]
Preimages under the Bubblesort Operator
Bouvel, Mathilde;Cioni, Lapo;Ferrari, Luca
2022
Abstract
We study preimages of permutations under the bubblesort operator B. We achieve a description of these preimages much more complete than what is known for the more complicated sorting operators S (stacksort) and Q (queuesort). We describe explicitly the set of preimages under B of any permutation π from the left-to-right maxima of π, showing that there are 2^{k−1} such preimages if k is the number of these left-to-right maxima. We further consider, for each n, the tree T_n recording all permutations of size n in its nodes, in which an edge from child to parent corresponds to an application of B (the root being the identity permutation), and we present several properties of these trees. In particular, for each permutation π, we show how the subtree of T_n rooted at π is determined by the number of left-to-right maxima of π and the length of the longest suffix of left-to-right maxima of π. Building on this result, we determine the number of nodes and leaves at every height in such trees, and we recover (resp. obtain) the average height of nodes (resp. leaves) in T_n.File | Dimensione | Formato | |
---|---|---|---|
11390-PDF file-42716-2-10-20221111.pdf
accesso aperto
Descrizione: Articolo principale
Tipologia:
Pdf editoriale (Version of record)
Licenza:
Creative commons
Dimensione
356.66 kB
Formato
Adobe PDF
|
356.66 kB | Adobe PDF |
I documenti in FLORE sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.